Difference between revisions of "ISATTY()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
{{YLM to do}}
+
==Purpose==
 +
Function used to determine whether an application is being run on a terminal
 +
 
 +
 
 +
==Syntax==
 +
ISATTY()
 +
 
 +
 
 +
==See Also==
 +
[[GETENV()]], [[ISMIRAGE()]], [[ISSERVER()]], [[SET UICONTROLS]], [[Terminal Definition Files]], [[:Category:UI Commands|UI Commands]]
 +
 
 +
 
 +
==Description==
 +
The ISATTY() function returns .T. (true) if the current application code is being run on a terminal.  If the application is being run as a batch job, ISATTY() will return .F. (false).  This allows developers to customize code for the particular environment yet share the same code across all environments.
 +
 
 +
 
 +
==Example==
 +
<code lang="recital">
 +
if isatty()
 +
    // user interface commands can be included
 +
else
 +
    // batch job - no user interface
 +
endif
 +
</code>
 +
 
 +
 
 +
==Products==
 +
Recital Server, Recital
 +
[[Category:Documentation]]
 +
[[Category:Functions]]
 +
[[Category:Environment]]
 +
[[Category:Environment Functions]]
 +
[[Category:UI Commands]]

Latest revision as of 15:12, 14 June 2011

Purpose

Function used to determine whether an application is being run on a terminal


Syntax

ISATTY()


See Also

GETENV(), ISMIRAGE(), ISSERVER(), SET UICONTROLS, Terminal Definition Files, UI Commands


Description

The ISATTY() function returns .T. (true) if the current application code is being run on a terminal. If the application is being run as a batch job, ISATTY() will return .F. (false). This allows developers to customize code for the particular environment yet share the same code across all environments.


Example

if isatty()
    // user interface commands can be included
else
    // batch job - no user interface
endif


Products

Recital Server, Recital