home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
DIVERSEN
/
TIPI2A
/
HELPDATA.TPI
< prev
next >
Wrap
Text File
|
1994-09-13
|
1KB
|
63 lines
define menu
# ( -- choice)
# ( valid$ -- )
# Returns the chosen key or 0 if the user escapes from this menu
0 cursor
ucase$
27 chr$ swap$ +$
begin
inkey$ ucase$ # valid$ key$
len instr *
dup
if dup drop$ endif drop$
until
1 -
1 cursor
enddef
define wait
begin key until cls
enddef
begin cls
|
| ╔════════════════════════════════════╗
| ║ D A T A I N S T R U C T I O N S ║
| ╠══════════════════╦═════════════════╣
| ║ ║ ║
| ║ [A] FETCH ║ [B] STORE ║
| ╚══════════════════╩═════════════════╝
"ab" menu dup cls
case 0 of endof
1 of
|
| FETCH
|
| Data Stack: v -- x (if numeric)
| String Stack: -- x$ (if string)
|
| Returns the contents of variable v. The type of
| v (numeric or string) determines if the contents
| of the fetch is placed on the data or the
| string stack.
|
wait
endof
2 of
|
| STORE
|
| Data Stack: n v -- (if numeric) v -- (if string)
| String Stack: -- s$ --
|
| Stores a value into a variable. The type of v
| (numeric or string) determines if the contents
| of the store is taken from the data or the string
| stack.
|
wait
endof
endcase
not
until