Information générale
Catégorie:
Codage, syntaxe et commandes
I use the _CLIPTEXT VFP system variable to store information on the fly about programs that are running without having to interrupt them during execution. Thus, if I want to see a variable in a method and grab its value at runtime, I place the following code in the method text:
local lnSomeVariableToWatch
...
_cliptext = str(lnSomeVariableToWatch)
...
return
This places the contents of the variable into the clipboard. I keep the ClipBoard Viewer on my QuickLaunch bar for just this purpose. If you want to capture several variables you can:
local lnSomeVariable, lnAnotherVariable, lcFinalVariable
...
_cliptext = "lnSomeVariable = " + str(lnSomeVariable) + chr(13)
...
_cliptext = _cliptext + "lnAnotherVariable = " + str(lnAnotherVariable) + chr(13)
...
_cliptext = _cliptext + "lcFinalVariable = " + lcFinalVariable
...
return
Hope this helps
Précédent
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