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 126
If a request in the queue contains more than 1 BASIC line, what actually happens is the following:
• The block is appended to the end of the program as a temporary section:
• The temporary label is called (goto ewon_one_shot_section).
• When the execution is done, the temporary section is deleted from the program.
As a consequence, we have the following:
• Any global variable, or label can be used in REMOTE.BAS or ASP blocks;
you can call subroutines in your ASP blocks and share common variables with the program.
• If a section is being executed when the ASP section is posted, all the requests in the queue must first be executed.
This may have an impact on the responsiveness of the WEB site when ASP is used.
• When using ASP you would better group your blocks to avoid posting too many different requests in the queue.
By doing this you will reduce queue extraction and BASIC context switches.
• If a big amount of ASP request (or long ASP request) is posted to the BASIC by the WEB server,
it may slow down normal execution of the BASIC.
• Sections are never interrupted by other sections: this is always true, when a program sequence is written,
it will never be broken by another execution (of timer or WEB request or anything else).
9.1.3 Character string
A character string can contain any set of characters.
When creating an alphanumeric string with a quoted string the ‘ or " delimiter can be used:
Examples:
"abcd"
’abdc’
"abc‘def’ ghi "
Are 3 valid quoted strings.
A character string can be stored either in an alphanumeric type variable, or in an alphanumeric variable array.
9.1.4 Command
A command is an instruction that has 0 or several comma (,) separated parameters.
There are 2 exceptions to the comma separator: PRINT and PUT.
Examples:
Queue pos Content Type
3
FromWebVar = Var1!
PRINT #0;TIME$
2 goto MyLabel
1 goto ewon_cyclic_section CYCLIC_SECTION
Table 89: BASIC Queue - 5
ewon_one_shot_section::
FromWebVar = Var1!
PRINT #0;TIME$
END
GOTO Label
PRINT
CLS
SETSYS TAG, "name","Power"
SETSYS TAG,"SAVE"