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

Pages: (3): « First « 1 [ 2 ] 3 » Last »
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
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Calulator Plugin
The /xcalc is used by djmystics stuffplug so it is using stuffplug rather than yours
[Image: jmzsigsmall3dd.gif]
09-14-2004 03:01 PM
Profile PM Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: Calulator Plugin
what's doing the /xcalc command from stuffplug?
09-14-2004 03:03 PM
Profile E-Mail PM Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Calulator Plugin
your calculator plugin is using /xcalc
[Image: jmzsigsmall3dd.gif]
09-14-2004 03:04 PM
Profile PM Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: Calulator Plugin
lol... thanks a lot!

and what's the action performed by the /xcalc comand from stuffplug ???
09-14-2004 03:06 PM
Profile E-Mail PM Find Quote Report
lhunath
Full Member
***

Avatar
.{ Lord Daisy }.

Posts: 343
39 / Male / –
Joined: May 2004
RE: Calulator Plugin
Postfix is rather complex and hard and weird for people who never used it before so I think you shouldn't convert your plugin to use that. Instead, you should figure out a way to effectivly convert infix to postfix, and then interprete the postfix. That way you won't have any problems with the ()'s etc.
{ -[Image: lhunath.gif]- }
09-14-2004 03:07 PM
Profile E-Mail PM Web Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Calulator Plugin
stuffplug uses /xcal as a calculator too but it is less technical
[Image: jmzsigsmall3dd.gif]
09-14-2004 03:08 PM
Profile PM Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: Calulator Plugin
quote:
Postfix is rather complex and hard and weird for people who never used it before so I think you shouldn't convert your plugin to use that. Instead, you should figure out a way to effectivly convert infix to postfix, and then interprete the postfix. That way you won't have any problems with the ()'s etc.


I'm ok.

quote:
stuffplug uses /xcal as a calculator too but it is less technical


lol... less technical?? :|
Hummm... 1+1=3 in stuffplug? ;)
I'll try to make an advanced calculator (some algebrical fct, and no byte limitation)... so maybe stuffplug can remove /xcalc command from her release... or I can change that in next versions.

That will be a good idea that we can see a page with all commands from all popular plugins.


09-14-2004 03:15 PM
Profile E-Mail PM Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: Calulator Plugin
Make an advanced calc that wil b cool(ish)!
[Image: jmzsigsmall3dd.gif]
09-14-2004 03:23 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Calulator Plugin
quote:
Originally posted by lhunath
Postfix is rather complex and hard and weird for people who never used it before
It's not really complex tbh, but I agree it's counter-intuitive for those used to infix.
[Image: spartaafk.png]
09-14-2004 04:08 PM
Profile PM Web Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


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