Fixed length records: Difference between revisions

Content added Content deleted
(→‎{{header|J}}: Fix misunderstanding of specs)
Line 346: Line 346:
<lang j> _80 ]\ fread 'flr-infile.dat' NB. reads the file into a n by 80 array
<lang j> _80 ]\ fread 'flr-infile.dat' NB. reads the file into a n by 80 array
_80 |.\ fread 'flr-infile.dat' NB. as above but reverses each 80 byte chunk
_80 |.\ fread 'flr-infile.dat' NB. as above but reverses each 80 byte chunk
'flr-outfile.dat' fwrites~ _80 |.\ fread 'flr-infile.dat' NB. as above but writes result separated by newline chars to file (729 bytes)</lang>
'flr-outfile.dat' fwrite~ , _80 |.\ fread 'flr-infile.dat' NB. as above but writes result to file (720 bytes)</lang>


=={{header|jq}}==
=={{header|jq}}==