Calulator Plugin - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Forum: Plug-Ins (/forumdisplay.php?fid=28) +------ Thread: Calulator Plugin (/showthread.php?tid=31474) Calulator Plugin by Orkblutt on 09-13-2004 at 10:55 PM
Yip, RE: Calulator Plugin by RebelSean on 09-13-2004 at 11:23 PM Just downloaded, installed. Works good. But I doubt if I will use it... No bugs. Works fine for me ....Good Job .... RE: Calulator Plugin by Orkblutt on 09-13-2004 at 11:25 PM
you're the first to test it RE: Calulator Plugin by RebelSean on 09-13-2004 at 11:28 PM I just use my calculator on my pc......But I will give it to people if they ever ask for something like this....P.S. Why didn't you get beta testers before ya released?? RE: Calulator Plugin by Orkblutt on 09-13-2004 at 11:33 PM
you're my beta tester RE: Calulator Plugin by riahc4 on 09-13-2004 at 11:58 PM You should make a installer. It looks pretty good from the looks of it tho. No bugs found. RE: Calulator Plugin by Orkblutt on 09-13-2004 at 11:59 PM I'll make an installer when it will be a little more advanced... it's just for test here RE: Calulator Plugin by RebelSean on 09-14-2004 at 12:55 AM No. No bugs. Just asking why didn't you get beta testers before you made it public . RE: Calulator Plugin by Orkblutt on 09-14-2004 at 02:06 AM because you are my beta testers... it's a plugin dev forum here I think... RE: Calulator Plugin by RaceProUK on 09-14-2004 at 12:51 PM
Have you considered using Reverse Polish notation? It completely removes the need for parentheses. RE: Calulator Plugin by Orkblutt on 09-14-2004 at 01:07 PM
Yes... but it's a less natural notation... RE: Calulator Plugin by jameslives on 09-14-2004 at 03:01 PM The /xcalc is used by djmystics stuffplug so it is using stuffplug rather than yours RE: Calulator Plugin by Orkblutt on 09-14-2004 at 03:03 PM what's doing the /xcalc command from stuffplug? RE: Calulator Plugin by jameslives on 09-14-2004 at 03:04 PM your calculator plugin is using /xcalc RE: Calulator Plugin by Orkblutt on 09-14-2004 at 03:06 PM
lol... thanks a lot! RE: Calulator Plugin by lhunath on 09-14-2004 at 03:07 PM 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. RE: Calulator Plugin by jameslives on 09-14-2004 at 03:08 PM stuffplug uses /xcal as a calculator too but it is less technical RE: Calulator Plugin by Orkblutt on 09-14-2004 at 03:15 PM
quote: I'm ok. quote: 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. RE: Calulator Plugin by jameslives on 09-14-2004 at 03:23 PM Make an advanced calc that wil b cool(ish)! RE: Calulator Plugin by RaceProUK on 09-14-2004 at 04:08 PM
quote:It's not really complex tbh, but I agree it's counter-intuitive for those used to infix. RE: Calulator Plugin by lhunath on 09-14-2004 at 04:10 PM Looks complex RE: Calulator Plugin by RaceProUK on 09-14-2004 at 04:12 PM
( 6 + 4 ) * 10 has 7 important tokens. RE: Calulator Plugin by aNILEator on 09-14-2004 at 04:26 PM
i don't see whats wrong with createing a quick text /calc RE: Calulator Plugin by CookieRevised on 09-14-2004 at 05:15 PM
quote:That makes me wonder how you do the calculation and what method you use... because first of all in many language of today there is already an evaluation function for such things (dunno about C++ though). If you use that, you only need to pass the string and you would never have problems like that.... If you do seperate the numbers yourself then, again, this is some basic flaw in your algorithm, as it would be very easy to do such things in a home-made function: * use a recursive function * get the deepest linked parenthesis * calculate the result of that: "*" and "/" coming first, then "+" and "-" Also calculate from LEFT to RIGHT!!! <== the error you made ( * or / doesn't take precedence over each other, just like + and - doesnt....) 1) 666 / 77 2) 8.64 * 8 not: 1) 77 * 8 2) 666 / 616 * update the "string" * exit the function and go up 1 level This is a realy realy basic way in doing it (without optimazations), and you would never have a problem with parenthesis... note about using "-": it is best that you don't implement substractions, but only additions! If a minus is used, it should be considered part of the number, not a math-function. If you do this you also wont have problems with: "8 - 5" because your function would calculate "8 + -5", but most importantly, you can do "8 * -5" without any additional coding... So... I'm realy interested in the method you use... PS: http://www.codeproject.com/cpp/FastMathParser.asp http://www.codeproject.com/cpp/RPNcalculator.asp http://www.programmersheaven.com/zone3/cat415/30915.htm http://www.informit.com/articles/article.asp?p=21484 http://trubetskoy1.narod.ru/english/ppne.html <= implement this and you also have a PPN calculator... RE: Calulator Plugin by Orkblutt on 09-14-2004 at 05:55 PM
quote: C++, VB do that ? quote:have you test mine ? quote: humm it's a little bit complex to explain (I'm too bad in english!!) Using a little more advanced parser tree method than http://www.informit.com/articles/article.asp?p=21484 but it's the same principle... RE: Calulator Plugin by MessEnGer on 09-14-2004 at 06:21 PM
Hey nice plugin works great RE: Calulator Plugin by Millenium_edition on 09-14-2004 at 06:35 PM you don't need to register it. RE: Calulator Plugin by RaceProUK on 09-14-2004 at 07:29 PM
quote:This is probably the best of the links, as it describes an algorithm for converting infix to RPN, which you can then evaluate. That way, users can use the familiar infix, and you can implement the simpler RPN calculator. RE: Calulator Plugin by Orkblutt on 09-14-2004 at 09:58 PM
thank you! |