Formula parser - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +---- Forum: FB Projects (http://qbasicnews.com/newforum/forum-16.html) +---- Thread: Formula parser (/thread-8610.html) Pages:
1
2
|
Formula parser - Deleter - 12-22-2005 Under pressure from bluekeyboard, I coded a small formula parser which breaks down and solves a formula (ex (10 ^(2*2))/20+( 90*4)*10+ (1+9)*88 +244 /866- 46^ 2-1 ) Code: function ParseEq(byval eq as string) as double Formula parser - TheBlueKeyboard - 12-23-2005 Damn...I've already told you this, but Im impressed...nice work...l33t coder 8) Formula parser - MystikShadows - 12-23-2005 Yeah, that really is impressive...:-)>.good work deleter. :-)..great work that is. Formula parser - Agamemnus - 12-23-2005 :o Nice work! <*COUGH*> Even though it's looking more like C than QB... </*COUGH*> Formula parser - Deleter - 12-23-2005 Quote::o Even though it's looking more like C than QB...how so? Formula parser - Anonymous - 12-23-2005 really nice dude... Formula parser - Agamemnus - 12-24-2005 No reason. I once coded something similar in LISP, but it only dealt with "- + * /". It also kept fractions. (It would turn into a big fraction with 1 numerator and 1 denominator.) It was hard work.. I'd post it, but it's not on this computer. Come to think of it, I probably deleted it.. *Well, there's the +=, the pointer, the brackets, C-type abbreviations, etc.... Formula parser - anarky - 12-24-2005 "Small" formula? >anarky Formula parser - Deleter - 12-25-2005 Quote:"Small" formula?The parser is small, the formula doesn't have to be. Formula parser - Anonymous - 06-28-2006 hey btw, the parts where you check for symbols, like parenthesis, you should use like ASC( "(" ), it will be evaluated at compile time (so the asm will be the same), but it will be much clearer to read =) |