TCL

TCL


TAN Index Level TCLREAD
Syntax TCL tcl.command {TO dimensioned.array.variable)
Category BASIC
Type Statement
Description executes any valid TCL statement as a subroutine.

After execution, the FlashBASIC program continues with the next statement.

Input may be passed to the TCL statements using the "data" statement prior to the "TCL" statement.

The "to" modifier passes the last message number and arguments  of the TCL statement to the specified dimensioned array variable.
After the "TCL" statement is completed, the data queue (stack) is reset. Multiple "data" statements may be passed when they are separated by value marks. Multiple TCL statements may be passed when they are separated by attribute marks.

If an active list is generated by the TCL command, it is passed back to the FlashBASIC Program. The list can be used by the "readnext" statement or it can be assigned to a specific variable using the "select to" command for later use with a "readnext" statement.

If the "off" statement is issued as the TCL statement, control does NOT return to the FlashBASIC program.
Options
See Also statements & functions SELECT EXECUTE ENTER CAPTURING active list CHAIN CALL
Example dim results(3)
tcl 'count md if a1 "pq"' to results

This example executes an Access "count" statement and returns the error message item-id's to the dimensioned array, "results".  The output of the "tcl" statement looks like this:

[407] 26 items counted out of 897 items.

The contents of the dimensioned array "results" looks like this:

results(1) = 407
results(2) = 26
results(3) = 897
Warnings The following verbs may alter the program environment when returning to the next program statement:  Spooler verbs, tape control verbs, "debug", "charges", "term" and "tabs".

If the number of error message item-id's exceeds the size of the array, the "extra" id's are forced into the last array location and are delimited by attribute marks.
Compatibility D3 7.0 AP R83
TAN Index Level TCLREAD