Difference between revisions of "EXIT()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
 
Line 1: Line 1:
{{YLM to do}}  (php)
 
 
 
  
 
==Purpose==
 
==Purpose==
 
+
Terminate session returning a message or status code
  
  
 
==Syntax==
 
==Syntax==
 
+
EXIT(<expC>|<expN>)
  
  
 
==See Also==
 
==See Also==
[[DIE()]]
+
[[CLOSE]], [[DIE()]], [[ERRORLEVEL()]], [[QUIT]], [[RUN]]
  
  
 
==Description==
 
==Description==
 
+
The EXIT() function closes all open files and ends the Recital process, returns the specified message, <expC>, or status code (-1 to 254), <expN>, to the operating system or calling script. 
  
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
 
+
// Exit if [ABANDON] was pressed
 +
if lastkey()=ctrl('g')
 +
    exit("User "+user()+ " exited at "+time())
 +
endif
 
</code>
 
</code>
 +
  
 
==Products==
 
==Products==
 +
Recital, Recital Server
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Applications]]
 +
[[Category:Applications Functions]]

Latest revision as of 14:45, 30 October 2009

Purpose

Terminate session returning a message or status code


Syntax

EXIT(<expC>|<expN>)


See Also

CLOSE, DIE(), ERRORLEVEL(), QUIT, RUN


Description

The EXIT() function closes all open files and ends the Recital process, returns the specified message, <expC>, or status code (-1 to 254), <expN>, to the operating system or calling script.


Example

// Exit if [ABANDON] was pressed
if lastkey()=ctrl('g')
    exit("User "+user()+ " exited at "+time())
endif


Products

Recital, Recital Server