Avaya Writing Technician Interface Scripts Uživatelský manuál Strana 43

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 122
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 42
Command Reference
114089 Rev. A 2-9
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.
The
gosub command has the following syntax:
gosub :
<subroutine_name>
:
<subroutine_name>
is the name of the subroutine.
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:
Zobrazit stránku 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 121 122

Komentáře k této Příručce

Žádné komentáře