Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -23,7 +23,7 @@ szCarriageReturn: .asciz "\n"
szMessFinOK: .asciz "Program normal end. \n"
szMessError: .asciz "\nError Buffer too small!!!\n"
szChoose: .asciz "\nMake your choise: "
szChoose: .asciz "\nMake your choice: "
szMessErrorNum: .asciz "Error : number do not exists!!\n"
szMesschoose: .asciz "\nYou have chosen: "
szLigne1: .asciz "fee fie"

View file

@ -28,7 +28,7 @@ szCarriageReturn: .asciz "\n"
szMessFinOK: .asciz "Program normal end. \n"
szMessError: .asciz "\nError Buffer too small!!!\n"
szChoose: .asciz "\nMake your choise: "
szChoose: .asciz "\nMake your choice: "
szMessErrorNum: .asciz "Error : number do not exists!!\n"
szMesschoose: .asciz "\nYou have chosen: "
szLigne1: .asciz "fee fie"

View file

@ -21,7 +21,7 @@ BYTE FUNC GetMenuItem(PTR ARRAY items BYTE count)
DO
ShowMenu(items,count) PutE()
Print("Make your choise: ")
Print("Make your choice: ")
res=InputB()
UNTIL res>=1 AND res<=count
OD

View file

@ -1,18 +1,19 @@
val choose = impure fn(entries) {
val choose = fn*(entries) {
if entries is not list: throw "invalid args"
if not entries: return ""
# print the menu
writeln join("\n", map(fn e, i: "{{i:2}}: {{e}}", entries, 1..len(entries)))
writeln join(map(entries, 1..len(entries), by=fn e, i:"{{i:2}}: {{e}}"), by="\n")
val idx = read(
"Select entry #: ",
fn(x) {
prompt="Select entry #: ",
validation=fn(x) {
if not x -> RE/^[0-9]+$/: return false
val y = x -> number
y > 0 and y <= len(entries)
},
"invalid selection\n", -1,
errmsg="invalid selection\n",
maxattempts=-1,
) -> number
entries[idx]

View file

@ -0,0 +1,17 @@
[ swap dup [] = iff nip done
[ dup witheach
[ i^ 1+ echo say ") "
echo$ cr ]
over input
$->n not iff drop again
dup 1 < iff drop again
over size
over < iff drop again ]
rot drop 1 - peek ] is menu ( [ $ --> $ )
' [ $ "fee fie" $ "huff and puff"
$ "mirror mirror" $ "tick tock" ]
[] swap witheach [ do nested join ]
$ "What does a clock say? " menu
say "Your answer: " echo$