Skip to content

TSK (0)

System Task Data

This string function returns a listing of those ghost tasks, terminal ports, and peripheral devices with which this task can communicate and an indicator of their status.

TSK ( 0 [,ERR=line-ref|,ERC=error-code])
line-ref
is the program line number or label to branch to if an error is produced by this function.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

This function returns a 6-byte string in the following form for each task or device:

Byte(s)
Description
1 - 2
Task or device name.
3
Status of the task or device:

0 signifies not active. 2 signifies active.

4 - 6
Undefined, normally returns binary zero.

This function is very useful in applications when searching for an available printer that is not active to OPEN for a printed output report.

LET T$ = TSK (0)

If T$ prints as “T00T12T32LP2”, then the device named T0 is inactive and T1, T3, and LP are active.

TSK (bank-num), TSK (2), and TSK (3) functions

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF