# fixed and 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 as int = 1) # optional single param #print s,i if s == 'default' assert i ==1 .call = i