Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need references to rule definition languages
Message
From
20/11/2003 12:55:23
 
 
To
20/11/2003 09:56:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00851678
Message ID:
00851965
Views:
8
>>I want to create a very flexible program to interpret employee key punches (in, out, and perhaps missing) and by using a schedule and a previously defined set of rules, calculate the different rates of pay applicable.
>
>I don't know whether this is good enough for you, but I needed to do something similar once, where the user could insert user-defined calculations.
>
>Basically, you can have a field (in a variable number of records) where the user types in a formula, VFP syntax.
>
>With eval(), you can then evaluate those rules.
>
>For a complete solution, you may want to have special variables, which you replace before you eval(): for instance, the expression row(5) might refer to the calculated value of the fifth row. That is, while you evaluate each row, you place the calculated values in an array.
>
>Evaluating VFP expressions has its problems, too - it is difficult to avoid that the user access publicly available variables or methods, which you had only designed for internal use.
>
>However, evaluating formulae with eval() is very flexible, and relatively easy to program.

Thank you Hilmar.
Previous
Reply
Map
View

Click here to load this message in the networking platform