Computing.Net > Forums > Programming > Infix Scheme evaluator

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

Reply to Message Icon

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Lotus2
Date: November 26, 2006 at 12:34:07 Pacific
Reply:

For some reason, pastebin has not been working properly for me, so here is another link for the program: http://rafb.net/paste/results/HWbSz...


0

Response Number 2
Name: Wolfbone
Date: November 27, 2006 at 07:53:18 Pacific
Reply:

Use paste.lisp.org:

http://paste.lisp.org/display/30792

I added a test in the cond of calculate which will be needed if you amend math-eval-combo as suggested.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Read/Write COM ports via ... Batch Programming Append



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Infix Scheme evaluator

C++ Infix to Postfix program HELP! www.computing.net/answers/programming/c-infix-to-postfix-program-help/12142.html

Binary->Decimal in Scheme www.computing.net/answers/programming/binarydecimal-in-scheme/14815.html

Decimal - > Binary in scheme! www.computing.net/answers/programming/decimal-binary-in-scheme/13668.html