[fpc-pascal] Re: Re: arbitrary number of parameters in procedure

Michael Van Canneyt michael at freepascal.org
Sun Sep 4 11:54:28 CEST 2005



On Sun, 4 Sep 2005, Pianoman wrote:

> Hi Michael, I tested your proc but it don't want to ccompile .
> program follows:
> program test;
> var a,b,c,d:integer;
> res:double;
> 
> 
> Procedure AddNums(Var Result : Double; Args : Array of integer);

This must be "array of const", not "Array of integer".

Michael.

> -
> And one more question the header of procedure looks like addnums(var result,
> and ind square brackets the other params but what if I want all params to be
> in normal () like in writeln?

You can't have that. 
Writeln() and Readln() are anomalies, and require special compiler magic.

Michael.



More information about the fpc-pascal mailing list