home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / amos / ldos_demo / examples / ldos / lrexx_dos.amos / lrexx_dos.amosSourceCode
Encoding:
AMOS Source Code  |  1992-05-10  |  1.0 KB  |  44 lines

  1. ' s:AMOS-Draw.REXX 
  2. ' Portname : AMOS-DRAW 
  3. Dim ARG$(3)
  4. Screen Open 1,640,256,4,Hires
  5. Paper 0 : Clw 
  6. Locate 0,20 : Centre "Demo of LRexx" : Curs Off 
  7. C$=Chr$(0)
  8. ' Make a HOST called AMOS-DRAW 
  9. A= Extension_10_033A("AMOS-DRAW"+C$)
  10. If A=0
  11.    Print "Failed!"
  12.    End 
  13. End If 
  14. ' Try to start the ARexx-script in S:
  15. A= Extension_10_037C("S:AMOS-DRAW.Rexx"+C$)
  16. If A=0
  17.    Print "Failed to start program!"
  18.     Extension_10_0350 
  19.    End 
  20. End If 
  21. While A$<>"LRexx0"
  22.    A$= Extension_10_0368(0)
  23.    If(A$<>"LRexx0") and(A$<>"") : Rem We MUST NOT reply to the end-command!!!
  24.    Inc GOTTEN
  25.    Proc SPLIT[A$]
  26.       If Upper$(ARG$(0))="DRAW"
  27.          Plot Val(ARG$(1)),Val(ARG$(2)),2
  28.       End If 
  29.        Extension_10_0390 "",0,0 : Rem "K" isn't really needed... 
  30.    End If 
  31. Multi Wait 
  32. Wend 
  33.  Extension_10_0350 
  34. Print : Print "Received";GOTTEN;" commands."
  35. End 
  36. Procedure SPLIT[A$]
  37.    Shared ARG$()
  38.    ARG$(0)=""
  39.    CNT= Extension_10_0512(A$)
  40.    For I=1 To CNT
  41.       ARG$(I-1)= Extension_10_0520(I,A$)
  42.          ARG$(CNT)=ARG$(CNT)+P$
  43.    Next I
  44. End Proc[CNT]