Hello!
I got rid of some problems with changing code from Turbo Pascal (from eighteen years ago) to Free Pascal (Dev-Pascal). Those problems were changing integer into smallint and erasing nested comments.
Now I've got problems with labels.
All results of "200", "label" and "goto":
69: menu1[4]:='Library ';
732: procedure axesimu;
733: label 0200;
744: case vv of
747: 3: Goto 0200;
881: 200: window(1,1,80,25); ClrScr;
884: procedure TwoAxles;
885:label 100;
1025: if (zn='N') or (zn='n') then goto 100;
1752: procedure library;
1871: 4: library;
Without any changes:
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\02trc~1.pas
02trc~1.pas(1,2) Warning: Unsupported switch $N
02trc~1.pas(401,5) Note: Local variable EM1 not used
02trc~1.pas(881,1) Error: Identifier not found 200
02trc~1.pas(881,4) Error: Illegal expression
02trc~1.pas(881,4) Fatal: Syntax error, ; expected but : found
After adding to the second line {$GOTO ON}
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\02trc~1.pas
02trc~1.pas(1,2) Warning: Unsupported switch $N
02trc~1.pas(402,5) Note: Local variable EM1 not used
02trc~1.pas(882,1) Error: Identifier not found 200
02trc~1.pas(882,4) Error: Illegal expression
02trc~1.pas(882,4) Fatal: Syntax error, ; expected but : found
After changing from
200: window(1,1,80,25); ClrScr;
to
window(1,1,80,25); ClrScr;
compilation errors:
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\02trc~1.pas
02trc~1.pas(1,2) Warning: Unsupported switch $N
02trc~1.pas(402,5) Note: Local variable EM1 not used
02trc~1.pas(883,1) Error: Label used but not defined 0200
02trc~1.pas(1750,11) Fatal: Syntax error, identifier expected but LIBRARY found
After changing into:
label 200; window(1,1,80,25); ClrScr;
errors:
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\02trc~1.pas
02trc~1.pas(1,2) Warning: Unsupported switch $N
02trc~1.pas(402,5) Note: Local variable EM1 not used
02trc~1.pas(882,8) Error: Illegal expression
02trc~1.pas(882,8) Error: Illegal expression
02trc~1.pas(882,8) Fatal: Syntax error, ; expected but ordinal const found
After changing into
window(1,1,80,25); ClrScr;
And changing 734:
label 0200;
into
label lab200;
And 748:
3: Goto 0200;
into
3: Goto lab200;
And 886:
label 100;
into
label lab100;
And 1026:
if (zn='N') or (zn='n') then goto 100;
into
if (zn='N') or (zn='n') then goto lab100;
And 1069
100: ClrScr;
into
label lab100; ClrScr;
The errors:
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\02trc~1.pas
02trc~1.pas(1,2) Warning: Unsupported switch $N
02trc~1.pas(402,5) Note: Local variable EM1 not used
02trc~1.pas(883,1) Error: Label used but not defined LAB200
02trc~1.pas(1069,7) Error: Illegal expression
02trc~1.pas(1069,7) Error: Illegal expression
02trc~1.pas(1069,7) Fatal: Syntax error, ; expected but identifier LAB100 found
The last one thing which I tried was to add at the beginning of the code three things (on the file with no changes):
{$GOTO ON}
{$mode tp}
{$asmmode intel}
And errors:
Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\dev-pas\company\trc.pas
trc.pas(1,2) Warning: Unsupported switch $N
trc.pas(404,5) Note: Local variable EM1 not used
trc.pas(885,1) Error: Label used but not defined 0200
trc.pas(1752,11) Fatal: Syntax error, identifier expected but LIBRARY found
Greetings!