4 ms·
Niklaus Wirth would concur - that was similar to his argument for pascal - strings contain a size.
by chadcmulligan 6y ago
Niklaus Wirth would concur - that was similar to his argument for pascal - strings contain a size.
- mark-r 6y agoIt's a shame that Niklaus Wirth doesn't get more respect and attention. But some of his ideas were just a little ahead of their time - I think the typical size for a Pascal string was just a single byte, which was a bit too limiting.
- kps 6y agoWirth's Pascal didn't have a string type. You could have a fixed-length arrty of CHAR, but you couldn't have _fewer_ than 16 characters in a 16-character array, and you couldn't pass a 16-character-array to a function with a 256-character-array parameter. Only the magic ‘functions’ built in to the language like write() could accept strings of different lengths. Since this made the language worse than FORTRAN and handling text, most implementations added some sort of string handling.
- pjmlp 6y agoIncluding the 2nd revision of Pascal, ISO Extended Pascal.