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 144
9.2.30 GO
Syntax [Command]
GO
Purpose:
Start program execution (
RUN). This is equivalent to clicking RUN in the script control window.
This command is mainly useful for remote eWON operation through the use of REMOTE.BAS FTP transfer.
See also:
“HALT” on page 145), (“REBOOT” on page 161)
9.2.31 GOSUB RETURN
Syntax
GOSUB Label
Label:Expression
RETURN
Purpose:
When the GOSUB line is executed, the program continues at "Label" line. Then the program executes up to the RETURN line.
The RETURN command modifies the program pointer to the line immediately following the GOSUB Line.
IMPORTANT: if the gosub line contains instruction after the GOSUB command, they won't be executed on return.
It is possible to create a new section containing the Label. Sections are useful in order to divide the program into smaller code snippets and help
the reader to get a clear view of the software. At the end of every section there is an invisible END but jumps are possible from section to section.
Example:
9.2.32 GOTO
Syntax [Command]
GOTO Label
Purpose:
The execution of the program continues to the line indicated by Label.
The GOTO command also allows starting the program without erasing all variables.
The Label statement cannot be empty.
Example:
GOSUB NL3
PRINT " End "
END
NL3 : PRINT " Beginning "
RETURN
REM Display " Beginning " then " End "
GOSUB NL3 :print "Never"
PRINT " End "
END
NL3 : PRINT " Beginning "
RETURN
REM Display " Beginning " then " End " => "Never"
is never printed
GOTO Label
Print " Hop "
REM the program continues at line Label (Hop is not printed)
Label: