HP Forums

Full Version: choose function behaviour
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use CHOOSE in many places in my pgm with various sized lists of items.

I always use the list input format.

Now, in some cases it numbers the items
but in others it doesnt.

in some cases it remembers the last selection and in others it doesnt whether they are numbered or not.

What determines how it behaves?

is there another undocumented argument?
(11-25-2015 03:38 PM)ji3m Wrote: [ -> ]What determines how it behaves?

The shortcuts go from 1-9, then A-O. Any more then that and they won't be there because you'd start overriding keys. So basically, >24 means no shortcuts. For the grid chooser (which you don't have access to right now), they go from the 7 key, to the + key in a 4x4 grid (this matches the physical position of the grid in a 4x4 item).

Note that if ALPHA is turned on you can type and alphanumerically search the choose items.
Ok. But what deterimes remembering last choice?
(11-25-2015 06:25 PM)ji3m Wrote: [ -> ]Ok. But what deterimes remembering last choice?

Is this what you had in mind? The variable you pass to CHOOSE serves as both the default choice and as the choice made.

Code:

EXPORT Remember()
BEGIN
 LOCAL c;

 c:=1;
 REPEAT
  CHOOSE(c,"Remember","one","two","three","exit");
  MSGBOX("You selected "+c); 
 UNTIL c==4;

END;
Thanks muchly. Explains a lot.

Wondered why it was call by reference.

Not in help, maybe in user guide..?
Reference URL's