LESS THAN Comparison Operator

The < operator is a binary (infix) LESS THAN comparison operator. The < operator expects either an integer or string right hand operand and either as integer or string left hand operand.

If the left hand operand is an integer and the right hand operand is a string, then the right hand operand is automatically coerced to an integer before the integer LESS THAN comparison operator is applied.

If the left hand operand is a string and the right hand operand is an integer, then the right hand operand is automatically coerced to a string before the string LESS THAN comparison operator is applied.

If the type of the left hand operand is the same as the type of the right hand operand (i.e. they are both integers or both strings), then the LESS THAN operator matching the type is applied.

syntax:

	<left_expr> < <right_expr>

<left_expr> and <right_expr> are refered to as the left and right operand respectively and may themselves be simple values or complex expressions.

XCASM comparison operators return either a 0 (if the comparison fails) or a 1 (if the comparison succeeds). This corresponds to the logical truth values used by XCASM, 0 for false and 1 for true. The logical AND, OR and NOT operators rely on 0 for false and non-zero for true.

e.g.
	0x1234 < 0x1233			yields 1
	0x1234 < 0x1234			yields 0
	0x1234 < 0x1235			yields 0

	(0x1234 - 1) < 0x1234		yields 1
	(0x1234 + 0) < 0x1234		yields 0
	(0x1234 + 1) < 0x1234		yields 0

	-1 < 0				yields 1
	 0 < 0				yields 0
	 1 < 0				yields 0

	"fred" < 0				yields 0
	"fred" < "fred"			yields 0

	"B" < "A"				yields 0
	"B" < "B"				yields 0
	"B" < "C"				yields 1

	"BEN" < "BILL"			yields 1
	"BEN" < "BERT"			yields 1
	"BEN" < "BART"			yields 0
	"BEN" < "BEN"			yields 0