The few of you who use Fletchie's dll may find this useful.
I was using 2 routines in a subroutine in my program:
GetPathFile(inc_file$,path,filename)
which you pass a full path to a file and it splits that into 'path' and 'filename'
and
GetFileExt(filename,fname,ext)
which you pass a name to and it splits it into 'name' and 'ext'
He stated in his documentation that if you weren't interested in a given parameter being returned you could pass a NULL.
so I called the functions like this:
GetPathFile(inc_file$,"",filename)
GetFileExt(filename,fname,"")
And they returned the proper information I wanted.
In another subroutine (called after the sub above) I had a local string variable called c_struct.
Heres what I was seeing:
Quotec_struct = ""
print "["+c_struct+"]"
' resulted in [inc]
c_struct = "z"
print "["+c_struct+"]"
' resulted in [z]
c_struct = ""
print "["+c_struct+"]"
' resulted in [inc] again
I changed c_struct from a string to a istring and back;
changed it from a local to global variable and back.
Still got the same result. Fought it for hours.
Then I did a DUH!; where's the 'inc' coming from?
That's the extention of the files that I'm looking at so I went to the 2 functions of Fletchie's:
I changed the way I was calling them from:
GetPathFile(inc_file$,"",filename)
GetFileExt(filename,fname,"")
to
GetPathFile(inc_file$,path,filename)
GetFileExt(filename,fname,ext)
and wah-lah; my problem was solved.
Maybe I'm the only dummy who would ever do it the way I did but I'm posting this here just in case I have a dlone (dummy-clone) out there.
Larry