home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15432 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  1.4 KB

  1. Path: sparky!uunet!cbmvax!jesup
  2. From: jesup@cbmvax.commodore.com (Randell Jesup)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: running segments from within an application
  5. Message-ID: <36744@cbmvax.commodore.com>
  6. Date: 5 Nov 92 23:22:31 GMT
  7. References: <9211050408.AA24272@mackay.mpce.mq.edu.au>
  8. Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 22
  11.  
  12. s3007048@mackay.mpce.mq.edu.au writes:
  13. >I need to know how to pass parameters to segements run from within an
  14. >application.  I know about RunSeg() and LoadSeg(), and i've thought
  15. >about using Execute()...
  16.  
  17.     I think you mean RunCommand().  RunCommand() is the best way to
  18. pass arguments to a seglist (program) you loaded.  In fact, it's the only
  19. really safe way.  The problem is that there are two separate ways in which
  20. arguments are passed (well actually 3): 1) pointer to string in a0, length in
  21. d0, string usually has a \n in it at the end.  2) as buffered input on the
  22. input filehandle (RunCommand does this for you).  3) via Set/GetArguments()
  23. (also done for you by RunCommand).
  24.  
  25.     If Execute() or System() will do what you need, use them (it's easier
  26. than LoadSeg/RunCommand/etc).
  27.  
  28. -- 
  29. To be or not to be = 0xff
  30. -
  31. Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
  32. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
  33. Disclaimer: Nothing I say is anything other than my personal opinion.
  34.