Posted: Mon Apr 23, 2012 4:44 pm Post subject: Adding optional parameters to a procedure
Pretty much my qestion is in the title.
I recall reading in the documentation that
Turing:
proc myProcedure (variableOne :int, [variableTwo :string]) end myProcedure
The above syntax would allow variableOne to be mandatory, and variableTwo to be an optional input. However I get warning (not error) messages when running code like this in my program. Is this incorrect?
Sponsor Sponsor
Tony
Posted: Mon Apr 23, 2012 5:33 pm Post subject: RE:Adding optional parameters to a procedure
you want function overloading
code:
proc myProc(foo : int, bar : string)
% do stuff
end myProc
proc myProc(foo : int)
myProc(foo, "default string")
end myProc