Dans Foxpro comment obtenir Appel d'info pile pour l'enregistrement. (Ne pas utiliser l'interface de débogage, mais dans le code lors de l'exécution)En Foxpro Comment arriver Appel d'info pile pour la connexion
0
A
Répondre
3
Vous pouvez utiliser la fonction ASTACKINFO() à créer un tableau rempli avec la pile d'appels.
1
utilisation ASTACKINFO comme MikeReigler dit alors quelque chose comme ceci:
cStack = ""
nStackCount = astackinfo(arrStackInfo)
for nCount = nStackCount to 1 step -1
cStack = cStack + "Level " + transform(arrStackInfo(nCount, 1)) + chr(13)
cStack = cStack + iif(not empty(arrStackInfo(nCount, 2)), ;
"Filename: " + transform(arrStackInfo(nCount, 2)) + chr(13) , "")
cStack = cStack + iif(not empty(arrStackInfo(nCount, 3)), ;
"Module/Object name: " + transform(arrStackInfo(nCount, 3)) + chr(13) , "")
cStack = cStack + iif(not empty(arrStackInfo(nCount, 4)), ;
"Module/Object filename: " + transform(arrStackInfo(nCount, 4)) + chr(13), "")
cStack = cStack + iif(not empty(arrStackInfo(nCount, 5)), ;
"Line # : " + transform(arrStackInfo(nCount, 5), "999999") + chr(13), "")
cStack = cStack + iif(not empty(arrStackInfo(nCount, 6)), ;
"Code: " + transform(arrStackInfo(nCount, 6)) + chr(13), "")
cStack = cStack + chr(13)
next