Tutorials Point


  Euphoria Basics
  Euphoria Useful References
  Euphoria Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

Euphoria - Relational Operators


previous next AddThis Social Bookmark Button


The following simple example program demonstrates the relational operators. 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 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

Note: Euphoria supports all the above operations for other Euphoria data types e.g. sequence, atoms and objects.



previous next Printer Friendly



  

Advertisement