Please Friends, I have uninstalled the old Lazarus IDE - 1.4.2 and downloaded the latest IDE, also have installed it. As a newbie and still learning the language by using the IDE; on the old one - Lazarus IDE 1.4.2, I have some tutorial questions or DIY assignment program from a book am learning from as the book do give some questions at the end of every chapter. After I have installed the new version 1.6.0, I tried to continue with the tutorial but I realized that compiling and running a program from the 1.6.0 version fails, went back to the old programs I have written before and tried to open anyone of them, none could compile and run, the "begin.... end." statement is what is highlighted as the error and I don't know why. If you guys don't mind me posting a simple DIY program done by me:
program ArithmeticFunction;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ Arithmetic Standard Functions};
CONST
Pi = 3.14159;
begin
Writeln('SQR(3) : ', SQR(3)); {Power of 2}
Writeln('SQR(3) * 3 : ', SQR(3) * 3); {Power of 3}
Writeln('SQR(SQR(3)) : ', SQR(SQR(3))); {Power of 4}
Writeln('SQR(2.5) : ', SQR(2.5) :0:2);
Writeln('SQRT(16) : ', SQRT(16) :0:2);
Writeln('ABS(-45.65) : ', ABS(-45.65) :0:2);
Writeln('LN(EXP(1) : ', LN(EXP(1)) :0:2);
Writeln('ARCTAN(1) : ', ARCTAN(1) * 180/Pi :0:0, ' degrees');
Writeln('FRAC(8.22) : ', FRAC(8.22):2:2); { Fractional function}
Writeln('INT(8.22) : ', INT(8.22):2:2); {Fractional function}
Writeln(RANDOM:2:2);
Writeln(RANDOM(5));
Readln;
end.
THE ERROR MESSAGE BELOW:
Compile Project, Target: ArithmeticFunction.exe: Exit code 1, Errors: 13
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol PASCALMAIN
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol main
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol INITFINAL
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol FPC_THREADVARTABLES
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol FPC_RESOURCESTRINGTABLES
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol FPC_WIDEINITTABLES
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol FPC_RESSTRINITTABLES
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol __heapsize
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol __fpc_valgrind
ArithmeticFunction.pas(27,1) Error: Multiple defined symbol $unwind$main
ArithmeticFunction.pas(27,1) Error: Undefined symbol: IID_$TYPES_$$_ISTREAM
ArithmeticFunction.pas(27,1) Error: Undefined symbol: IIDSTR_$TYPES_$$_ISTREAM
ArithmeticFunction.pas(27,1) Error: Undefined symbol: RTTI_$TYPES_$$_ISTREAM
Please, I need someone, anyone to help me rectify this bug. Thanks and God bless