Charles,
Will optional parameters for overloaded functions be offered in the future or are they supposed to work now?
Your overloaded example works fine but adding optional causes only the last foo function to be called.
% filename "overloading2.exe"
uses rtl64
'FUNCTION OVERLOADING
'====================
function foo (long v, optional string os) as string
print os
return "long " v
end function
function foo (double v, optional string os ) as string
print os
return "double " v
end function
function foo (string v, optional string os) as string
print os
return "string " v
end function
long l=42
double d=42.5
string s="43"
print foo (l,"l")
print foo (d,"d")
print foo (s,"s")
Another related question
Is the keyword "optional" optional
with functions that have default parameters?
I noticed in some of your examples you just assign a value:
Function abc(sys i,sys n=17) As sys
Function abc(sys i,optional sys n=17) As sys
James