Post Reply 
A little CHOICE bug/enhancement
09-05-2015, 06:00 PM
Post: #1
A little CHOICE bug/enhancement
If a user program is choosing from a list of items, that list of items might be empty (all the asteroids between 9 and 9 m in diameter, perhaps). If such an empty choice is offered, the only meaningful response is 0 or Escape. If instead the user enters OK or Enter, it appears as though item 65 536 in the list has been selected.
Code:

EXPORT CHOOSEBUG()
BEGIN
 LOCAL CHOICE;
 CHOOSE(CHOICE,"",{}); //USE ENTER OR OK
 PRINT(CHOICE); //65 536
//GIVEN NO ITEMS TO SELECT SHOULD RETURN 0 (ESC)
//NOT ITEM 65 536
END;

Speaking of large choice lists, scrolling would be tedious. An enhancement to allow the displayed choices to be filtered by a text string typed on-screen would ease choosing an item from a large list.

BTW, I was pleasantly surprised at how quickly CHOOSE can open a large list..

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
A little CHOICE bug/enhancement - StephenG1CMZ - 09-05-2015 06:00 PM



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