User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 145
9.2.33 HALT
Syntax [Command]
HALT
Purpose:
Stops program execution. This is equivalent to clicking
STOP’ in the script control window.
This command is mainly useful for remote eWON operation through the use of REMOTE.BAS FTP transfer.
See also:
“GO” on page 144, “REBOOT” on page 161
9.2.34 HEX$
Syntax [function]
HEX$ E1
Purpose:
The function returns a chain of 8 characters that represents the hexadecimal value of the E1 number.
Example:
See also:
“BIN$” on page 132
9.2.35 IF THEN ELSE ENDIF
This sequence of commands now supports two different syntaxes: the short IF syntax and the long IF syntax.
9.2.35.1 Short IF Syntax
IF N THEN EXPRESSION1 [ELSE EXPRESSION2 [ENDIF]]
Purpose:
The condition is the result of an operation returning an N integer. If N is 0, the condition is considered as false and the eWON executes at the
following line or to the ELSE "expression2" if present. If N is different from 0, the condition is considered as true and the eWON executes
"expression1". If more than one instruction has to be executed, separate them with ':'. If N is an expression or a test, use ().
The ELSE Expresion2 is optional and the finishing ENDIF is also optional.
IMPORTANT the short IF syntax is used as soon as an item is found after the THEN statement.
Even putting a REM statement on the IF N THEN line will make the eWON consider it as a short IF statement.
9.2.35.2 Long IF syntax
IF N THEN
Expression1
ELSE
Expression2
ENDIF
The ELSE Expression2 is optional but ENDIF is mandatory.
You can mix short and long IF syntax in your code, but don't forget that anything typed after the THEN statement will lead to a short IF syntax
interpretation.
Example:
a$= HEX$ 255
REM A$ is worth " 000000FF " after this affectation
IF (a<10) THEN PRINT"A is lower than 10": SETIO"MyTag",1
IF (a<10) THEN
PRINT"A is lower than 10": MyTag@=1
ELSE
PRINT"A is bigger than 10": MyTag@=0
ENDIF