Element: channel.query { }

Type

procedure

Description

A function to send a sequence of commands to a server channel. <command_block> is a block of language commands, any of which starting with a * are processed as server commands. Such commands are not sent to the server channel immediately but are buffered up and sent at the end of the block as a single "query". This behavior is different to that of channel.session where every server command is sent immediately. With the channel.query procedure, network traffic is kept to a minimum.

Within server commands which require identifier values, language identifiers may be specified by preceding them with a : character, e.g.

string s = '/home/tmp/acad/fn1678g.dxf'
*open :s

Such language variables may be array expressions. They must not contain any embedded white space. The only permitted identifier types are numeric, string, time and point. An attempt to output other variables will produce an error. Colons within quoted strings are treated literally and are not assumed to prefix a language variable. Numeric values will be expanded without trailing zeros, string variables will be enclosed within quotes, time variables will be output using the current date_mode format, point variables will be output in the form (x,y,z).

Any non-server commands within the block are executed normally as they are encountered.

Any jump out of the command block, e.g. by a break, return, goto, or exit command will abort the block without executing the server commands.

This element is applicable only to server channels.

The code of the function cannot be redefined.

Parameters

<channel>.query() {
    <command-block>
}

See Also

Structures:

channel.session