Please help me.
I read something like this ( for example ) from con:
5+4*8+(9-5)*(4-5)+4/5+5*(7*(8/4)+4)
and i have to convert it to list :
( 5 + 4 * 8 + ( 9 - 5 ) * ( 4 - 5 ) + 4 / 5 + 5 * ( 7 * ( 8 / 4 ) + 4
) )
how sholud i do it ?
Pawel Kmiotek
In article <············@galaxy.uci.agh.edu.pl>,
Pawel Kmiotek <······@ernie.icslab.agh.edu.pl> wrote:
>Please help me.
>
>I read something like this ( for example ) from con:
>
>5+4*8+(9-5)*(4-5)+4/5+5*(7*(8/4)+4)
>
>and i have to convert it to list :
>( 5 + 4 * 8 + ( 9 - 5 ) * ( 4 - 5 ) + 4 / 5 + 5 * ( 7 * ( 8 / 4 ) + 4
>) )
>
>how sholud i do it ?
Is this homework?
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Tim Bradshaw
Subject: Re: Little problem with converting
Date:
Message-ID: <ey3itumyik5.fsf@cley.com>
* Pawel Kmiotek wrote:
> Please help me.
> I read something like this ( for example ) from con:
> 5+4*8+(9-5)*(4-5)+4/5+5*(7*(8/4)+4)
> and i have to convert it to list :
> ( 5 + 4 * 8 + ( 9 - 5 ) * ( 4 - 5 ) + 4 / 5 + 5 * ( 7 * ( 8 / 4 ) + 4
> ) )
> how sholud i do it ?
I believe the preferred approach is to get your students to ask on
newsgroups.
--tim
Tim Bradshaw <···@cley.com> writes:
> > I read something like this ( for example ) from con:
>
> > 5+4*8+(9-5)*(4-5)+4/5+5*(7*(8/4)+4)
>
> > and i have to convert it to list :
> > ( 5 + 4 * 8 + ( 9 - 5 ) * ( 4 - 5 ) + 4 / 5 + 5 * ( 7 * ( 8 / 4 ) + 4
> > ) )
>
> > how sholud i do it ?
>
> I believe the preferred approach is to get your students to ask on
> newsgroups.
I'm still learning myself (always a student, right?) and I was going
to tackle it myself as an exercise. I thought it involved converting
from infix to prefix or something interesting. Then I saw it was just
tokenizing strings. That's not fun at all.
--
vsync
http://quadium.net/ - last updated Fri Jun 30 22:55:16 MDT 2000
(cons (cons (car (cons 'c 'r)) (cdr (cons 'a 'o))) ; Orjner
(cons (cons (car (cons 'n 'c)) (cdr (cons nil 's))) nil)))