bug-apl
[Top][All Lists]
Advanced

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

[Bug-apl] ⎕FIO[49]


From: Juergen Sauermann
Subject: [Bug-apl] ⎕FIO[49]
Date: Thu, 19 Jan 2017 15:17:44 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi,

I have added ⎕FIO[49] to GNU APL in SVN 858.

Z←⎕FIO[49] 'filename' reads the file named filename line by line and stores every line
of the file in one enclosed item of result vector Z , for example (file x has 3 lines):

      ⊃ ⎕FIO[49] 'x'
 Line 1
 Line 2
 Line 3

The end of line character (LF = '\n') character possibly a trailing CR = '\r' character is being removed in the process.

⎕FIO[49] accepts an optional left function argument F which is a monadic conversion function.
The conversion functions F is called with every line read and the result of the function
is then stored in Z. for example:

      ⍪⊃ {'x: ', ⍵} ⎕FIO[49] 'x'
x: Line 1
x: Line 2
x: Line 3


/// Jürgen


reply via email to

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