# single optional param class OptParam def main is shared x = OptParam() x.call = 0 x.foo('default') assert x.call ==1 x.foo('provided',10) assert x.call == 10 var call =0 def foo(s as String, i = nil) # optional single (dynamic) param #print s,i if s == 'default' assert i == nil i = 1 .call = i