Fixed length records: Difference between revisions

Content added Content deleted
Line 339:
goback.
end program unblocking.</lang>
 
=={{header|Julia}}==
The program reads from an "infile.dat" file created with dd, as described in the task instructions.
<lang julia>
function processfixedlengthrecords(infname, blocksize, outfname)
inf = open(infname)
outf = open(outfname, "w")
filedata = [ read(inf, blocksize) for _ in 1:10 ]
for line in filedata
s = join([Char(c) for c in line], "")
@assert(length(s) == blocksize)
write(outf, s)
end
end
processfixedlengthrecords("infile.dat", 80, "outfile.dat")
</lang>
 
 
=={{header|Go}}==