User Tools

Site Tools


jvs:fscan:manual:chapter1:status

fScan Reference Manual, Chapter 1 (Topics): status

Status queries -- Command operators to query data status

fScan command lines and interactive command strings can contain special query operators that test the status of data elements. The queries return either a 1 or 0 value, depending on whether the query result was yes or no.

The data definition query -- ?

usage: ?data

The '?' query operator can be used in place of the '$' data name identifier in any fScan command string. The value of a query is:
-1 if the DATA name is not defined
0 if the DATA name is defined but empty (string data only)
1 if the DATA name is defined and not an empty string.

This is different than the '$' operator, which is replaced by the actual value of the named DATA.

The file found query -- ?exists

usage: ?exists(filename)
or: $exists(filename)

The EXISTS query operator test whether its argument string is the name of an existing data file. It returns 1 if the file was found, 0 if the file was not found.

See Also:
IF

fScan Home, fScan Manual, CmdLineOptions, Manual Help

jvs/fscan/manual/chapter1/status.txt · Last modified: 2023/02/23 18:43 (external edit)