[lazarus] Compiler/Assembler Error

Peter Vreman peter at freepascal.org
Tue Nov 16 01:53:53 EST 1999



>When I compile the following code I get this result:
>  Target OS: Linux for i386
>  Compiling cptest.pp
>  Assembling (pipe) cptest.s
>  Linking cptest
>  {standard input}: Assembler messages:
>  {standard input}:73: Error: expecting operand before ','; got nothing
>
>I saw it before on the list and thought it was fixed.
>Marc
>
>-----------------------------
>program CompilerTest;
>{$mode objfpc}
>
>function Test(A, B: Integer): Integer;
>const
>   FUNRESULT: array[Boolean] of Integer = (0,1);
>begin
>   //OK
>   //Result := FUNRESULT[(A<>0)];
>   //Result := FUNRESULT[FALSE];
>
>   //NOT OK
>   //Result := FUNRESULT[(A<>0) and (B<>0)];
>   Result := FUNRESULT[FALSE and TRUE];
>end;
>
>begin
>   // Any value will do
>   Test(1,2);
>end.
Both Fixed

Peter






More information about the Lazarus mailing list