What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Calulator Plugin

Calulator Plugin
Author: Message:
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: Calulator Plugin
Yes... but it's a less natural notation...
Implementation that use PostFix notation (RPN) are stack based... operands are popped from a stack, and calculation results are pushed back onto it. Although this concept may seem obscure at first, RPN has the advantage of being extremely easy for a computer to analyze due to it being a regular grammar.

I prefer to use Infix notation because it's easier to write the algebric expression. I'm not sure that everybody are familiar with Postfix ...


One classic exercise in computer science is to write a parser for algebraic expressions, that is, a program that takes an input string like


(3 + 5) * (-4 + (2 - 9))


and calculates the result of this expression. In fact, what you do to compute that expression is to convert it into an internal representation, and then evaluate that representation.

You can represent the expression given above by a linked list:
[Image: img003.gif]
where each node of the list either contains an operator or a number. Once the arithmetic expression is given in list form, evaluating it is easy and can be done in a straightforward, object oriented way...

This post was edited on 09-14-2004 at 01:08 PM by Orkblutt.
09-14-2004 01:07 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Calulator Plugin - by Orkblutt on 09-13-2004 at 10:55 PM
RE: Calulator Plugin - by RebelSean on 09-13-2004 at 11:23 PM
RE: Calulator Plugin - by Orkblutt on 09-13-2004 at 11:25 PM
RE: Calulator Plugin - by RebelSean on 09-13-2004 at 11:28 PM
RE: Calulator Plugin - by Orkblutt on 09-13-2004 at 11:33 PM
RE: Calulator Plugin - by riahc4 on 09-13-2004 at 11:58 PM
RE: Calulator Plugin - by Orkblutt on 09-13-2004 at 11:59 PM
RE: Calulator Plugin - by RebelSean on 09-14-2004 at 12:55 AM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 02:06 AM
RE: Calulator Plugin - by RaceProUK on 09-14-2004 at 12:51 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 01:07 PM
RE: Calulator Plugin - by jameslives on 09-14-2004 at 03:01 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 03:03 PM
RE: Calulator Plugin - by jameslives on 09-14-2004 at 03:04 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 03:06 PM
RE: Calulator Plugin - by lhunath on 09-14-2004 at 03:07 PM
RE: Calulator Plugin - by jameslives on 09-14-2004 at 03:08 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 03:15 PM
RE: Calulator Plugin - by jameslives on 09-14-2004 at 03:23 PM
RE: Calulator Plugin - by RaceProUK on 09-14-2004 at 04:08 PM
RE: Calulator Plugin - by lhunath on 09-14-2004 at 04:10 PM
RE: Calulator Plugin - by RaceProUK on 09-14-2004 at 04:12 PM
RE: Calulator Plugin - by aNILEator on 09-14-2004 at 04:26 PM
RE: Calulator Plugin - by CookieRevised on 09-14-2004 at 05:15 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 05:55 PM
RE: Calulator Plugin - by MessEnGer on 09-14-2004 at 06:21 PM
RE: Calulator Plugin - by Millenium_edition on 09-14-2004 at 06:35 PM
RE: Calulator Plugin - by RaceProUK on 09-14-2004 at 07:29 PM
RE: Calulator Plugin - by Orkblutt on 09-14-2004 at 09:58 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On