[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-apl] ⎕INP ignores parts of its input (Re: she bang script argument
From: |
Kacper Gutowski |
Subject: |
[Bug-apl] ⎕INP ignores parts of its input (Re: she bang script arguments) |
Date: |
Thu, 2 Jun 2016 07:50:39 +0200 |
I came up with this silly variant of APL-in-shell embedding:
#!/bin/sh
true ←⎕inp'#'
exec apl --script "$0" -- ${1+"$@"} #
)erase true
But I think there's something wrong with ⎕INP, actually.
In the example above, true is ⍬ (sic) just before erasing.
]BOXING 8
⎕INP "E"
AE
┌⊖┐
│0│
└─┘
⎕INP "E"
A
BE
┌→──┐
│┌⊖┐│
││ ││
│└─┘│
└∊──┘
⎕INP "E"
A
B
CE
┌→──────┐
│┌→┐ ┌→┐│
││A│ │B││
│└─┘ └─┘│
└∊──────┘
I was surprised that delimiter doesn't have to be at the beginning of
the line. I don't know if that's intentional that everything before
it on that line is ignored, but the whole input gets ignored when
there is only a single line of it before the line containing the
delimiter, and that's certainly wrong.
-k
- [Bug-apl] ⎕INP ignores parts of its input (Re: she bang script arguments),
Kacper Gutowski <=