PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Function list  (Read 748 times)

Grant McIntosh

  • Little Newbie
  • *
  • Posts: 19
Function list
« on: December 15, 2012, 02:31:54 PM »

Hi,
Some time ago I stumbled upon a program (or perhaps a selection in PB or FF) that would list 'what Functions/Subs were being called where', in your source code (eg. Function ABC calls Function XYZ and Function UVW) or whatever.
I had a feeling I stumbled upon it on this site somewhere, but I could be wrong. I've searched my PC, PB, other forums and can't find it, so I'm hoping somebody here might be able to point me in the right direction.  I hope my vague description is enough, I just can't recall the details.

Thanks  :)


Logged
PBCC6.04
PBWin10.04
FF3.70
Vista

Carl Oligny

  • Little Newbie
  • *
  • Posts: 22
  • FF3 User, VB.Net, VB6, T-SQL
Re: Function list
« Reply #1 on: December 15, 2012, 05:17:31 PM »

You may be thinking of the trace function. Trace New filename,Trace On , Trace Off , Trace Close - in that order.
Logged

Grant McIntosh

  • Little Newbie
  • *
  • Posts: 19
Re: Function list
« Reply #2 on: December 16, 2012, 04:49:29 AM »

Thanks Carl, You've reminded me to keep the Trace function in mind and that will be helpful (zTrace I've used before too), though I don't think that's what I was thinking of. Unfortunately it was a while back and I've forgotten many of the details, but recall thinking it would handy.  I had a feeling this was a little more along the lines of PBCodec (which I've found very useful), where it wouldn't just list the trace path, but actually list what subs/functions called what subs/functions, called what... and so on. Sort of like a 'picture' of what could occur, rather than what did occur (as in a trace).

It occurred to me that it might be useful when looking at somebody else's code, where you were trying to understand the possible program flow - or for that matter your own code when you have to come back to it years later and although it's well commented, you are trying to get a picture in your head of how it all works.

Logged
PBCC6.04
PBWin10.04
FF3.70
Vista

Jim Dunn

  • Junior Member
  • **
  • Posts: 111
  • Jim Dunn
Re: Function list
« Reply #3 on: December 16, 2012, 01:13:27 PM »

Don't forget you need #TOOLS ON for the TRACE commands to work:

Code: [Select]
#COMPILE EXE

#TOOLS ON ' <=== REQUIRED for TRACE

FUNCTION PBMAIN () AS LONG

    TRACE NEW "Trace.txt"
    TRACE ON
    TRACE PRINT "Before"
    ? "Test"
    TRACE PRINT "After"
    TRACE PRINT "TRACE PRINT printed this user data from " + FUNCNAME$ + "()"
    TRACE OFF
    TRACE CLOSE

END FUNCTION
Logged
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Grant McIntosh

  • Little Newbie
  • *
  • Posts: 19
Re: Function list
« Reply #4 on: December 20, 2012, 10:28:58 AM »

Thanks Jim, I had a look in the PB Help and got a bit more familiar with it and with your details here, should be helpful :)  Still haven't found the thing I was originally after though. Still, with this and perhaps Ztrace (which I'm still trying to get the latest Ver), I can run through the prog with a trace on and essentially build up a similar picture, so quite handy. PB Codec has been really helpful too, spotted a number of my mistakes! http://www.planetsquires.com/protect/forum/Smileys/default/embarrassed.gif
Thanks again guys.
Logged
PBCC6.04
PBWin10.04
FF3.70
Vista