home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / software / tipsy / zoc / install.fil / SCRIPT / RXSAMPLE / TUTORIAL / 2_IFELSE.ZRX < prev    next >
Text File  |  1996-08-26  |  627b  |  30 lines

  1. /* REXX */
  2.  
  3. /* THIS SCRIPT SHOWS HOW DECISIONS WORK IN REXX */
  4.  
  5. CLS
  6.  
  7. /* show a nice request window to the user */
  8. answer= ZocRequest("Do you like ZOC?", "YES", "NO")
  9.  
  10. /* here comes a decision with one alternative */
  11. IF answer="##CANCEL##" THEN DO
  12.     SIGNAL endit    /* jump to the end */
  13. END
  14.  
  15.  
  16. /* here comes a decision with two alternatives */
  17. IF answer="YES" THEN DO 
  18.     SAY "Nice to hear that!"
  19. END
  20. ELSE DO 
  21.     /* ANSWER=NO */
  22.     SAY "Oops, are you really sure about that?"
  23.     SAY "(maybe you mixed it up with Hyper Terminal)"
  24. END
  25.  
  26.  
  27. endit:    /* target for the SIGNAL command above */
  28. EXIT
  29.  
  30.