##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: September 2016 # Modified: 2016-10-03/22:55-0400 ##+ # # if.icn, Demonstrate the if emphatic reserved word expression # procedure main() if 1 = 1 then write("yes, one equals one") if 1 = 2 then write("not displayed") else write("one is not equal to two") a := 1 a := if 1 = 2 then write("if fails, a not set, remains 1") write(a) # a will get the then expression result a := if 1 = 1 then 2 write(a) # a will get the else expression result a := if 1 = 2 then 2 else 3 write(a) end