Difference between revisions of "QUIT"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
==Purpose== | ==Purpose== | ||
Terminate session | Terminate session | ||
− | |||
==Syntax== | ==Syntax== | ||
Line 10: | Line 8: | ||
[WITH <expN>] | [WITH <expN>] | ||
− | |||
==See Also== | ==See Also== | ||
[[CLOSE]], [[DIE()]], [[ERRORLEVEL()]], [[EXIT()]], [[RUN]] | [[CLOSE]], [[DIE()]], [[ERRORLEVEL()]], [[EXIT()]], [[RUN]] | ||
− | |||
==Description== | ==Description== | ||
Line 20: | Line 16: | ||
====TO <command>==== | ====TO <command>==== | ||
− | The optional TO <command> allows an operating system command to be executed after exiting from the | + | The optional TO <command> allows an operating system command to be executed after exiting from the Lianja session. |
====WITH <expN>==== | ====WITH <expN>==== | ||
The WITH clause is used to specify an integer from -1 to 254 to be returned upon exiting. This is useful as an exit code that can be checked by calling programs, command files, or shell scripts. | The WITH clause is used to specify an integer from -1 to 254 to be returned upon exiting. This is useful as an exit code that can be checked by calling programs, command files, or shell scripts. | ||
− | |||
==Example== | ==Example== | ||
Line 34: | Line 29: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:Libraries]] |
− | [[Category: | + | [[Category:User Defined Functions]] |
Latest revision as of 10:59, 4 February 2013
Purpose
Terminate session
Syntax
QUIT
[TO <command>]
[WITH <expN>]
See Also
CLOSE, DIE(), ERRORLEVEL(), EXIT(), RUN
Description
The QUIT command closes all open tables, associated index and format files, open program files, the procedure library, and returns control to the operating system.
TO <command>
The optional TO <command> allows an operating system command to be executed after exiting from the Lianja session.
WITH <expN>
The WITH clause is used to specify an integer from -1 to 254 to be returned upon exiting. This is useful as an exit code that can be checked by calling programs, command files, or shell scripts.
Example
// Quit if [ABANDON] was pressed if lastkey()=ctrl('g') quit endif