Comparison in Blox Basic is similar to other programming languages.  It is recommended that expressions should be enclosed in parentheses so it is not ambiguous what is being compared with what.

 

Keyword

Syntax:

Description:

=

Equivalent to, or the value the element on each side is exactly the same.

IF ( var1 = var2 ) THEN ...

!=
<>

Values on each side of the symbol are Not equivalent to, or are not the exactly the same value.  

Both symbol characters are valid to use.

>

Greater than symbol.

<

Less than symbol.

<=

Less than or equal to.

>=

Greater than or equal to

 

Example:

VARIABLES: i TYPE: Integer, var1 TYPE: String
 
WHILE ( i != 10 )
  var1 = "Message for you, sir."
  i = ( i + 1 )
ENDWHILE

Returns:

 

 

Links:

 

See Also:

 

 


Edit Time: 9/26/2020 1:50:52 PM


Topic ID#: 213

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software