Post Reply 
Bug in CHOOSE (10637)
11-16-2016, 04:21 PM (This post was last modified: 11-16-2016 04:52 PM by StephenG1CMZ.)
Post: #7
RE: Bug in CHOOSE (10637)
(11-06-2016 06:46 PM)compsystems Wrote:  you are agree with my correction help?


ORIGINAL CHOOSE HELP (wrong )
Quote:Syntax:
CHOOSE(var, “title”, “item1”, “item2”,[…"item14"]) or
CHOOSE(var,"title",{"item1"..."itemN"})

Displays a choose box with the given "title" and containing items with the strings "item1", etc.

If the user chooses an object, var will be updated to contain the number of the selected object (an integer, 1, 2, 3, …); otherwise, stores zero in var if the user exits without choosing.

Returns true (non zero) if the user selects an object, otherwise returns false (0).

best
Quote:Syntax:
CHOOSE(PosIdentifier, “title”, “item1”, “item2”,[…"item14"]) or
CHOOSE(PosIdentifier,"title",{"item1"..."itemN"})

Displays a choose box with the given "title" and containing items with the strings "item1", etc., the item is placed in the position specified in the variable (PosIdentifier)

If the user chooses an item [OK/Enter], PosIdentifier will be updated to contain the number of the selected object (an integer, 1, 2, 3, …); also returns true (non zero) as out, otherwise if the user press [ESC] key returns false (0) and PosIdentifier will be not updated

Just a minor documentation improvement: "Posidentifier" is not the best name to choose ... Users learning this might wonder whether the identifier is POSitive if a choice has been made and negative otherwise.
I would suggest
"CHOOSE(choice"...for selecting a single item, or
"CHOOSE(selection"...for selecting a list of items

(CHOOSE cannot select more than one item from a list - this is instead done using INPUT - but perhaps it will).

Also, the documentation could document how many items can be chosen from.

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
Bug in CHOOSE (10637) - slawek39 - 11-06-2016, 02:22 PM
RE: Bug in CHOOSE (10637) - compsystems - 11-06-2016, 06:46 PM
RE: Bug in CHOOSE (10637) - slawek39 - 11-06-2016, 06:58 PM
RE: Bug in CHOOSE (10637) - StephenG1CMZ - 11-16-2016 04:21 PM



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