Probably one or two bugs here
you should call it like:
Fntb 'Fntb'
it give a syntax error, fine, so I added a 8 QuadCR (something) and it now
abort (core dump)
)load bug
loading )DUMP file /home/xtian/workspaces/bug.apl...
WAS CLEAR WS
Fntb 'Fntb'
18 96
SYNTAX ERROR
Fntb[10] (line rect)←1 split rect
^ ^
]boxing 8
line
┌→───────────────────────────────────────────────────────────────────────────────────────────────┐
│Z←Fntb function_name;⎕io;rect;split;line
│
└────────────────────────────────────────────────────────────────────────────────────────────────┘
rect
┌→───────────────────────────────────────────────────────────────────────────────────────────────┐
↓⍝
│
│⍝ Remove all trailing blanks from a ⎕cr function_name
│
│⍝ so it will be easy to cut & paste from linux to winblows
│
│⍝
│
│⎕io←1
│
│Z←0⍴''
│
│rect←⎕cr function_name
│
│split←{(,1↑[⍺]⍵) (1↓[⍺]⍵)}
│
│Loop:
│
│→(0=1↑⍴ rect)/reshape
│
│⍴ rect ⍝ for debugging purpose
│
│⍝ 8 ⎕cr (t←1 split rect) ⍝ Added this line for debug purpose and interpretor
aborted core dump│
│(line rect) ← 1 split rect ⍝ First problem, this line give a syntax error
│
│⍝ TODO: effectively remove trailing blanks from "line" before appending to "Z"
│
│Z←Z,⊂line
│
│→Loop
│
│reshape:
│
└────────────────────────────────────────────────────────────────────────────────────────────────┘
)sil
Fntb[10]
⋆
as usual it may be a coding error on my part, but the "aborted core dump" is
quite unusual.
Xtian.
#!/usr/local/bin/apl --script
������������������������������������������������
�
� bug 2015-03-11 21:07:11 (GMT-4)
�
������������������������������������������������
∇Z�Fntb function_name;⎕io;rect;split;line
�
� Remove all trailing blanks from a ⎕cr function_name
� so it will be easy to cut & paste from linux to winblows
�
⎕io�1
Z�0�''
rect�⎕cr function_name
split�{(,1↑[�]�) (1↓[�]�)}
Loop:
→(0=1↑� rect)/reshape
� rect � for debugging purpose
� 8 ⎕cr (t�1 split rect) � Added this line for debug purpose and
interpretor aborted core dump
(line rect) � 1 split rect � First problem, this line give a syntax error
� TODO: effectively remove trailing blanks from "line" before appending to
"Z"
Z�Z,⊂line
→Loop
reshape:
∇
⎕CT�1E¯13
⎕FC�6�(,⎕UCS 46 44 8902 48 95 175)
⎕IO�1
⎕L�0
⎕LX�' '
⎕LX�0�⎕LX
⎕PP�10
⎕PR�' '
⎕PS�0
⎕PW�500
⎕R�0
⎕RL�16807
⎕TZ�-4
⎕X�0