View Single Post
  #3  
Old 07-17-2003, 08:46 AM
alkrun
Sarnak
 
Join Date: Jan 2002
Posts: 66
Default

I was looking back through this and I missed a change that I had made.

At the end of the op section, where I call buffer.clear(), that needs to be moved outside of the if(!op) block, and the op = ch above it is redundant. So what was:

Code:
            }; 
            op = ch;//save current operator and continue parsing 
            buffer.clear();//clear buffer now that we're starting on a new number 
         } 
         op = ch; 
      }
should be:

Code:
            }; 
         } 
         buffer.clear();//clear buffer now that we're starting on a new number
         op = ch; 
      }
Reply With Quote