$ItsOpen: Difference between revisions
Jump to navigation
Jump to search
m (misc formatting) |
m (typos) |
||
Line 1: | Line 1: | ||
<p> | <p> | ||
The <var>$ | The <var>$Itsopen</var> function lets you determine whether a file is open. <var>$Itsopen</var> only checks files, not groups of files. The return codes are:</p> | ||
<table> | <table> | ||
<tr> | <tr> | ||
Line 15: | Line 15: | ||
==Syntax== | ==Syntax== | ||
<p> | <p> | ||
The format for the <var>$ | The format for the <var>$Itsopen</var> function is:</p> | ||
<p class="syntax">$ | <p class="syntax">$Itsopen({[FILE] <span class="term">name</span> [AT <span class="term">location</span>] | [PERM | TEMP] [GROUP] <span class="term">name</span>}) | ||
</p> | </p> | ||
<p> | <p> |
Revision as of 22:32, 14 July 2017
The $Itsopen function lets you determine whether a file is open. $Itsopen only checks files, not groups of files. The return codes are:
0 | The file is not open. |
1 | The file is open. |
Syntax
The format for the $Itsopen function is:
$Itsopen({[FILE] name [AT location] | [PERM | TEMP] [GROUP] name})
where name (optional) is a %variable or a literal name of the file or group. You must enter the filename in uppercase. A file synonym name can also be used.
If you do not enter a location (specifying a null argument), Model 204 uses the reference context (at compile time) of the statement that calls the function.
Example
Begin %file Is String Len 8 %file = $read('ENTER THE FILENAME') If $itsopen(%file) Then Print %file ' IS OPEN' Else Print %file ' IS NOT OPEN' End
See also
- $Context, which returns a number to indicate whether the context is a file or group.