It not a joke!!! It is the truth!!!

Giving people what they want: violence and sloppy eating

Previous Entry Share Next Entry
Legacies
mini me + poo
lovingboth
I needed to write a quick program to extract some data from a binary file today, so I reached for Borland Pascal 7. The actual program took a couple of minutes to get right... most of it because of a 'feature': if you open a file in binary (as opposed to text) mode, you have to say how many bytes you will read at a time.

If you forget - as I do every so often - it defaults to... 128 bytes.

Why 128 bytes rather than one?

Because that was the size of a sector on the original 8" floppy disk, which had 77 tracks of 26 sectors back in the early 1970s. Early versions of CP/M could only read and write in 128 byte chunks, and Turbo Pascal was originally released for CP/M, so that was the sensible value for the default.

  • 1
(Deleted comment)
  • 1
?

Log in