open-insight/LSL2/STPROC/TW_ACCT_VALID.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

32 lines
873 B
Plaintext

SUBROUTINE TW_ACCT_VALID(ConvType, DataIo, SubrLabel, ReturnedValue)
*
begin condition
pre:
post:
end condition
declare function get_property
$insert logical
equ valid$ to 0 ;* successful
equ invalid_msg$ to 1 ;* bad data - print error message window
equ invalid_conv$ to 2 ;* bad conversion - " "
equ invalid_nomsg$ to 3 ;* bad but do not print the error message window
status() = Valid$
begin case
case ConvType = 'ICONV'
ValidArray = get_property( @window, '@ValidArray', ValidArray )
SelPos = get_property( @window:'.TW_INFO', 'SELPOS' )
Col = SelPos<1>
Row = SelPos<2>
if ValidArray<Row,Col> = 1 then
DataIo = ''
status() = valid$
end
case ConvType = 'OCONV'
case otherwise$
status() = invalid_msg$
end case
return