home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / lang / basic / 973 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.0 KB  |  46 lines

  1. Newsgroups: alt.lang.basic
  2. Path: sparky!uunet!spool.mu.edu!agate!ames!network.ucsd.edu!munnari.oz.au!bunyip.cc.uq.oz.au!qdpii!ianst
  3. From: ianst@qdpii.comp.qdpi.oz.au (Ian Staples)
  4. Subject: Re: Has PRINT been used yet?
  5. Message-ID: <1992Dec21.084624.21509@qdpii.comp.qdpi.oz.au>
  6. Organization: Qld Dept Primary Industries
  7. References: <724646371snx@tixel.mv.com>
  8. Date: Mon, 21 Dec 1992 08:46:24 GMT
  9. Lines: 35
  10.  
  11. In article <724646371snx@tixel.mv.com> jarnold@tixel.mv.com writes:
  12. >This might be more an MS/DOS question, but I'll post it here, since I'm
  13. >trying to accomplish this using Basic.  In DOS (v5.0), the *first* time
  14. >you go to use the PRINT command, DOS will ask you where you want the
  15. >file printed to;  You can override this question by using the "/D:"
  16. >switch on the PRINT command line.
  17. >
  18. >However, *after* the first time you print, the "/D:" switch is no longer
  19. >valid; in fact, it generates an error message.
  20. >
  21. >I've got a program where I want to shell out to DOS to print a report.
  22. >However, I don't know how to setup the program so that it will know whether
  23. >it needs to PRINT/D: or just PRINT.  Is there an environment variable
  24. >or something that can be examined to determine whether or not the "/D:"
  25. >switch will be required, or if a PRINT has already been done since the
  26. >last boot?
  27.  
  28. I used to initiate PRINT in my AUTOEXEC.BAT file, using the format
  29. PRINT /D:prn
  30. This approach ensured it was ready when I needed it later.
  31.  
  32. However, I then realised that PRINT was taking up a lot of memory (it's
  33. a TSR), which is probably why you often see instructions for printing
  34. manuals etc. in the form COPY filename PRN
  35.  
  36. Now that I'm "networked" memory is a bit short, so I've stopped using
  37. PRINT and use COPY like everyone else.
  38.  
  39. Cheers, Ian S.
  40.  
  41. -- 
  42. Ian Staples                       | Internet : ianst@qdpii.comp.qdpi.oz.au
  43. c/- P.O. Box 1054,                | Fax      : +61 (0)70 923 593
  44. MAREEBA  Queensland  4880         | Voice    : +61 (0)70 921 555
  45. Australia.                        | Home     : +61 (0)70 924 847
  46.