Sign in Join

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

Mailing lists / fpc-devel / 2003-07

1.1 default parameters

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Yakov Sudeikin

Hi there,

I have seen 1.1 understanding default parameters for a very long time, now the compiler ignores them and demands for explicit value to be passed in any case.

procedure test(a: integer = 0);
test(1);
test();  //compiler will fail

Am I missing something? Could that be that I need a command line switch to turn them on? OR I suggest propery they are just not implemented at the time? I understand this is because the parameter handling is in major development? Any projection on how soon it can be back and working? Any help needed?

Thanks,
Yakov

Reply by email

Peter Vreman
to Yakov Sudeikin
Show quoted text 16 lines
Hi there, I have seen 1.1 understanding default parameters for a very long time, now the compiler ignores them and demands for explicit value to be passed in any case. procedure test(a: integer = 0); test(1); test(); //compiler will fail Am I missing something? Could that be that I need a command line switch to turn them on? OR I suggest propery they are just not implemented at the time? I understand this is because the parameter handling is in major development? Any projection on how soon it can be back and working? Any help needed?

The next program compiles fine with both -Sd and -S2 command line options.

procedure p(a:integer=0);
begin
end;
begin
  p;
  p();
end.

Reply by email