Post Reply 
71B: Any LEX files that add Sharp-like INPUT and AREAD?
01-12-2022, 03:30 PM
Post: #1
71B: Any LEX files that add Sharp-like INPUT and AREAD?
There's a vast assortment of LEX files out there to sift through, so I'm wondering if anybody knows of any that provide these features. Sharp pocket computers usually have an AREAD function that works in conjunction with the definable keyboard to read a value off the command line when invoking a program. For instance:

10 "A":AREAD X

Then you could press 50 DEF A and the program would run from label "A", storing 50 into X. This I can do easily enough with a BASIC SUB that uses DISP$, but I'm wondering if there's a LEX file that adds a proper AREAD function to make it a bit more elegant.

The INPUT behavior wouldn't be straight-forward to implement as a SUB, but could be done with some VAL() and IF tricks if needed. On a Sharp, you can press ENTER without actually entering anything to keep the original value of the variable being prompted for. The INPUT command also acts as a conditional test, skipping the rest of the current line when ENTER is pressed with no input. This allows a lot of flexibility for input routines.

Are there any LEX files floating around that add either of these?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

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