English 中文(简体)
在Foxpro,如何获得用于伐木的 Call子
原标题:In Foxpro how to get Call stack info for logging

在Foxpro, 如何获得用于伐木的打字。

最佳回答

你可以利用ASTACKINFO(INFO)的功能,创建填充电线的阵列。

问题回答

使用ASTACKINFO,如Mike Reigler说,

    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




相关问题
how do you suppress a direct call to a managed method?

I want to know if this is inherently possible: Think of a cloud scenario. I allow users to upload their .net code onto my server. However to manage things on my server I can t allow users to write ...

F# Riddle: how to call an overload of a method?

First part: call F# from F# Let s say we have the following type defined in F#: type MyClass = static member Overload1 (x, y) = "Pim" static member Overload1 (x : System.Tuple<_, ...

Django: Passing a request directly (inline) to a second view

I m trying to call a view directly from another (if this is at all possible). I have a view: def product_add(request, order_id=None): # Works. Handles a normal POST check and form submission and ...

IPhone Web App reurn to app after call

I have created a web app that produces a list of items to buy, It also gives a link to call the shop using a Tel: link to its phone number. I want to stay on the app page during the call so the user ...

jqgrid add / delete / modify button call a html page

i work with jqgrid for listings only also i don t use jqgrid forms i need to call external forms (example: update.cgi?id=123) to make modifications on the database. how can i make that ? thanks a lot

热门标签