Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,21 @@
Red [ "RPN Eval - Hinjo, July 25, 2025" ]
rpn-exec: func [exp [string!]] [
stack: copy []
blk: load exp ; convert into block
foreach tok blk [
print [mold stack tok]
case [
number? tok [append stack tok]
find [+ - * / ^] tok [
if (length? stack) < 2 [
print "Error: Two operands required!" exit ]
if tok = '^ [tok: '**]
b: take/last stack
a: take/last stack
append stack do compose [a (tok) b]
]
]
]
]
; in Red, "^" is an escape char, so, it must be written as ^^
rpn-exec "3 4 2 * 1 5 - 2 3 ^^ ^^ / +"