home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / objam01.lha / objam / test / rexxTest.m < prev    next >
Encoding:
Text File  |  1994-12-22  |  591 b   |  40 lines

  1. /*
  2. ** ObjectiveAmiga: Simple demo for class RexxHost
  3. ** See GNU:lib/libobjam/ReadMe for details
  4. */
  5.  
  6.  
  7. #import <objam/RexxHost.h>
  8.  
  9.  
  10. @interface MyRexx: RexxHost
  11. - rxcVERSION;
  12. - rxcLINE;
  13. @end
  14.  
  15.  
  16. @implementation MyRexx
  17.  
  18. - rxcVERSION
  19. {
  20.   [self replyRexxCmd:"rexxTest for ObjectiveAmiga" rc:RC_OK];
  21. }
  22.  
  23. - rxcLINE
  24. {
  25.   LONG *args[4];
  26.  
  27.   if([self readArgs:(LONG *)args tpl:"X1/A/N,Y1/A/N,X2/A/N,Y2/A/N"])
  28.     printf("Draw line from (%d,%d) to (%d,%d).\n",*args[0],*args[1],*args[2],*args[3]);
  29. }
  30.  
  31. @end
  32.  
  33.  
  34. int main(void)
  35. {
  36.   id host;
  37.   if(host=[MyRexx newHost:"REXXTEST"]) [[host run] free];
  38.   return 0;
  39. }
  40.