Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent VFP Function from being used
Message
De
03/01/2006 11:53:25
 
 
À
03/01/2006 11:46:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01082633
Message ID:
01082674
Vues:
12
>>
>>Another alternative might be to check for certain functions before you compile. Just use the $ operator. I suggest you use a table with forbidden functions. Note that user-defined functions might also be excluded, since the user might otherwise have access to features in your program which you would rather want to restrict (or control, through some condition).
>>
>>
>>if "sqrt" $ MemoCode
>>  MessageBox("You are using a forbidden function.")
>>else
>>  * compile and execute here
>>endif
>>
>>
>>You can also replace the code before compiling.
>
>That's Right Hilmar
>That should work too.
>
>Thanks

I think a better alternative on the long run would be to define a class with methods, where each method is a function which available to the. Thus you give him his own sublanguage, by controlling that the only calls done are the methods of the object. The only other key words you would allow are Flow-of-control-ones (IF, CASE, FOR, IIF etc).

Lennert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform