Avaya Writing Technician Interface Scripts Manuale Utente Pagina 38

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 116
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 37
Writing Technician Interface Scripts
2-10 117382-A Rev. A
gosub
The gosub command calls a subroutine inside the same script file. It must be the
last command on a line. A subroutine begins and ends with a colon (:). You can
nest subroutines up to 10 deep. You use the
return command in a subroutine to
return to the calling routine. When the
return command executes, the script
interpreter begins executing the instructions on the line following the line
containing the
gosub command.
Syntax
The gosub command has the following syntax:
gosub :
<subroutine_name>
:
<subroutine_name>
is the name of the subroutine.
Example
The following example shows a script using the gosub and return commands:
:main:
let arg = 1; gosub :SUBROUTINE:
echo “Return value: $return”
goto :EXIT:
:SUBROUTINE:
let return = ($arg*$arg) + $arg + 1
return
:EXIT:
Vedere la pagina 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 115 116

Commenti su questo manuale

Nessun commento