Epson RC170 Guia do Utilizador Página 176

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 175
6. The SPEL+ Language
6.9 Multi-statements
A program statement can contain several statements separated by semi-colons. The total
length of a multi-statement program line cannot exceed 200 characters.
For example:
Function Test
Pass P1; Pass P2; Go P3 ' Multi-statement
Fend
Even though multi-statements are supported (mainly for compatibility), it is strongly
recommended that they not be used. Multi-statements can make your code more difficult
to read and debug.
6.10 Labels
A program label is an alphanumeric name followed by a colon (":") that marks a location
in a program for a GoTo or GoSub statement. The name may be up to 32 characters long
and can include alphanumeric characters and the underscore ("_") character if it is not the
first character. You cannot use any SPEL
+
keywords as labels.
For example:
Function Main
Do
Jump P1
Jump P2
If Sw(1) Then GoTo MainAbort
Loop
MainAbort: ' Program label
Print "Program aborted"
Fend
6.11 Comments
Use comments to add notes to your programs. An apostrophe character (') starts a
comment.
Examples of comments
Function Main
' ****** Main Demo Program ******
Xqt conveyor ' Start up the task for conveyor
Do
Print "Press ENTER to run demo cycle"
Print "Press CTRL+C to quit"
Input dumy
Call demo ' Execute the demo function
Loop ' Return to start of main loop
158 EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.4
Vista de página 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 311 312

Comentários a estes Manuais

Sem comentários