View Issue Details

IDProjectCategoryView StatusLast Update
0018290FPCCompilerpublic2010-12-22 14:43
ReporterSiddharth Assigned ToJonas Maebe  
Status resolvedResolutionno change required 
Product Version2.4.2 
Summary0018290: Out parameter in procedure produces error
DescriptionAs I know, the procedure can be declared as:
    Procedure GetPosition(out x1,y1,x2,y2:integer);

But, the compiler gives an error
"Fatal: Syntax error, ":" expected but "identifier X1" found"
at the position after out.

Now, this error vanishes when I use the {$INCLUDE} statement.

Isn't "out" supposed to work without the
Steps To ReproduceTry the program:

Program prob;

procedure dummy(out x:integer);

var i:integer;
TagsNo tags attached.
Fixed in Revision
Attached Files



2010-12-22 14:41

reporter   ~0044490

Sorry... not the {$INCLUDE}, but {$MODE DELPHI}...
But, that produces errors in overloading...

Jonas Maebe

2010-12-22 14:43

manager   ~0044491

Add *one* of the following to your program:

{$mode delphi} -- Delphi language mode enables support for "out"
{$mode objfpc} -- idem for ObjFPC language mode
{$modeswitch out} -- remain in the default (FPC) language mode, and only enable "out"

Please use the mailing lists to ask questions like this in the future:

Issue History

Date Modified Username Field Change
2010-12-22 14:09 Siddharth New Issue
2010-12-22 14:41 Siddharth Note Added: 0044490
2010-12-22 14:43 Jonas Maebe Status new => resolved
2010-12-22 14:43 Jonas Maebe Resolution open => no change required
2010-12-22 14:43 Jonas Maebe Assigned To => Jonas Maebe
2010-12-22 14:43 Jonas Maebe Note Added: 0044491