Ian (lovingboth) wrote,

  • Mood:


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.
Tags: highlights, site

  • Failing as snow again, never wanted to..

    A tiny bit, but gosh, this will have been the snowiest winter in London for ages. The walk to school did help me wake up a bit (although I feel the…

  • One for Bad Science?

    Hmm, a Press Association story saying breastfeeding has almost no benefits to the baby has been picked up by the Mail and the Telegraph and... with…

  • Two recent stories

    I've forgotten to go 'hooray' here over this story from a couple of weeks ago: Food labels advice change over Palestinian territories. I am happy to…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened