home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv6.zip / vac22os2 / ibmcobol / samples / toolkit / rexx / ccreply.cmd next >
OS/2 REXX Batch file  |  1996-11-19  |  2KB  |  25 lines

  1. /******************************************************************************/
  2. /*  ccreply                  Object REXX Samples                              */
  3. /*                                                                            */
  4. /*  A concurrent programming example.                                         */
  5. /*                                                                            */
  6. /*  This program demonstrates how to use reply to run two methods at the same */
  7. /*  time.                                                                     */
  8. /******************************************************************************/
  9. object1 = .example~new                      /* Create two new instances of    */
  10. object2 = .example~new                      /* the example class.             */
  11.  
  12. say object1~repeat(10, 'Object 1 running')  /* Start first object running     */
  13. say object2~repeat(10, 'Object 2 running')  /* Start second object running    */
  14. say 'Main ended.'
  15. exit                                        /* Exit and watch our kids run    */
  16.  
  17.                                             
  18. ::class example                             /* Define the example class       */
  19. ::method repeat                             /* Define the repeat method       */
  20.   use arg reps,msg
  21.   reply 'Repeating "'msg'",' reps 'times.'  /* Reply so others can run        */
  22.   do reps
  23.     say msg                                 /* Show that we're working        */
  24.   end
  25.