The I/O path or interface register contents are copied into the numeric variables, starting at the specified register number and continuing until the variable list is exhausted. The default register number is zero.
The range of legal registers and the meaning of values read from them differ for each interface. TheUsers Guidedescribes theCONTROLandSTATUSregisters for each interface and for I/O paths. Typically, registers return integer values and if you specify real values, they are rounded to integers. However, some drivers return real values or even arrays, so the documentation should be consulted.
The function form ofSTATUScomplements theSTATUSstatement. It allows immediate access to a single register without need for a temporary variable or separateSTATUSstatement. However, theSTATUSfunction can only return one value at a time, while theSTATUSstatement can return multiple registers in a single statement.
Eachwidget has a variety of attributes that control its appearance and behavior. TheSTATUSstatement is used to query the value of a widget attribute. The widget must have been created previously using anASSIGNstatement. Attributes are either scalar (may contain a single value) or vector (may be assigned an array of values) and have values of either numeric or string type.
A shorthand method is available that permits you to query values of several attributes without naming them individually on theSTATUSstatement. (Only scalar attributes may be queried with this shorthand method.)
•
You store all the attributes in a string array and supply an array
to receive attribute values.
•
Then, when you supply the array names to theSTATUSstatement, the value of each attribute named in each element of the attribute array will be returned in the corresponding element of
the value array.
•
Elements of the attribute array that contain nothing, or nothing but blanks, will be ignored and the corresponding element of the value array will remain unchanged.
Since widget handles are equivalent to I/O path names, you may use theSTATUSstatement to query the value of registers, which provide information about the widget. For widgets, Status Register 0 and Status Register 1 are defined.
Status Register 0 is defined for all I/O paths. For example:
STATUS @Io_path,0;Numeric_var
For widgets, this returns a 5 to numeric_var (5 means @Io_path is a widget). Status Register 1 is defined for all I/O paths assigned to a device. For example:
STATUS @Pb_12,1;Numeric_var
For widgets, this will return a 6 to numeric_var (6 means @Pb_12 is a device associated with the internal graphics CRT).
Any status register greater than 1 will causeError 155 - Bad interface register number.UsingENTER,OUTPUT,TRANSFER, etc., (all other commands associated with I/O paths assigned to devices) generatesError 170 - I/O operation not allowed.
BackPorting to HP BASIC:
STATUS@Iopath,2 always returns a 4.STATUS@File,3 returns the current length, not theCREATElength. This is because files are extendable Windows.
TheSTATUS() function is an addition to HTBasic. AnySTATUSorCONTROLregisters greater than 99 are also additions. As in HP BASIC,STATUSregister 0 of interface cards contains the card ID. Interface cards that are available on a PC, but not on an HP BASIC Workstation are identified with ID numbers greater than or equal to 300. These new features should not be used in programs that must be ported back to HP BASIC.