Re: [DelphiDoc-News] Overloaded functions
Brought to you by:
gveith
From: Gerold V. <Del...@gm...> - 2005-07-02 15:28:26
|
vaa20003 wrote: > At compilation of the project there is a mistake in the module Delphi > ExtActns in function > function DWordEnumToPascalEnumOrd (EnumArray: array of DWORD; > Value: DWORD): Integer; > begin > for Result: = Low (EnumArray) to High (EnumArray) do > if Value = EnumArray [Result] then Exit; > raise Exception. CreateRes (@SInvalidEnumValue); > end; > > The is the no overloaded version of CreateRes then can be called > with these arguments DelphiDoc is not a Compiler. It has only the information of the files it parses. So it does not know all identifiers and types (DWORD is f.i. only known if the unit Windows is also parsed). Overloaded functions are selected by the number and types of the parameters. For this reason DelphiDoc can't pick the correct overloaded function and will always use the first one. It's a limitation, and one that will probably never be fixed. I personally suggest not to use overloaded functions, instead use small suffixes, for instance like most the constructors in the class Exception. It makes the source code easier to read and less ambiguous. Regards Gerold Veith |