MathGroup Archive 1999

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

Search the Archive

Re: $PreRead

  • To: mathgroup at
  • Subject: [mg20666] Re: $PreRead
  • From: "David Bailey" <db at>
  • Date: Sun, 7 Nov 1999 02:10:04 -0500
  • Organization: University of Salford, Salford, Manchester, UK
  • References: <7vrc6l$>
  • Sender: owner-wri-mathgroup at

N Monomachoff <nmonomachoff at> wrote in message
news:7vrc6l$2ng at
> Section 2.13.1 of the Mathematica Book, v3 gives:
> In[1]:=$PreRead = StringReplace[#, {"<<" -> "{", ">>" -> "}"}]&
> And now, supposedly
> In[2]:=<<4,5,6>>
> Out[2]:={4,5,6}
> But when I try this, I get an "Incomplete expression" error.
> I even get that error when I try to remove the value with
> $PreRead=.
> This would be quite a useful function if I could get it to work.
> Does anyone have suggestions? I'm using on win98.
> N Monomachoff
> nmonomachoff at

The same thing happens with Mathematica 4.0. I experimented by using a
function which would print out the value and then just return the value

$PreRead = (Print[# // FullForm]; #) &

Using your input I get the following:

RowBox[List[RowBox[List["<<", "4"]], ",", "5", ",", RowBox[List["6",

In other words, it would seem that PreRead is actually given a box structure
if used from a notebook. I guess you could manipulate this structure to get
what you want, but notice that the RowBox structures are not nested
correctly to produce a list.

David Bailey
Salford Software

  • Prev by Date: Re: RasterArray doesn't work
  • Next by Date: Re: TeX -> Mathematica
  • Previous by thread: Re: $PreRead
  • Next by thread: QR vs. Gram Schmidt