RosettaCodeData/Task/Inverted-syntax/REXX/inverted-syntax.rexx

11 lines
604 B
Rexx
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
/*REXX program demonstrates a use of a special case of inverted syntax (via SIGNAL ON).*/
2013-04-10 21:29:02 -07:00
signal on syntax
a=7
2016-12-05 22:15:40 +01:00
zz=444 / (7-a)
2013-04-10 21:29:02 -07:00
return zz
2016-12-05 22:15:40 +01:00
/*──────────────────────────────────────────────────────────────────────────────────────*/
syntax: say '***error*** program is attempting to do division by zero,'
say 'the REXX statement number is: ' sigL " and the REXX source is:"
say sourceLine(sigL)
exit 13