Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1994
*January
*February
*March
*April
*May
*June
*July
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: syntax

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: syntax
  • From: jfultz (John Fultz)
  • Date: Wed, 9 Feb 1994 18:02:33 -0600

At 11:08 AM 2/1/94 -0500, rvk at blink.att.com wrote:
>        the printer definition in init.m is 
>        PSPrint[x_]:= ( Display["!psfix | lp",x]; x), where
>        x is a graphics image.  what function does the "!"
>        in "!psfix" perform, and what is the second x, after the
>        ";" for?
>
>        just curious.  it works.
>
>        -r. kline
>        rvk at blink.att.com

Normally, Display would display to the filename in the first argument.
The ! tells it that the string does not refer to a filename, but a pipe.
Therefore, the Mathematica output goes into the pipe; from the pipe, it
serves as input into the psfix command, and the output from the psfix
command goes into the lp command, which goes to the printer.  Therefore,
no files are written and forgotten about.

Mathematica then evaluates x after this.  This simply means that
Mathematica should display the output of the graphic as well, which
should evaluate to -Graphics-, or something like that.  For example,

In[20]:= gr = Plot[x, {x, 0, 10}] (* I didn't show the plot here *)
Out[20]= -Graphics-

In[21]:= gr
Out[21]= -Graphics- (*You'll notice that no plot is generated here *)

This is more to stick with the convention Mathematica normally uses
than anything.

                                                -John
------------------------------------------------------------------------------
   John Fultz       "I am not a mouthpiece for Wolfram Research."
   jfultz at wri.com   "Golfish schoals, nibblin' at my toes, Fun, fun, fun..."
----------------------------------------------------------------------------
--






  • Prev by Date: dividing polynomials
  • Next by Date: The default printer command in XFrontEnd
  • Previous by thread: syntax
  • Next by thread: Suggestion: Bug-list for Mma