with math from std:mathfuncsinc(x float) put x !=0.0? math.sin(x)/x :1.0end
Null-conditional operator ::
The null conditional operator checks if the left side of the operator evaluates to null. If it does, the statement on the right side of the operator is executed and returned.
Example
with exceptions from std:exceptionswith console from std:iovar doStuff = { x => x :: raise exceptions.ArgumentNullException("{} is null".format(nameof(x)))}trydoStuff(null)catch(default e) console.out(e.message)end//Output: x is nullfuncadd(a,b) requires (a :: false) and (b :: false) put a + bend
with params from std:paramswith exceptions from std:exceptionswith str from std:stringwith Int from std:intvar a =params.get(0)var b =params.get(1)a :: raise exceptions.ArgumentNullException("{} is null".format(nameof(a)))b :: raise exceptions.ArgumentNullException("{} is null".format(nameof(b)))var number = a < b ? b : avar numberFromString =Int.parse(value="This is not an integer", raise=false)//one could also use int("This is not an integer")var numberFromStringNullchecked = numberFromString :: 0