https://github.com/abrudz/dyalog-multiline-session
Enable input over multiple lines in Dyalog APL session
https://github.com/abrudz/dyalog-multiline-session
dyalog dyalog-apl dyalogapl error-handling input multi-line multi-line-text multiline repl session
Last synced: about 1 month ago
JSON representation
Enable input over multiple lines in Dyalog APL session
- Host: GitHub
- URL: https://github.com/abrudz/dyalog-multiline-session
- Owner: abrudz
- License: mit
- Created: 2018-08-27T09:37:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T10:22:52.000Z (over 6 years ago)
- Last Synced: 2025-02-10T15:30:44.961Z (3 months ago)
- Topics: dyalog, dyalog-apl, dyalogapl, error-handling, input, multi-line, multi-line-text, multiline, repl, session
- Language: APL
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multi-line Session in Dyalog APL
*Enable input over multiple lines in Dyalog APL session*## Usage
To activate, execute the following (were `` is the location of MultiLine.dyalog):
```
#.⎕TRAP∪⍨←⊂2 'E' '⎕THIS ⎕SE.MultiLine ⎕IO⊃1↓⎕DM'⊣2⎕SE.⎕FIX'file:///MultiLine.dyalog'
```
You can now use multi-line input in the session, for example:
```
f←{
⍺+⍵
}
2 f 3
5
:if 1
'one'
:else
'zero'
:endif
one
2{
⍺+⍵
}3
5
:namespace foo
goo←+
:endnamespace
2 foo.goo 3
5
```To cancel input, enter a lone `→`.
## Limitations
Does not handle `:Until` followed by `:AndIf`/`:OrIf`.
Does not handle diamonds (`⋄`); use newlines instead.
Errors are re-signalled with error number `500+⎕EN` and the code line will have the trap statement instead of the offending line.