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
Title: xxx.apl
⍝ ⍝ Author: Alex Weiner ⍝ Date: June 27, 2015 ⍝ Copyright: Copyright (C) 2015 by AlexWeiner ⍝ License: LGPL see http://www.gnu.org/licenses/gpl-3.0.en.html ⍝ email: alexwei...@alexweiner.com ⍝ Portability: L3 ⍝ ⍝ Purpose: ⍝ Read in a text file that space seperated records and parse it into a n×m size matrix ⍝ only supports two columns right now ⍝ Description: ⍝ Matrix←ReadTableData 'name of the file' ⍝ )COPY 5 FILE_IO.apl filedata←{FIO∆read_file ⍵} lineends←{⊃⍵⊂⍨~⎕av[⎕io+10]=⍵} mat←{lineends filedata ⍵} rows←{1↑⍴ ⍵} table←{((rows ⍵),2)⍴(,~' '=⍵)⊂,⍵} ReadTableData←{table mat ⍵} ]NEXTFILE ⍝ ⍝ EOF⍝