Does anyone know if there's a way to create a function in lotusscript, that allows for an optional parameter.
Take for example, something like the Mid$ function.
As defined in Help, it's syntax is:
Mid[$](stringVar, start [, length]) = stringExpr
In other words, you may, or may not, include the Length of the characters you want returned.
I know in VB and VB for Apps, you can use the actual 'Optional' keyword in the function declaration, to say that it is an optional. Something like:
Function TestOpt$(stringVar As String, OPTIONAL StringVar2 As String)
TestOpt$ = stringVar & IIf (Not(IsNull(StringVar2)), StringVar2, " None"
End Function
Yes, very useless example, but I think it explains what I'm looking for.
Thanks-
MoGryph
Take for example, something like the Mid$ function.
As defined in Help, it's syntax is:
Mid[$](stringVar, start [, length]) = stringExpr
In other words, you may, or may not, include the Length of the characters you want returned.
I know in VB and VB for Apps, you can use the actual 'Optional' keyword in the function declaration, to say that it is an optional. Something like:
Function TestOpt$(stringVar As String, OPTIONAL StringVar2 As String)
TestOpt$ = stringVar & IIf (Not(IsNull(StringVar2)), StringVar2, " None"
End Function
Yes, very useless example, but I think it explains what I'm looking for.
Thanks-
MoGryph