Re: [fpc-pascal] same routine with different parameters?

2013-10-30 Thread Sven Barth
Am 29.10.2013 20:32, schrieb waldo kitty: On 10/29/2013 1:56 PM, Sven Barth wrote: Am 29.10.2013 18:21 schrieb waldo kitty wkitt...@windstream.net: example: procedure MyObject.MyRoutine; procedure MyObject.MyRoutine(VarA : SomeType); procedure MyObject.MyRoutine(VarA

Re: [fpc-pascal] same routine with different parameters?

2013-10-30 Thread Sven Barth
Am 29.10.2013 19:35, schrieb Mark Morgan Lloyd: waldo kitty wrote: question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the

Re: [fpc-pascal] same routine with different parameters?

2013-10-30 Thread Sven Barth
Am 29.10.2013 20:40, schrieb waldo kitty: FWIW: i decided to try this because i was unable to (hope i'm using the proper terms here) derive a new object from the existing one and override this one inherited routine with my modifications... this would allow me to add my own variables to the

Re: [fpc-pascal] same routine with different parameters?

2013-10-30 Thread Sven Barth
Am 30.10.2013 02:06, schrieb waldo kitty: Assume that this is for value parameters only. In particular, I don't think there's a way of defaulting a var parameter to a nil pointer. hummm... the original has no parameters at all... my addition has two... will this be a problem? no, i've not

[fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality quite a lot with existing routines... description: i have a

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Sven Barth
Am 29.10.2013 18:21 schrieb waldo kitty wkitt...@windstream.net: question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Mark Morgan Lloyd
waldo kitty wrote: question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality quite a lot with existing routines...

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 1:56 PM, Sven Barth wrote: Am 29.10.2013 18:21 schrieb waldo kitty wkitt...@windstream.net: example: procedure MyObject.MyRoutine; procedure MyObject.MyRoutine(VarA : SomeType); procedure MyObject.MyRoutine(VarA : string; VarB: integer); at one point,

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 2:35 PM, Mark Morgan Lloyd wrote: waldo kitty wrote: example: procedure MyObject.MyRoutine; procedure MyObject.MyRoutine(VarA : SomeType); procedure MyObject.MyRoutine(VarA : string; VarB: integer); at one point, the first instance would be used... at another

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Mark Morgan Lloyd
waldo kitty wrote: Another useful variant is giving *the* *last* parameter an optional value, which will allow you to omit the parameter: procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1); very interesting... will this work with both parameters, too? i don't think i

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 6:53 PM, Mark Morgan Lloyd wrote: waldo kitty wrote: Another useful variant is giving *the* *last* parameter an optional value, which will allow you to omit the parameter: procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1); very interesting... will this work