View Single Post
  #38  
Old 11-29-2005, 10:00 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ApothiX
use tokenize, and parse the line
Now I'm confused.
Anyways, I do use tokenize in this script. However, if I were to make it have real functionality, it might be better to parse it myself.
Using tokenize to parse it, you'd want to have custom delimeters +,-,*,/,%,^,(,)
But either way, you're going to have to figure out what you skipped anyway.
So you could parse it yourself, and then store as args and operators. You'd probably store the numbers and operators in scattered arrays, and then try to find some way of applying the order of operations.
Reply With Quote