Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-11

Compiler/Assembler Error

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink

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[(A0)];
  //Result := FUNRESULT[FALSE];
  //NOT OK
  //Result := FUNRESULT[(A0) and (B0)];
  Result := FUNRESULT[FALSE and TRUE];
end;
begin
  // Any value will do
  Test(1,2);
end.

Reply by email

Peter Vreman
to Marc Weustink
Show quoted text 32 lines
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[(A0)]; //Result := FUNRESULT[FALSE]; //NOT OK //Result := FUNRESULT[(A0) and (B0)]; Result := FUNRESULT[FALSE and TRUE]; end; begin // Any value will do Test(1,2); end.

Both Fixed

Peter

Reply by email