From: John D. Burger
Subject: Re: Algebraic syntax...
Date: 
Message-ID: <53802@linus.UUCP>
In article <····@umd5.umd.edu> ······@umd5.umd.edu (Jon Greenblatt) writes:

>	Has anyone written a lisp macro to do the following:
>Read in:
>	(evalexpr q = a + b / q * (x - y))
>and expand it to:
>	(setf q (+ a (* (/ b q) (- x y))))

Just implement your favorite infix to prefix algorithm.
See Windston's Lisp text for an implementaiton in Lisp.

>	I realy think the world could benifit from such a macro.

I don't wish to spark a flame war about programming style,
but I couldn't disagree more.  I traded in my TI calculator
for an HP years before I heard of Lisp.

-- 
John Burger                                               ····@mitre.org

"You ever think about .signature files? I mean, do we really need them?"
  - alt.andy.rooney
From: Jon Greenblatt
Subject: Re: Algebraic syntax...
Date: 
Message-ID: <4932@umd5.umd.edu>
In article <·····@linus.UUCP> ····@mitre.org (John D. Burger) writes:
>In article <····@umd5.umd.edu> ······@umd5.umd.edu (Jon Greenblatt) writes:
>
>>	Has anyone written a lisp macro to do the following:
>>Read in:
>>	(evalexpr q = a + b / q * (x - y))
>>and expand it to:
>>	(setf q (+ a (* (/ b q) (- x y))))
>
>
>I don't wish to spark a flame war about programming style,
>but I couldn't disagree more.  I traded in my TI calculator
>for an HP years before I heard of Lisp.

	I think people have misunderstood my purpose in asking for this
algorithm. Not beeing a real lisp programmer I have found I realy need a
dynamic environment to work with, for right now OO lisp is the only one
powerful enough. Most of the code I am porting involves long tedius
algebraic formulas to do graphical simulation. Lisp can execute the formulas
quick enough to simulate them but they are unreadable by your average
astronomer/mathematician/physicist/engineer/me. I am not proposing
a change in lisp's syntax and I do not have a syntax fetish! I posted
the Winston and Horn solution because it was very short and I was able to
clarify my original question by posting it. I am still not a real lisp
programmer and never will be, if you look at the last 2,000 lines of code
I have written in lisp you would probably not recongnize it as lisp.
Save flames for those who actualy take my style and call it lisp!
If anyone would like my final solution to this problem, please send me mail,
I will not post on this subject anymore!

					JonnyG.