basic.tcl Statement/BASIC Program


Command basic.tcl Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description executes any valid TCL statement as a subroutine.

After execution, the Pick/BASIC 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 Pick/BASIC 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 Pick/BASIC program.
Syntax tcl TCL.command {to dimensioned.array.variable)
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
Related basic.statements