/* Normalisation */

SIGNAL on ERROR
SIGNAL on SYNTAX
SIGNAL on BREAK_C

if ~ SHOW('L', "rexxreqtools.library") then
  ret = addlib('rexxreqtools.library',0,-30)

ADDRESS 'AiPS'
options results

say 'min ?'
pull min
say 'max ?'
pull max

Normalize min max

AiPSEnd
exit

ERROR:
 Select
   when RC = 3 then say "*** Error" RC" on line "SIGL": Process Failed"
   when RC = 2 then say "*** Error" RC" on line "SIGL": Invalid entries" 
   when RC = 1 then say "*** Error" RC" on line "SIGL": No image !"
   otherwise say "*** Error "RC" on line "SIGL
 end

 say "--> "SourceLine(SIGL)
 say
 say 'Press [RETURN]'
 pull
 AiPSEnd
 exit

SYNTAX:
  say "*** Syntax error (Code "RC") on line" SIGL
  say "--> "SourceLine(SIGL)
  say
  say 'Press [RETURN]'
  pull
  AiPSEnd
  exit


BREAK_C:
  say "User Abort"
  say "--> "SourceLine(SIGL)
  say
  say "Press [RETURN]"
  pull
  AiPSEnd
  exit
  