Newsgroups: comp.lang.apl
Path: watmath!watserv1!torn.onet.on.ca!utgpu!cs.utexas.edu!sdd.hp.com!mips!darwin.sura.net!haven.umd.edu!socrates!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Two J Questions
In-Reply-To: sam@csi.jpl.nasa.gov's message of 27 May 92 23:00:10 GMT
Message-ID: <ROCKWELL.92May28003130@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <1992May27.125334.18688@NCoast.ORG> <1992May27.230010.10844@csi.jpl.nasa.gov>
Date: Thu, 28 May 1992 05:31:30 GMT
Lines: 21

Peter Petto:
   Also, does anyone have a simple function that will send output to
   the printer?  For example I'd like
       print (o.i.3 4)
   to print the array on the printer assigned to prn (DOS).  Has
   anyone worked something up for this?  Thanks.

Can't you just write character data straight to that file?  For
example,
   fmt =. '}.   , (10{a.) ,"(1)   1 1}. _1 _1}. ": < y.' : 11
   print =. '(fmt y.) 1!:2 <''prn''' : 11 f.

'fmt' is a function that converts any datum to a character vector that
has the same print representation.  'print' copies this character
vector representation into 'prn'.  If J can't write directly to prn,
you'll have to do like Sam said (copy to a temporary file, use DOS to
copy to prn).

-- 
Raul Deluth Miller-Rockwell                   <rockwell@socrates.umd.edu>
The U.S. government went another thousand million dollars into debt today.
