Post Reply 
CONVERT and variables for arguments
10-21-2015, 10:14 AM (This post was last modified: 10-21-2015 11:10 AM by epp.)
Post: #15
RE: CONVERT and variables for arguments
I like your suggestions Stephen. I often have better luck pressing the number keys to make a selection.

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;
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 - epp - 10-21-2015 10:14 AM



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