SPLat Logo

fGoIfWLEQ LLLL [D>=23]

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

fGoIfWLEQ LLLL [D>=23]

"Go if W less than or equal to Q"

Compares the contents of the floating point registers W and Q. Transfers program control (jumps) to the destination LLLL if W is less than or equal to Q. Does not affect the contents of W or Q.

Dialect restriction: This instruction is not implemented in boards with dialect numbers less than 23.

See also fGoIfWLTQ, fGoIfWGTQ, fGoIfWGEQ

Example:

	fAnin		TempSensor		;Read the temperature sensor
	fRecallQ	SetPoint		;Get the current set point
	fGoIfWLEQ	TurnOnHeater	;Jump if the temperature is too low

Note that there is an inherent hazard in comparing two floating point numbers for equality. The numbers you are comparing may have been arrived at via a number of arithmetic operations. Because floating point arithmetic has limited accuracy (24 bits = about 6 or 7 decimal digits in our case), two numbers that should be identical may differ by a small amount. That means an equals test may fail on two numbers that should be identical.