Post Reply 
(11C) Currency Converter
10-01-2018, 04:02 PM (This post was last modified: 10-01-2018 04:24 PM by Dieter.)
Post: #5
RE: (11C) Currency Converter
(10-01-2018 01:00 PM)Gamo Wrote:  Program: Currency Converter Updated II
Code:
LBL C
GSB 1
RTN
----------------------------------------
LBL D
GSB 2
RTN

Maybe I don't get the point and this is a very silly question, but...
...why don't you just replace LBL 1 with LBL C and LBL 2 with LBL D ?

(10-01-2018 01:00 PM)Gamo Wrote:  Updated III Use Signs as Flags with only two labels.

Great. That's an even better version that can be extended to five currencies.

Idea: what about another CHS after the multiplication? This way the output is flagged just as the input. So you know that positive input/output means USD and negative values are EUR or GBP.

(10-01-2018 01:00 PM)Gamo Wrote:  Remark:
Of all 3 versions the most user friendly
I believed is the Updated II
Personally I like Updated III

Then leave it the way it is. I'm glad you like it. ;-)

Finally, here is an "extended version" for five currencies that does the same thing via indirect addressing.
Store the conversion factors in R1, R2, R3, R4 and R5 respectively.

Code:
LBL A
1
GTO 0
LBL B
2
GTO 0
LBL C
3
GTO 0
LBL D
4
GTO 0
LBL E
5
LBL 0
STO I
R↓
x>0?
GTO 1
RCL (i)
÷
CHS
RTN
LBL 1
RCL (i)
x
CHS
RTN

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Currency Converter - Gamo - 10-01-2018, 06:00 AM
RE: (11C) Currency Converter - Dieter - 10-01-2018, 11:58 AM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 12:49 PM
RE: (11C) Currency Converter - Gamo - 10-01-2018, 01:00 PM
RE: (11C) Currency Converter - Dieter - 10-01-2018 04:02 PM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 04:37 PM
RE: (11C) Currency Converter - Dieter - 10-01-2018, 06:05 PM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 06:28 PM
RE: (11C) Currency Converter - Gamo - 10-02-2018, 01:53 AM



User(s) browsing this thread: 1 Guest(s)