ooPIC Logo

Relational Operators

Main Index
Language Idx
Back to top of pageDescription:

 

An Operator that performs a relational conjunction on the surrounding expressions.
Back to top of pageSyntax:
 

The following shows the format of the Relational Operator syntax.
 Visual Basic & BASICC & Java
Equal to
<exp1> = <exp2>
<exp1> == <exp2>
Not equal to
<exp1> <> <exp2>
<exp1> != <exp2>
Greater than
<exp1> > <exp2>
<exp1> > <exp2>
Less than
<exp1> < <exp2>
<exp1> < <exp2>
Greater than or equal to
<exp1> >= <exp2>
<exp1> >= <exp2>
Less than or equal to
<exp1> <= <exp2>
<exp1> <= <exp2>

The following table lists the elements of the Relational Operator syntax.
ElementDescription
<exp1>Any valid exp.
<exp2>Any valid exp.

Back to top of pageOperation:
 

When a Relational Operator is encountered during the program's execution, it compares <exp1> with <exp2> in the specified manner. If the specified relationship is true, then a value of 1 is returned, otherwise a value of 0 is returned.

If multiple conditions are being used, each relational condition must be enclosed in parentheses () and separated by logical operators.

Back to top of pageExample:
 

In the following example, the statements are executed if the value of A is equal to 1.
Visual Basic & BASICC & Java
If A=1 Then
  <statements>
End If

If (A==1) {
  <statements>
}

Back to top of pageRelated Items:

 Arithmetic Operators

Bitwise and Logical Operators

Back to top of pageVersion History and Bug List:
 Firmware Ver A1: Introduced.

Bugs: No known bugs.


ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.