Difference between revisions of "GETSIG()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Retrieve the last signal number received | Retrieve the last signal number received | ||
Line 22: | Line 18: | ||
<code lang="recital"> | <code lang="recital"> | ||
procedure on_finish | procedure on_finish | ||
− | if getsig() != 0 | + | if getsig() != 0 |
− | + | dialog box "Signal received. signo = "+alltrim(str(getsig())) label "ON FINISH" | |
− | elseif error() > 0 | + | elseif error() > 0 |
− | + | dialog box "Error received, error = "+alltrim(str(error())) label "ON FINISH" | |
− | else | + | else |
− | + | dialog box "Successful exit" label "ON FINISH" | |
− | endif | + | endif |
return | return | ||
Line 36: | Line 32: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Error Handling and Debugging]] | ||
+ | [[Category:Error Handling and Debugging Functions]] |
Latest revision as of 16:17, 2 December 2009
Purpose
Retrieve the last signal number received
Syntax
GETSIG()
See Also
ERROR(), ON FINISH, ON TERMINATION
Description
The GETSIG() function returns the last signal number received, or zero if none has been received. This can be used in an ON FINISH procedure to determine if the user exited by themselves or they received a signal to terminate.
Example
procedure on_finish if getsig() != 0 dialog box "Signal received. signo = "+alltrim(str(getsig())) label "ON FINISH" elseif error() > 0 dialog box "Error received, error = "+alltrim(str(error())) label "ON FINISH" else dialog box "Successful exit" label "ON FINISH" endif return on finish do on_finish
Products
Recital Server, Recital