Unexplainable compilation errors
Posted: Fri Jan 21, 2022 3:12 pm
$ pascal/ver
VSI Pascal Alpha V6.2-125 on OpenVMS Alpha V8.4-2L1
$
Two almost equal files: the only difference is input selection criteria and display of relevant data; the basic structure is:
Both files did compile correctly, but after moving some files between inherited sources (moved constants and types) both fail on the following errors:
VSI Pascal Alpha V6.2-125 on OpenVMS Alpha V8.4-2L1
$
Two almost equal files: the only difference is input selection criteria and display of relevant data; the basic structure is:
Code: Select all
[inherit ('Starlet','pascal$lib_routines',
'CMSPEN:WGCMS_CONSTANTS',
'CMSPEN:WGCMS_TYPES',
'CMSPEN:WGCMSPOST_INTERFACE',
'CMSPEN:WGCMSPOST_RMS',
'CMSPEN:WGCMS_ROUTINES')]
program testReadByDate (INPUT,OUTPUT);
...
Procedure ShowPost;
var
_Date: integer;
_Seq: integer;
_Out: text;
begin
OPEN( FILE_VARIABLE :=_OUT,
FILE_NAME := 'SYS$OUTPUT:',
CARRIAGE_CONTROL := NONE,RECORD_LENGTH := 8192 );
rewrite (_OUT);
_Date := _PostMeta^.DatNr div 100;
_Seq := _PostMeta^.Datnr rem 100; { line 46 }
WRITELN(_OUT, ''(LF)'=================='(CR)'');
{ Show selection and post^ data }
WRITELN(_OUT, ''(LF)'text=' + _Text+''(CR)'' );
close (_OUT);
end;
begin
WRITE ('Enter publication date: '); { or Number } { line 64 }
READLN (_D) ;
{Get the data into _Post^}
if _Post <> nil then
begin
ShowPost;
end else
WRITELN( ''(LF)'Could not read post ' +''(CR)'' );
...
repeat
WRITELN (''(LF)'============================================='(CR)'');
WRITE ('Prev/Next/Stop (P|N|S, -|+|. '); { line 85}
READLN (_R) ;
{ Process input: get next or previous record and display data}
..
until (_r[1] ="S") or (_r[1] = '.') ;
...
end.
Code: Select all
_Seq := _PostMeta^.Datnr rem 100;
.............................^
%PASCAL-E-SYNSEMMODI, Syntax: ";", "::" , "^", "." or "[" expected
at line number 46 in file WGCMS_ROOT:[SRC]testReadByDate.pas;58
WRITE ('Enter publication date (format yyyymmdd): ');
....^
%PASCAL-E-NOTAVAR, WRITE is not declared as a variable
at line number 64 in file WGCMS_ROOT:[SRC]testReadByDate.pas;58
WRITE ('Enter publication date (format yyyymmdd): ');
..........^
%PASCAL-E-SYNASSIGN, Syntax: ":=" expected
at line number 64 in file WGCMS_ROOT:[SRC]testReadByDate.pas;58
WRITE ('Prev/Next/Stop (P|N|S, -|+|. ');
........^
%PASCAL-E-NOTAVAR, WRITE is not declared as a variable
at line number 85 in file WGCMS_ROOT:[SRC]testReadByDate.pas;58
WRITE ('Prev/Next/Stop (P|N|S, -|+|. ');
..............^
%PASCAL-E-SYNASSIGN, Syntax: ":=" expected
at line number 85 in file WGCMS_ROOT:[SRC]testReadByDate.pas;58
%PASCAL-E-ENDDIAGS, PASCAL completed with 5 diagnostics