Out parameter in procedure produces error
Original Reporter info from Mantis: si2dharth
-
Reporter name: Siddharth
Original Reporter info from Mantis: si2dharth
- Reporter name: Siddharth
Description:
As 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 switches.inc} statement.
Isn't "out" supposed to work without the switches.inc?
Steps to reproduce:
Try the program:
Program prob;
procedure dummy(out x:integer);
begin
x:=1;
end;
var i:integer;
begin
dummy(i);
writeln(i);
end.
Mantis conversion info:
- Mantis ID: 18290
- Version: 2.4.2