MathGroup Archive 2003

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

Search the Archive

Re: Input Line Evaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42731] Re: [mg42721] Input Line Evaluation
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 24 Jul 2003 04:10:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On Wednesday, July 23, 2003, at 06:25 AM, jmt wrote:

> I am trying to have every input line commands managed by Mathematica 
> and sent
> to another program.
>
> I thought I could use $Pre and a function t that performs a 
> redirection to the
> other program, something like :
>
> SetAttributes[$Pre,HoldAll]
> $Pre:=(t[#];Identity[#])&
>
> but, with for instance, t = Print[Unevaluated[#]]&
>
> 1+1 (ENTER TO EVALUATE)
> 2
> Out[]=
> 2
>
> How can I have the t function get the full input line ?
>
> Any ideas ?
>
> jmt
>
>
>
>

Do you mean something like this:


$Pre=Function[x,(Print[Unevaluated[x]];x),HoldAll];


1+1


1+1


2

?


Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/


  • Prev by Date: Re: Mathematica and RedHat 9
  • Next by Date: Can't solve Diff Equ
  • Previous by thread: Input Line Evaluation
  • Next by thread: RE: Input Line Evaluation