Page 1 of 1

How to get the source file name

PostPosted: Fri May 01, 2020 5:32 am
by byron.hopp
I attempted to use ProcFile() 0,1,2,3,4 but never get the actual filename of my source file. Is there a way to do this?

Re: How to get the source file name

PostPosted: Fri May 01, 2020 6:03 am
by Antonio Linares
Byron,

Please run this and tell you what you get:

Code: Select all  Expand view
function Main()

   local n
   
   for n = 1 to 10
      ? n, ProcLine( n ), ProcFile( n ), ProcName( n )
   next
   
return nil

Re: How to get the source file name

PostPosted: Fri May 01, 2020 6:23 am
by byron.hopp
Thank you, my friend...

Re: How to get the source file name

PostPosted: Fri Jun 19, 2020 8:02 pm
by byron.hopp
Antonio,

I tried this on IIS.

?"*****"
for n=1 to 10
?Str(n) + ", " + Str( Procline(n)) + ", " + ProcFile(n) + ", " + ProcName(n)
next
?"*****"

And got this. MY Function is Rpt_003(), I was hoping it would show up somewhere.

*****
1, 0, , HB_HRBDO
2, 70, ..\source\exec.prg, EXECUTE
3, 0, ,
4, 0, ,
5, 0, ,
6, 0, ,
7, 0, ,
8, 0, ,
9, 0, ,
10, 0, ,
*****

Thanks,

Re: How to get the source file name

PostPosted: Sat Jun 20, 2020 9:58 am
by Antonio Linares
Byron,

Please try it up to 20