On Mon, Oct 12, 2015 at 5:48 AM, <[email protected]> wrote: > Why do you choose to write it like this?: > ContentsOfPOST←{⍵, FIO∆fread 0}⍣{⍺⊢FIO∆feof 0}'' > > This method (in my limited knowledge) seems equivalent: > ContentsOfPOST←(FIO∆feof 0) FIO∆fread 0
I don't think it is. FIO∆fread takes as its left argument a number of bytes to read or assumes 5000 when called monadically. FIO∆feof returns either 1 when end-of-file indicator for the stream is set and 0 otherwise. So (FIO∆feof 0) FIO∆fread 0 would try to read zero bytes when EOF is not reached or one byte if it is, and in result it should always return 0 without reading anything. The idea was to read and catenate default-sized blocks until FIO∆feof says we hit the end-of-file and ⍣ allows me to write this succinctly (forgive me if not very readably). -k
