Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need references to rule definition languages
Message
De
20/11/2003 12:55:23
 
 
À
20/11/2003 09:56:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00851678
Message ID:
00851965
Vues:
7
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform