Not matching nested IFs to ELSEs and DOs to ENDs can have some
surprising results. If you eliminate the DOs and ENDs and the ELSE
NOP, as in the following example, what is the outcome?
Figure 1. Example
of Missing Instructions/******************************** REXX *******************************/
/* This program demonstrates what can happen when you do not include */
/* DOs, ENDs, and ELSEs in nested IF...THEN...ELSE instructions. */
/*********************************************************************/
weather = 'fine'
tenniscourt = 'occupied'
IF weather = 'fine' THEN
SAY 'What a lovely day!'
IF tenniscourt = 'free' THEN
SAY 'Let''s play tennis!'
ELSE
SAY 'We should take our raincoats!'