Information générale
Catégorie:
Codage, syntaxe et commandes
Ben,
You'll need the MS Script control on a form to evaulate non-compiled code. VB compiles many things to native code for speed (by default).
(Hey, no arguments, it does.) VFP has the advantage of interpreting every line and run time, so macro subst. isn't a big deal to VFP.
Add the MS script control to a form and the code below can be used:
With ScriptControl1
.Language = "VBScript"
MsgBox "2+3 = " & .Eval("2+3")
End With
HTH,
Ed
>Does anyone know of a function in VB that acts like the EVALUATE function in VFP? I posted list a while back and lost the answer.
>
>For those not familiar with the function it would do the following:
>
>------------------
>dim myInt as Integer
>
>myInt = EVALUATE("3 + 4")
>
>'myInt would then contain 7 as an integer.
>----------------------
>
>
>Thanks in Advance!
>Ben
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement