bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Submission for GNU APL Bits_and_Pieces directory


From: Juergen Sauermann
Subject: Re: [Bug-apl] Submission for GNU APL Bits_and_Pieces directory
Date: Tue, 30 Jun 2015 19:51:13 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Alex,

very good, thank you very much. I have added it as:

http://www.gnu.org/software/apl/Bits_and_Pieces/File_Table_Reader.apl.html

//// Jürgen


On 06/30/2015 04:57 AM, address@hidden wrote:
This revision adds the following:
1.switch from ⎕av to ⎕ucs
2. works for >2 columns
3. Left argument is the record separator. I didn't make it optional because I like the visual aid in the code rather than having to remember an arbitrary default case. 
4. On Louis' suggestion, it now supports "Quoted Data", incase your data item contains a comma
5. Against Louis' suggestion, I never count the number of delimiters and add 1. :)

Please see attached
-Alex
-------- Original Message --------
Subject: Re: [Bug-apl] Submission for GNU APL Bits_and_Pieces directory
From: Juergen Sauermann <address@hidden>
Date: Mon, June 29, 2015 3:05 am
To: address@hidden, address@hidden

Hi Alex,

thanks for offering this. I would change a few things to make that code even more useful:

- make the separator an (ideally optional) left argument of ReadTableData.
  Many data files are written in CSV (comma separated values) format which uses comma instead of space,

- use ⎕UCS instead of ⎕AV to make the code more portable between different APL interpreters,

- and maybe make it work for > 2 columns (by guessing the number of columns from the first line in the file).

/// Jürgen



On 06/27/2015 11:26 PM, address@hidden wrote:
Hi Bug-apl,
I am soliciting feedback (as per the process) of the attached APL code that will take a file  that has a layout of two columns (space separator) and return a matrix.

-Alex



reply via email to

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