# fixed plus single named param + used optional class OptParam def main is shared x = OptParam() x.value = 0 x.foo('default', nmd=44 ) assert x.value ==44 x.foo('opt', nmd=50, 10 ) #.error. positional arguments must come before all keyword arguments assert x.value ==50 var value = 0 def foo(s as String, nmd as int, nmd2 as int = 0) #print s,i trace nmd .value = nmd if s =='default', assert nmd2 == 0 trace nmd2 .value += nmd2