home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5551 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: nntp.hut.fi!usenet
  2. From: oahvenla@hyppynaru.cs.hut.fi (Osma Ahvenlampi)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Q: Output from Workbench program.
  5. Date: 16 Mar 1996 19:07:07 +0200
  6. Organization: What, me, organised?
  7. Sender: oahvenla@hyppynaru.cs.hut.fi
  8. Distribution: inet
  9. Message-ID: <jdjybp1klvo.fsf@hyppynaru.cs.hut.fi>
  10. References: <4i9b48$8n7@nz12.rz.uni-karlsruhe.de>
  11. NNTP-Posting-Host: hyppynaru.cs.hut.fi
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=US-ASCII
  14. In-reply-to: uhay@rzstud1.rz.uni-karlsruhe.de's message of 14 Mar 1996
  15.     14:40:08 GMT
  16. X-Newsreader: Gnus v5.1
  17.  
  18. In article <4i9b48$8n7@nz12.rz.uni-karlsruhe.de> uhay@rzstud1.rz.uni-karlsruhe.de (David Luebbren) writes:
  19. >I want to do output from a workbench started program similar to the way it
  20. >is done with STDOUT and STDERR in SAS/C but using the amiga file handles. 
  21. >From several examples I gathered the following code but it doesn't work. 
  22. >What is wrong with it?
  23. >      us->pr_CIS = fh;
  24. >      us->pr_COS = Open ("*", MODE_OLDFILE);
  25.  
  26. eeww.. Never mess with OS structures directly if there is any choice,
  27. and don't mess with them even if there is no choice. Use Input(),
  28. Output(), SelectInput() and SelectOutput() to redirect the standard IO
  29. streams.
  30.  
  31. -- 
  32. A lie in time saves nine.
  33. | "Osma Ahvenlampi" <mailto:oa@iki.fi> <http://www.iki.fi/oa/> |
  34. | Amiga&BeBox&ClassAct&Voodoo&ARTech cool stuff: I-Net225&AWeb |
  35.                                                               --
  36.