Re: [fpc-pascal] optional parameter

2010-05-03 Thread spir ☣
On Mon, 3 May 2010 14:28:13 -0300 Flávio Etrusco wrote: > > Needed to change the > > parameter to be a pointer to the record instead (so the default can be > > nil), but this creates a > > trap for the calling code. > > Else, is there a common trick or workaround? > > > > What trap? Simply t

Re: [fpc-pascal] optional parameter

2010-05-03 Thread spir ☣
On Mon, 03 May 2010 19:15:57 +0100 Martin wrote: > On 03/05/2010 10:58, spir ☣ wrote: > > Hello, > > > > A few questions on the topic: > > > > * Is it possible to define an optional parameter without default value? > > > > * Is it at all possible for an optional *argument* not to be the last in

Re: [fpc-pascal] optional parameter

2010-05-03 Thread Martin
On 03/05/2010 10:58, spir ☣ wrote: Hello, A few questions on the topic: * Is it possible to define an optional parameter without default value? * Is it at all possible for an optional *argument* not to be the last in actual call? Eg procedure p(a:Integer=0 ; b:Integer=0) How can the

Re: [fpc-pascal] optional parameter

2010-05-03 Thread Flávio Etrusco
2010/5/3 spir ☣ : > Hello, > > A few questions on the topic: > > * Is it possible to define an optional parameter without default value? > > * Is it at all possible for an optional *argument* not to be the last in > actual call? Eg >     procedure p(a:Integer=0 ; b:Integer=0) >  How can the caller

[fpc-pascal] optional parameter

2010-05-03 Thread spir ☣
Hello, A few questions on the topic: * Is it possible to define an optional parameter without default value? * Is it at all possible for an optional *argument* not to be the last in actual call? Eg procedure p(a:Integer=0 ; b:Integer=0) How can the caller pass b and not a? * The ref sta