Created
March 16, 2024 02:42
-
-
Save secwang/dcbb87115a02c1419246ab60bebe0e68 to your computer and use it in GitHub Desktop.
repl.apl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env dyalogscript ENABLE_CEF=0 | |
∇ repl | |
:Repeat | |
⍝ Read | |
input ← ⍞ | |
⍝ Eval & Print | |
:Trap 0 | |
result ← ⍎input | |
⎕←result | |
:Else | |
⎕←'Error: Invalid expression' | |
:EndTrap | |
:EndRepeat | |
∇ | |
repl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hit two Ctrl-c leave the repl