diff options
author | dan <[email protected]> | 2023-05-26 20:58:11 -0400 |
---|---|---|
committer | dan <[email protected]> | 2023-05-26 20:58:11 -0400 |
commit | 1cc9bd9d82f970aba524ff57d9b67e9efac47ce9 (patch) | |
tree | d11adde9e6dcf6d2957c4e406c6640a589f4e9d4 | |
parent | f0b0efe498937562598b2d9467e986550d862327 (diff) | |
download | forth-1cc9bd9d82f970aba524ff57d9b67e9efac47ce9.tar.gz forth-1cc9bd9d82f970aba524ff57d9b67e9efac47ce9.tar.bz2 forth-1cc9bd9d82f970aba524ff57d9b67e9efac47ce9.zip |
fix: js forth not statement so that string "0" inverts to true
-rw-r--r-- | forth.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -48,7 +48,7 @@ function forth(print = console.log) { return localIdx - initialIdx; } }, - 'not' : () => { s.push(!s.pop()) }, + 'not' : () => { s.push(!popNum()) }, '.' : () => { print(s.pop()) }, 'peek' : () => { print(s[s.length - 1]) }, 'dup' : () => { |