Problem with constant strings in gpc 1.2(2.7.2)#7 ???
Hi, In the users' manual chapter "About Pascal and Extended Pascal languages" there is a small example on how to initialize constant strings. When I try compiling the fragment with gpc 1.2(2.7.2)#7 I get the error messages as showm below. Is this a valid bug or am I just doing something wrong? Cheers, Harry Reed doon@hrc.nevada.edu PS: Great work on GPC! Keep it up!!!! source program --- cut here --- 8< --- cut here --- 8< --- cut here --- program test; const MyStringsCount = 5; type Ident = string(20); var MyStrings : array [1..MyStringsCount] of Ident value [ 1:'EXPORT'; 2:'IMPLEMENTATION'; 3:'IMPORT'; 4:'INTERFACE'; 5:'MODULE']; begin end. compiler output --- cut here --- 8< --- cut here --- 8< --- cut here --- test.pas: In function `test': test.pas:9: parse error before `:' test.pas:9: Set constructor elements must be of ordinal type test.pas:9: missing comma test.pas:9: parse error before `;' test.pas:9: missing comma test.pas:9: parse error before `:' test.pas:9: Set constructor elements must be of ordinal type test.pas:9: missing comma test.pas:9: parse error before `;' test.pas:9: missing comma test.pas:9: parse error before `:' test.pas:9: Set constructor elements must be of ordinal type test.pas:9: missing comma test.pas:9: parse error before `;' test.pas:10: missing comma test.pas:10: parse error before `:' test.pas:10: Set constructor elements must be of ordinal type test.pas:10: missing comma test.pas:10: parse error before `;' test.pas:10: missing comma test.pas:10: initial value is of wrong type
participants (1)
-
Harry Reed