bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Probably one or two bugs here


From: Christian Robert
Subject: Re: [Bug-apl] Probably one or two bugs here
Date: Wed, 11 Mar 2015 21:35:10 -0400
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Here the bug.apl script

it looks like it may be unusable in my original email.

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


On 2015-03-11 21:19, Christian Robert wrote:
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]