HelpPages
Home | Developer | Frames | Scripts | Scripts Programming
Scripts Programming
SCRIPTS - PROGRAMMING
As with any programming language, we will see the general syntax first, followed by flow controls and at last, the commands reference.
SYNTAX
- The programs are structured by lines. A line is a command or flow control with its parameters. The remmarks is identified by a ; (semicolon) at the first character.
- There are no line numbers. The subroutines are carried out by calls to labels. A tag is a line that begins with : (colon)
- The line syntax is, for both flow controls to the following commands:
COMMAND 0[,PARAMETER20]]
- The parameters can be integer data, numeric or alphanumeric.
- Now some examples:
GOSUB 'LABEL1'
DEVICE DOCFILE$
FILESELECT '1;2,2;1,4;2'
DO_WHILE A<3
.............
LOOP
:LABEL1
FLOW CONTROLS
- GOTO LABEL$. Continue execution at the label LABEL$. The parameter must be alphanumeric.
- GOSUB LABEL$. Call to subroutine LABEL$. The parameter must be alphanumeric.
- CALL PRGFILE$. Call to a subroutine in an extern module. The parameters must be alphanumeric.
- RETURN. End of subroutine. No parameters.
- ENDIF. End of conditional sequence. No parameters allowed.
- LOOP. End of a loop secuence. No parameters allowed.
- LOOP_WHILE COND_EXP. Conditional end of a loop secuence. The secuence will be repeated if the expression result is true.
- LOOP_UNTIL COND_EXP. Conditional end of a loop secuence. The secuence will be repeated if the expression result is false.
- ELSE. Begin of an alternative conditional sequence. Sequence is initiated when the previous IF does not start. No parameters allowed.
- IF COND_EXP,IF_TRUE COND_EXP. Begin of a conditional secuence. The secuence is executed when the condition is true.
- DO_WHILE COND_EXP. Conditional begin of a loop secuence. The secuence will be initiated or repeated if the expression result is true.
- IF_FALSE. COND_EXP. Begin of a conditional secuence. The secuence is executed when the condition is false.
- DO_UNTIL COND_EXP. Conditional begin of a loop secuence. The secuence will be initiated or repeated if the expression result is false.
- DO. Start unconditional repeat sequence. No parameters allowed.
- END. Final of the script. The script ends execution without errors.