Author | Topic: Compiler BUG? Xbase++ (R) Version 2.00.1185 | |
---|---|---|
Claudio Driussi | Compiler BUG? Xbase++ (R) Version 2.00.1185 on Sat, 31 Oct 2020 12:55:45 +0100 I think I found a Compiler BUG. I have a DLL with a function called FileExt: --------------------------------------------------------------- function FileExt(cFile, lUpper) local nPos := rat('.',cFile) local cExt := iif(nPos==0,"",substr(cFile,nPos+1)) if "\" $ cExt ; cExt := "" ; endif period is part of relative path if lUpper == .t. cExt := upper(cExt) endif return trim(cExt) --------------------------------------------------------------- If I call it without recompile the whole project in this way: if FileExt("myfile.pdf", .t.) != 'PDF' csBox("must be a pdf!") loop endif I got this error: oError:cargo : NIL oError:description : Parameter has a wrong data type if I recompile the whole it works ok. So I duplicated the function and renamed it to FileExtension and now with the call if FileExtension("myfile.pdf", .t.) != 'PDF' csBox("must be a pdf!") loop endif All works fine. --------------------------------------------------------------- Seems to me that there are a not documented function FileExt in the XPP library which goes to conflict. Some one can confirm. Claudio | |
Andreas Gehrs-Pahl | Re: Compiler BUG? Xbase++ (R) Version 2.00.1185 on Sat, 31 Oct 2020 20:46:11 -0400 Claudio, >Seems to me that there are a not documented function FileExt >in the XPP library which goes to conflict. You are right, there is a function called FileExt in the XppRT1 (Runtime 1) DLL since version 1.90.317, released 03/24/2005 ("Cape Horn" Beta 3). But if you try ot call that function, you will get an error "Function is not declared". This is also true for several other functions, like: FDrive(), FPath(), FPathAdd(), FPathMerge(), etc., while some others can be called, like: FTimeCmp(), GetCurDir(), Hash2Bin(), LL2Bin(), SendAppEvent() and many more. Some of those might be internal or experimental functions (procedures or classes), which won't be there in the future or they might be added to the documentation at a later time. It would be nice if Alaska would document those (and several other of the undocumented features/functions), though I wouldn't call it a compiler bug, but a documentation issue. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [L]: https://www.LinkedIn.com/in/AndreasGehrsPahl [F]: https://www.FaceBook.com/AbsoluteSoftwareLLC | |
Claudio Driussi | Re: Compiler BUG? Xbase++ (R) Version 2.00.1185 on Sun, 01 Nov 2020 12:36:42 +0100 Many thanks Andreas! So is safe to me to rename the function to avoid this issue. I have another issue with debugger. I have to recompile my dll each time I try to debug functions in DLL, if I didn't debugger pointer go to a wrong position. I will try to renane to see if belongs to the same problem. Regards Claudio In 01/11/20 01:46, Andreas Gehrs-Pahl wrote: > Claudio, > >> Seems to me that there are a not documented function FileExt >> in the XPP library which goes to conflict. > > You are right, there is a function called FileExt in the XppRT1 (Runtime 1) > DLL since version 1.90.317, released 03/24/2005 ("Cape Horn" Beta 3). But if > you try ot call that function, you will get an error "Function is not > declared". This is also true for several other functions, like: FDrive(), > FPath(), FPathAdd(), FPathMerge(), etc., while some others can be called, > like: FTimeCmp(), GetCurDir(), Hash2Bin(), LL2Bin(), SendAppEvent() and many > more. Some of those might be internal or experimental functions (procedures > or classes), which won't be there in the future or they might be added to > the documentation at a later time. > > It would be nice if Alaska would document those (and several other of the > undocumented features/functions), though I wouldn't call it a compiler bug, > but a documentation issue. > > Hope that helps, > > Andreas > | |
Claudio Driussi | Workbench debugger bug was (Compiler BUG? Xbase++ (R) Version 2.00.1185) on Sun, 01 Nov 2020 13:05:38 +0100 On 01/11/20 12:36, Claudio Driussi wrote: > I have another issue with debugger. I have to recompile my > dll each time I try to debug functions in DLL, if I didn't > debugger pointer go to a wrong position. I will try to renane > to see if belongs to the same problem. No. In my DLL, if I change an source file, often (but not always) the pointer of debugger breakpoints will mistake position. I did some tries but at the moment I can't replicate the error in a ripetible way. I will try to build a simplee project to show it. Claudio > > Regards > > Claudio > > In 01/11/20 01:46, Andreas Gehrs-Pahl wrote: >> Claudio, >> >>> Seems to me that there are a not documented function FileExt >>> in the XPP library which goes to conflict. >> >> You are right, there is a function called FileExt in the XppRT1 >> (Runtime 1) >> DLL since version 1.90.317, released 03/24/2005 ("Cape Horn" Beta 3). >> But if >> you try ot call that function, you will get an error "Function is not >> declared". This is also true for several other functions, like: FDrive(), >> FPath(), FPathAdd(), FPathMerge(), etc., while some others can be called, >> like: FTimeCmp(), GetCurDir(), Hash2Bin(), LL2Bin(), SendAppEvent() >> and many >> more. Some of those might be internal or experimental functions >> (procedures >> or classes), which won't be there in the future or they might be added to >> the documentation at a later time. >> >> It would be nice if Alaska would document those (and several other of the >> undocumented features/functions), though I wouldn't call it a compiler >> bug, >> but a documentation issue. >> >> Hope that helps, >> >> Andreas >> > |