if?

perform action, if given condition is not false or null and return condition result


Parameters

if? condition :any
    action :block

Returns

  • :logical

Examples

copy
x: 2 result: if? x=2 -> print "yes, that's right!" ; yes, that's right! print result ; true

copy
x: 2 z: 3 if? x>z [ print "x was greater than z" ] else [ print "nope, x was not greater than z" ]

Related