|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Excel type calculationIs there a 'simple' way to perform a calculation on a textbox entry similar
to Excel. For example: if the user enters =2*3 the validated event changes it to 6. Paul Remblance wrote:
> Is there a 'simple' way to perform a calculation on a textbox entry similar In the old days this would have meant lexing the input, building a> to Excel. For example: if the user enters =2*3 the validated event changes > it to 6. parse tree, and walking that to produce a result. These days, we have the (to my mind extremely elegant) method of using regexes to do all the work. See for example <http://www.devx.com/vb2themax/Tip/19438> or just google for regex expression evaluator. -- Larry Lard Replies to group please
Show quote
Hide quote
> Paul Remblance wrote: Not what I would call 'simple' but it works fine, many thanks.>> Is there a 'simple' way to perform a calculation on a textbox entry >> similar >> to Excel. For example: if the user enters =2*3 the validated event >> changes >> it to 6. > > In the old days this would have meant lexing the input, building a > parse tree, and walking that to produce a result. These days, we have > the (to my mind extremely elegant) method of using regexes to do all > the work. See for example > > <http://www.devx.com/vb2themax/Tip/19438> > > or just google for regex expression evaluator.
Inheritance
What happened to the Class view in VS2005? Clean up issues Two Relatively Simple Questions VB 2005 - How to hook into Windows to intercept all mouse events? Hide Window form (top most) Novice Question About Webclient Handling Events in VB.Net A place to discuss future vb featuresause? Menu is disapearing in 2005 |
|||||||||||||||||||||||