[lazarus] Compiler/Assembler Error

Marc Weustink weus at quicknet.nl
Sat Nov 13 02:27:31 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.








More information about the Lazarus mailing list