Post Reply 
choose function behaviour
11-25-2015, 03:38 PM (This post was last modified: 11-25-2015 03:43 PM by ji3m.)
Post: #1
choose function behaviour
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?

I work with android Prime only for now on my
Galaxy Tab Pro/Note 2
Find all posts by this user
Quote this message in a reply
11-25-2015, 05:39 PM (This post was last modified: 11-25-2015 05:40 PM by Tim Wessman.)
Post: #2
RE: choose function behaviour
(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.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
11-25-2015, 06:25 PM
Post: #3
RE: choose function behaviour
Ok. But what deterimes remembering last choice?

I work with android Prime only for now on my
Galaxy Tab Pro/Note 2
Find all posts by this user
Quote this message in a reply
11-26-2015, 04:31 AM
Post: #4
RE: choose function behaviour
(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;
Find all posts by this user
Quote this message in a reply
11-26-2015, 06:56 PM
Post: #5
RE: choose function behaviour
Thanks muchly. Explains a lot.

Wondered why it was call by reference.

Not in help, maybe in user guide..?

I work with android Prime only for now on my
Galaxy Tab Pro/Note 2
Find all posts by this user
Quote this message in a reply
Post Reply 




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