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

2005-09-04 Thread Michael Van Canneyt
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 inte

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

2005-09-04 Thread Pianoman
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); Var I : Integer; begin Result:=0; For I:=0 to High(Args) do // High(args) is the last valid index.