HTBasic Help
×
Menu
Index

STATUS

Returns the value of each listed attribute for the specified widget.
 

Example

STATUS @Field1;RETURN ("VALUE":Limit$)                         
STATUS @Input;RETURN ("VALUE":Setpoint)
STATUS @Meter1;RETURN ("LOW LIMIT":Low_lim,"HIGH LIMIT":High_lim)
                                         

Syntax

 
STATUS @w_hndl; RETURN ( ret_atr_list )
  ret_atr_list =  { sstr_exp: { num_exp | str_exp } | mstr_exp:{num_ary | str_ary} | atr_ary(*):{num_ary | str_ary}(*) } [, ...]
 
Item
 Description
 Range *depends on
atr_ary
single-valued array attributes: accompanying
num_ary or str_ary must have identical dimensions
*widget
num_ary
numeric array of attribute values
*attribute(s)
num_exp
numeric expression attribute value
*attribute
sstr_exp
single-valued string expression attribute
*widget
str_ary
string array of attribute values
*attribute(s)
str_exp
string expression containing attribute value
*attribute
mstr_exp
multi-valued string expression of attribute values
*widget
w_hndl
widget handle name (string expression)
any valid name
w_type
widget type string expression
 

Description

STATUS gets the attribute value of a widget previously created by ASSIGN. Attributes contain a single value or an array of values of either numeric or string type. A shorthand method is to use two string arrays where one contains all the attribute settings, and the other receives attribute values. Elements of the attribute array that contain nothing will be ignored and the corresponding element of the value array will remain unchanged.
 
STATUS gets widget values by using widget "handles" instead of I/O paths to access registers 0 and 1 which are defined for widgets..
Status Register 0 is defined for all I/O paths. For example:
 
STATUS @Io_path,0;Numeric_var  ! returns a 5 which means @Io_path is a widget
STATUS @Pb_12,1;Numeric_var ! returns a 6 meaning @Pb_12 is a CRT device
 
Any status register greater than 1 will cause Error 155 - Bad interface register number.
Error 170 - I/O operation not allowed occurs when using ENTER, OUTPUT, TRANSFER, etc., (all other commands associated with I/O paths assigned to devices.