50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
compile subroutine rds_old_valid_rl(ConvType, DataIo, Branch, ReturnedValue)
|
|
begin condition
|
|
pre:
|
|
post:
|
|
end condition
|
|
declare function msg, get_property, set_property
|
|
declare subroutine update_index, extract_si_keys
|
|
|
|
$insert logical
|
|
$insert quote_equ
|
|
$insert msg_equates
|
|
|
|
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
|
|
equ CrLf$ to char(13):char(10)
|
|
|
|
ReturnedValue = DataIo
|
|
status() = Valid$
|
|
begin case
|
|
case ConvType = 'ICONV'
|
|
if DataIo matches "1A2N-0N" then
|
|
convert @lower_case to @upper_case in DataIo
|
|
if index( DataIo, 'T', 1 ) or index( DataIo, 'M', 1 ) then
|
|
* NO NEED TO VALIDATE COULD USE THE SAME NUMBER TWICE IN
|
|
* REACTOR LOG
|
|
end else
|
|
MsgInfo = ''
|
|
MsgInfo<mtext$> = 'City code is invalid...Enter T=Tempe or M=Mesa.'
|
|
MsgInfo<micon$> = '!'
|
|
Void = msg( '', MsgInfo )
|
|
status() = invalid_nomsg$
|
|
end
|
|
end else
|
|
MsgInfo = ''
|
|
MsgInfo<mtext$> = 'You must enter as "CRR-NNNN" C=City code i.e. T=Tempe or M=Mesa, RR=Reactor number i.e 01-19, NNNN=The sequential run number for the reactor.'
|
|
MsgInfo<micon$> = '!'
|
|
Void = msg( '', MsgInfo )
|
|
status() = invalid_nomsg$
|
|
end
|
|
case ConvType = 'OCONV'
|
|
* no output
|
|
ReturnedValue = DataIo
|
|
case otherwise$
|
|
ReturnedValue = ''
|
|
status() = invalid_conv$
|
|
end case
|
|
return
|