From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d8c67998369962fd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-23 08:54:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Printing Date: 23 Apr 2002 11:47:55 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1019577246 6162 128.183.220.71 (23 Apr 2002 15:54:06 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 23 Apr 2002 15:54:06 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:22992 Date: 2002-04-23T15:54:06+00:00 List-Id: "Fraz" writes: > Hi all, > > Sorry if this in an FAQ, but is there a command in ada that will send the > current window to the printer? "window" and "printer" are not things that the Ada language defines (neither is "command", but I'll assume you meant "statement"). So no, the Ada language has no way to "send the window to the printer". However, there may be a library package for your windowing system and operating system that do this. What windowing system and operating system are you using? > or even the contents of an array? Ada does define arrays, so we're getting closer :). Ada.Text_IO is used to generate text images of things, which can normally be sent to a printer in a useful way. However, Ada.Text_IO does not support arrays directly. I wrote a package that does array Text_IO; see http://users.erols.com/leakstan/Stephe/Ada/sal.html, specifically the package SAL.Gen_Array_Text_IO. You'll still have to figure out how to map the file name to a printer on your system. On the other hand, you may find that dumping an array to a text file is what you really want to do. You can read the file in any old editor, and you only inconvenience some electrons, rather than killing trees :). > At a push a basic command to print a file would do? > > The simpler the better :) I just need to a print option For Windows, I have another package Windex (http://users.erols.com/leakstan/Stephe/Ada/windex.html), which provides the package Windex.Graphics_Devices.Printers. This provides a simple interface to a printer on a Windows system. The test code provided with Windex gives an example of how to use it. Things should be as simple as possible, but no simpler! -- -- Stephe