[fpc-pascal] AnsiDequotedStr not return empty for ""

Peter Vreman peter at freepascal.org
Sun Mar 2 13:14:54 CET 2008


>>>> That also in Delphi, but it is for me wrong.
>>>> In fact that make my program working wrong when send UserName="Admin"
>>>> and Password="", it check password as '""' not empty.
>>>
>>> The behaviour is compatible with Delphi and will not be changed.
>>
>> Might as well remove it then, as it seems to me it's pretty useless this
>> way, and people can only get confused in case empty things are not
>> working as expected?
> 
> In case always check Delphi documentation to see wether the behaviour 
> you see is intentional.

In case of "" it is also ambigious what you want. Because "" in the 
middle of the string is translated to a single ". So you might also 
expect that it returns a single " instead of an empty string.

Peter




More information about the fpc-pascal mailing list