Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Calculator
Message
From
29/09/2001 23:51:58
 
 
To
28/09/2001 15:41:44
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00562073
Message ID:
00562311
Views:
20
Yes, an accounting system than I made, where needed a calculator
what I make is a simple one:
Put a textbox for input values
Put a textbox for show results
Out a command button to process the calculation
Put a command button to cancel
On Calc button get the calc operations from textbox, verify than is a valid expresion and do an Eval() function and show the result
The valid expresion is for allow only valid expresions and avoid to user input a VFP command or missuse the calculator.

Advantages, full control over the expresion, grouping values with (), use of internal functions like sin(), cos(), abs(), etc...

Just my solution

Mauricio
Be fast like the Fox
Be free like the Penguin
Se Rápido como el Zorro
Se libre como el Pingüino
Previous
Reply
Map
View

Click here to load this message in the networking platform