Relational Operators

There are six relational operators in Petit Computer BASIC, and they are:

They all take two operands (inputs or parameters); one before the operator and one after. The operators will yield a result of  if the relationships between the two operands are as indicated, and FALSE otherwise.

Of particular significance is that the equality operator is represented by two 'equals' signs next to each other, not just one. A single " " symbol represents assignment. Thus,  is a command which assigns the value   to the variable , whereas   is an expression which evaluates to TRUE if the variable   has the value  , and does not change the value of.

Also worth noting is that all operators work on pairs of strings, too (though comparing a string to a number will result in a ). One string is considered 'less than' a second if they are different, and the ASC value of the first character that differs is less in the first string than it is in the second string. This does not always give a natural ordering, because, for instance,  and   both evaluate to TRUE.