home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / zoc201.zip / INSTALL.FIL / SCRIPT / RXSAMPLE / MANUAL / IF2.RX < prev    next >
Text File  |  1994-10-08  |  692b  |  36 lines

  1. /* REXX sample about decisions */
  2.  
  3. 'TIMEOUT 60'
  4.  
  5.  
  6. /* Wait for 'Name?' - check for success and report error */
  7. 'WAIT "Name?"'
  8.  
  9. IF RC=0 THEN 
  10. DO /* received 'Name?' */
  11.    'SEND "Joe User^M"'
  12. END
  13. ELSE
  14. DO /* Ouch, 'Name?' was not received */
  15.    'WRITELN "ERROR (Name)!!"'
  16.    'HANGUP'
  17.    SIGNAL GetOut   /* this command jumps to the end */
  18. END
  19.  
  20.  
  21. /* Wait for 'Password?' - check for success and report error */
  22. 'WAIT "Password?"'
  23.  
  24. IF RC=0 THEN 
  25. DO /* received 'Password?' */
  26.    'SEND "mypassword^M"'
  27. END
  28. ELSE
  29. DO /* Ouch, 'Password?' was not received */
  30.    'WRITELN "ERROR (Password)!!"'
  31.    'HANGUP'
  32. END
  33.  
  34.  
  35. GetOut:  /* this is the target for the SIGNAL command */ 
  36.