Denso RC5 Spécifications Page 195

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 692
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 194
Chapter 8 PAC Language Syntax
8-13
8.8 Flow Control Statement
Use a flow control statement to control the execution sequence of each
statement in a program.
Use a label in a program control flow statement to indicate the position of it in a
program.
The flow control can be roughly classified into 5 statements: unconditional
branch, conditional branch, selection, repeat and calling defined process.
8.8.1 Unconditional Branch
Use this to transfer program execution to an arbitrary position. Describe a
label for the statement you would like to execute next, after the GOTO
command.
Example: GOTO *LABEL1
8.8.2 Conditional Branch
If an IF ~ THEN ~ ELSE statement or IF ~ ENDIF statement is used, a branch
destination determines whether the designated condition is satisfied.
If the relational expression value described just after IF is true (TRUE (1) ), the
process after THEN is executed. Otherwise, the process after ELSE is
executed.
8.8.3 Selection
Depending on the value of a designated expression, the process to be
executed is selected. There are 3 commands.
In SELECT CASE statements, place an arithmetic expression after CASE on
the SELECT line. The process is executed from the line of CASE that has a
value satisfying this arithmetic expression to the next CASE line or the END
SELECT line. If those CASE lines do not satisfy the expression, the process is
executed from the line after CASE ELSE to the END SELECT line.
In ON ~ GOSUB statements place an arithmetic expression after ON. The
process proceeds to a subroutine according to the value of the arithmetic
expression.
In ON ~ GOTO statements place an arithmetic expression after ON. The
process proceeds to a label name according to the value of the arithmetic
expression.
Vue de la page 194
1 2 ... 190 191 192 193 194 195 196 197 198 199 200 ... 691 692

Commentaires sur ces manuels

Pas de commentaire