Read Me - Common Public License V1.0 - Copyright Notice(©)

query


>>-query(--+-DATETIME--------------------------+--)------------><
           +-EXISTS----------------------------+
           +-HANDLE----------------------------+
           |                       +-CHAR-+    |
           +-+-SEEK-----+--+-READ--+------+--+-+
           | +-POSITION-+  |       +-LINE-+  | |
           |               |        +-CHAR-+ | |
           |               +-WRITE--+------+-+ |
           |               |        +-LINE-+ | |
           |               +-SYS-------------+ |
           +-SIZE------------------------------+
           +-STREAMTYPE------------------------+
           +-TIMESTAMP-------------------------+

Used with these options, the [query] method returns specific information about a stream. Except for [query] HANDLE and [query] POSITION, the stream returns the query information even if the stream is not open. A null string is returned for nonexistent streams.

DATETIME

returns the date and time stamps of a persistent stream in US format.

Stream object - QUERY method

stream_name~query("datetime")

A sample output might be:

11-12-98 03:29:12
EXISTS

returns the full path specification of the stream, if it exists, or a null string. For example:

Stream object - QUERY method

stream_name~query("exists")

A sample output might be:

c:\data\file.txt
HANDLE

returns the handle associated with the open stream.

Stream object - QUERY method

stream_name~query("handle")

A sample output might be:

3
POSITION

returns the current read or write position for the stream, as qualified by the following options:
READ

returns the current read position.

WRITE

returns the current write position.

Note

If the stream is open for both reading and writing, this returns the read position by default. Otherwise, this returns the specified position.

CHAR

returns the position in terms of characters. This is the default.

LINE

returns the position in terms of lines. For non-binary streams, this operation can take a long time to complete. This is because the language processor starts tracking the current line number if not already doing so, and, thus, might require a scan of the stream from the top to count the line-end characters. See for a detailed discussion of this issue.

Stream object - QUERY method

stream_name~query("position write")

A sample output might be:

247
SYS

returns the operating system stream position in terms of characters.

SIZE

returns the size, in bytes, of a persistent stream.

Stream object - QUERY method

stream_name~query("size")

A sample output might be:

1305
STREAMTYPE

returns a string indicating whether the stream object is PERSISTENT, TRANSIENT, or UNKNOWN.

TIMESTAMP

returns the date and time stamps of a persistent stream in an international format. This is the preferred method of getting the date and time because it provides the full 4-digit year.

Stream object - QUERY method

stream_name~query("timestamp")

A sample output might be:

1998-11-12 03:29:12

Read Me - Common Public License V1.0 - Copyright Notice(©)