Post Reply 
CONVERT and variables for arguments
10-21-2015, 11:26 AM
Post: #16
RE: CONVERT and variables for arguments
(10-21-2015 10:14 AM)epp Wrote:  I like your suggestions Stephen.

Code:

EXPORT CDFrom,CDTo;
EXPORT Distance()
BEGIN
  LOCAL x,menu,unit;
  unit := {1_mm, 1_cm, 1_m, 1_km, 1_inch, 1_ft, 1_yd, 1_mile};
  menu := {"mm", "cm", "m", "km", "inches", "feet", "yards", "miles"};
  CHOOSE(CDFrom, "From", menu);
  CHOOSE(CDTo, "To", menu);
  INPUT({ {x,[0],{45,20,3}} }, "Convert", menu[CDFrom] + " ");
  x*CONVERT(unit[CDFrom], unit[CDTo]);
END;

My own preference is to have the INPUT value between the two units...
It seems confusing to me to select " to m" and then start typing in a value in mm rather than m (where mm is the from unit). As a user, I'm sure I would sometimes type in the value using "to units" instead by mistake. And the from and to screens are so similar its not always obvious that you have moved from from to to. Having the sequence " from, value, to" seems much clearer to me. Compare with the sequence in ZIPP and let me know what you think.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CONVERT and variables for arguments - epp - 10-15-2015, 06:16 PM
RE: CONVERT and variables for arguments - StephenG1CMZ - 10-21-2015 11:26 AM



User(s) browsing this thread: