Re: Tiburón and FastCode



Hi

Hello FastCoders, just a curiosity question, but what kind of concerns
do you have about FastCode routines working with the new VCL coming in
the next release of Delphi?

Nothing yet, but let us discuss what we have to do. Please correct me if I
am wrong.

Functions defined with AnsiString as string type will have no problems

TCharPosFunction = function(Chr : Char; const Str : AnsiString) : Integer;

but functions defined to take or return the type "string" will fail if they
do not support WideString.

TTrimFunction = function (const S: string) : string;

One solution is to test that string=AnsiString prior to calling the
function. Another is to redefine the function prototypes.

TTrimFunction = function (const S: AnsiString) : AnsiString;

IMHO This solution is the correct one.

Why was functions like Trim defined to take and return "string" in the first
place?

Best regards
Dennis Kjaer Christensen


.