The following simple example program demonstrates the relational operator. Copy and paste following Euphoria program in test.ex file and run this program −
#!/home/euphoria-4.0b2/bin/eui integer a = 10 integer b = 20 printf(1, "a = b = %d\n", (a = b) ) printf(1, "a != b = %d\n", (a != b) ) printf(1, "a > b = %d\n", (a > b) ) printf(1, "a < b = %d\n", (a < b) ) printf(1, "b >= a = %d\n", (b >= a) ) printf(1, "b <= a = %d\n", (b <= a) )
This would produce the following result. Here 0 represents false and 1 represents true.
a = b = 0 a != b = 1 a > b = 0 a < b = 1 b >= a = 1 b <= a = 0
Previous Page:-Click Here