SUBROUTINE REACT_AREA_CONV(ConvType, DataIo, SubrLabel, ReturnedValue)
*
begin condition
pre:
post:
end condition
$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'
        ReturnedValue = DataIo
   case ConvType = 'OCONV'
        begin case
           case DataIo = 1
              ReturnedValue = 'Power Panel'
           case DataIo = 2
              ReturnedValue = 'Maintenance Panel'
           case DataIo = 3
              ReturnedValue = 'Wafer Handling Section'
           case DataIo = 4
              ReturnedValue = 'Reactor Section'
           case DataIo = 5
              ReturnedValue = 'Gas Panel'
           case DataIo = 6
              ReturnedValue = 'Support Equipment'
           case DataIo = 7
              ReturnedValue = 'Service'
           case DataIo = 8 
              ReturnedValue = 'N/A'
           case Otherwise$
              ReturnedValue = ''
        end case
   case otherwise$
        status() = invalid_msg$
end case
return
