File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Help: convert from polish to infix notation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help: convert from polish to infix notation" Watch "Help: convert from polish to infix notation" New topic
Author

Help: convert from polish to infix notation

christian elvsaas
Greenhorn

Joined: Sep 30, 2003
Posts: 2
Hi all!
I'm trying to write a program to convert an expression from direct polish notation to infix notation. I have got a good start, but there are some problems when i enter a bit longer expressions, eg.
/*+ab-cd+c2
is displayed:
( ( ( a + b ) * ( c - d ) ) ( c + 2 ) / )
instead of:
( ( ( a + b ) * ( c - d ) ) / ( c + 2 ) )
as it should...so now I was hoping for some assistance on this problem, as I am stuck and don't know what to do.
My program is currently like this:

Cheers,
Christian
Edit:
I fixed it!! Yohooo!
[ September 30, 2003: Message edited by: christian elvsaas ]

cheers,<br />christian
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Congrats!!


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help: convert from polish to infix notation