GLBasic forum

Main forum => GLBasic - en => Topic started by: aroldo on 2013-Aug-06

Title: Passing Optional Parameters
Post by: aroldo on 2013-Aug-06
Is it possible to have optional parameters in FUNCTIONS?


For instance in the example below z may be optional.

Code (glbasic) Select
FUNCTION object: x, y, z (as optional)
        .
        .
        .
ENDFUNCTION
Title: Re: Passing Optional Parameters
Post by: kanonet on 2013-Aug-06
It is:

Code (glbasic) Select
FUNCTION object: x, y, z=3
        .
        .
        .
ENDFUNCTION
Title: Re: Passing Optional Parameters
Post by: aroldo on 2013-Aug-06
Thank you
Title: Re: Passing Optional Parameters
Post by: Emil on 2013-Aug-09
have been wondering about that for quite some time :)
thanks!