Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Infix Scheme evaluator
Name: Lotus2 Date: November 26, 2006 at 12:26:59 Pacific OS: Win XP CPU/Ram: 1GB
Comment:
Hi, I would like to be able to evaluate simple expressions such as (1 + 2 + 3) in Scheme, but currently my program only accepts 2 arguments: (1 + 2). Here is the link to the program: http://pastebin.com/833425 The program is executed as follows: (calculate '(1 + 2)), which will output 3. What do I need to do to make it work for expressions of any lenght? Help is appreciated.
Summary: This is a partial program that I wrote (don't mind the multiple stack definitions....its for more I have to do)...but in the mean time, I'm having trouble with the infix to postfix precedence. If you...