3 ms·
In C, a pointer can point to any old memory address, including core elements of the machine's BIOS and operating system. In Pascal, an array is an array, not n
by pjmorris 12y ago
In C, a pointer can point to any old memory address, including core elements of the machine's BIOS and operating system. In Pascal, an array is an array, not necessarily tied to anything in the machine.
I think that's the great strength and great weakness of each language.
- pjmlp 12y ago> In C, a pointer can point to any old memory address, including core elements of the machine's BIOS and operating system You mean var buffer : array [0..$3FFF] of byte absolute $B800:$0 ? An array, protected with bounds checking accessing any memory address, provided the OS protection allows it. Don't want bounds checking? Make use of {$R-}
- kjs3 12y agoTo be fair, the rant (and most of the misconceptions) about Pascal are about Wirth defined Pascal, not the much later extended Pascals that introduced things like "byte absolute" types. But you're right in that no one has probably tried to suffer through strict Wirthian Pascal since the last CDC Cyber got shut down except on a bet. (Turbo Pascal on CP/M-80 was my goto for a number of years)