Next Atypical Types 18

Typing: Hard to Get Right

Pascal Examples

     var     s : array [1..10] of character;
     s := 'hello';                      { You wish }
     
     {----Thank you sir and may I have another! ----------}
        
     type string = array [1..40] of character;
     procedure error (c: string)
     begin
        write('ERROR: ');
        write(c);
        writeln('');
     end;   
     
     error('File not found');  { In your dreams }
     error('File not found                        ');  { You have to do this }
     error('Please just kill me Mr. Wirth         ');

Wirth agrees that this was a bad move.

And almost every commercial implementation of Pascal fixed this problem.

Not all these fixes were mututally compatible.

Next Copyright © 1999,2008 Mark Dominus