bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Possible Bug


From: Juergen Sauermann
Subject: Re: [Bug-apl] Possible Bug
Date: Thu, 13 Aug 2015 16:50:34 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Mike,

thanks for reporting this. I believe I have fixed the segfault, SVN 655.
It should have occured only if you open a non-existing file and then try to read from it.

I believe in your function RDFILE you should check NILL in [3] to see if the file
was successfully opened.

You can also have a look at testcases/AP210.tc for a (working) example of using AP210.

Please also note that there are some limitations in the AP210 of GNU APL.
Currently only the APL2 mode (aka. 'A') is supported (I would say that the 'D' and 'T' modes
make only sense on machines that have 1 byte per character).

I can have a look at supporting the missing modes if you really need them.
For new developments, however, I would recommend the FILE_IO library of
GNU APL which has a much nicer API for handling files than AP210.

I will also look at the other issues that you reported.

/// Jürgen


On 08/11/2015 05:41 PM, Mike Duvos wrote:
      ∇RDFILE[⎕]∇
    ∇
[0]   Z←RDFILE X;NILL
[1]   NILL←210 SVOPAIR 'C5' 'D5'
[2]   C5←'IR,',PATH,X,',D'
[3]   NILL←C5
[4]   C5←⎕←2 0,D5
[5]   NILL←C5
[6]   Z←D5
[7]   C5←⍳0
[8]   NILL←⎕SVR 2 2⍴'C5D5'
    ∇

[In APL2]

     RDFILE 'test'
2 0 16
This is a test.
     
[In GNU APL]
 
      RDFILE 'test'

2 0 16
 INVALID SUBCOMMAND at AP210.cc:334

      RDFILE 'test'
               
VALUE ERROR
SVOPAIR[54]  →(1∧.≠⍙_CV/⍙_DC←⍙_PID ⎕SVO ⍙_SV)/⍙_END
                                                                           ^
It also segfaulted once, but I didn't copy it, and now I can't get it to do it again.




reply via email to

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