Hi Paul,
thanks, fixed in *SVN 1746*.
BTW, GNU APL has as number of *⎕CR *sub-functions which do
pretty much the same as (or occasionally nicer than) the
DISPLAY workspace from IBM APL2. E.g.
*
2 ⎕CR ⊂1 2 3
.→----.
|1 2 3|
'-----'
3 ⎕CR ⊂1 2 3
┏→━━━━┓
┃1 2 3┃
┗━━━━━┛
*
See *⎕CR ⍬* for a full list.
Best Regards,
Jürgen
On 2/3/24 23:22, Paul Rockwell wrote:
GNU APL SVN 1744M running on macOS 14.3 on Apple Silicon.
I copied a function from a workspace (in this case, it's the DISPLAY
function from IBM APL2 transcribed from the book "APL2 At a Glance':
)copy TOOLBOX DISPLAY
SAVED 2024-02-03 16:54:36 (GMT-5)
I then attempted to run DISPLAY:
DISPLAY 'ABC'
which resulted in the following:
==============================================================================
Assertion failed: start <= body_from_to.low
in Function: set_error_info
in file:
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Executable.cc:603
......... useless lines redacted ...........
SI stack:
Depth: 3
Exec: 0x117f04230
Safe exec: 0
Pmode: ∇ DISPLAY[4]
PC: 4 (561) VALUE1«≡⊏4⊐S←⍴A»
Stat: ⍎(0=⎕NC 'S')/'S←⍴A'
err_code: 0x0
Depth: 2
Exec: 0x600000d98050
Safe exec: 0
Pmode: ◊ DISPLAY 'ABC'
PC: 3 (4) RETURN_STATS
Stat: DISPLAY 'ABC'
err_code: 0x0
Depth: 1
Exec: 0x117f04230
Safe exec: 0
Pmode: ∇ DISPLAY[4]
PC: 4 (561) VALUE1«≡⊏4⊐S←⍴A»
Stat: ⍎(0=⎕NC 'S')/'S←⍴A'
err_code: 0xA01
thrown at:
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Executable.cc:603
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 0
Exec: 0x600000d906e0
Safe exec: 0
Pmode: ◊ DISPLAY 'ABC'
PC: 3 (4) RETURN_STATS
Stat: DISPLAY 'ABC'
err_code: 0x0
Examining the call trace in a debugger shows the error is being thrown
starting with the following code at line 2358 in Prefix.cc:
*void*
Prefix::reduce_END_B__()
{
Assert1(prefix_len == 2);
*if* (size() != 2) syntax_error(LOC); // <- this is the line
throwing the error
If I clear the workspace, copy the function, display the function,
and then run it, no error occurs:
)clear
CLEAR WS
)COPY TOOLBOX DISPLAY
SAVED 2024-02-03 16:54:36 (GMT-5)
∇DISPLAY[⎕]∇
∇
[0] D←S DISPLAY A;⎕IO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B
....... function display redacted for clarity ..........
∇
DISPLAY 'ABC'
.→--.
|ABC|
'---'
I've attached a copy of the TOOLBOX workspace with the function that
exhibits the error.
- Paul