Liebe alle,

 

nachstehend unsere HÜ:

 

Liebe Grüße

Kenan

 

 

 

Bsp1:

SAY pp("Ich")

CALL testroutine /* routine is called */

SAY pp("ich")

EXIT 0

pp : RETURN "<<<" || ARG(1) || ">>>"

:: ROUTINE testroutine

SAY pp("bin")

EXIT 0

pp : RETURN "[" || ARG(1) || "]"

 

 

Bsp2:

 

CALL ON USER TOO_SMALL

CALL ON USER TOO_BIG

CALL checkWeight 100

CALL checkWeight 85

CALL checkWeight 60

CALL checkWeight 40

CALL checkWeight 50

EXIT 0

TOO_SMALL: SAY "// caught exception 'TOO_SMALL' \\"; RETURN

TOO_BIG : SAY "// caught exception 'TOO_BIG' \\"; RETURN

::ROUTINE checkWeight

PARSE ARG weight

SAY '--> weight:' weight

IF weight < 50 THEN RAISE USER too_small

ELSE IF weight > 80 THEN RAISE USER too_big

ELSE SAY '--> checked o.k.'

EXIT 0

 

OUTPUT:

REXXout>--> weight: 100

REXXout>// caught exception 'TOO_BIG' \\

REXXout>--> weight: 85

REXXout>// caught exception 'TOO_BIG' \\

REXXout>--> weight: 60

REXXout>--> checked o.k.

REXXout>--> weight: 40

REXXout>// caught exception 'TOO_SMALL' \\

REXXout>--> weight: 50

REXXout>--> checked o.k.