[fpc-pascal] Is there a bug in TStrings.Delimiter handling?

Frank Church vfclists at gmail.com
Mon Nov 21 11:36:02 CET 2011


On 21 November 2011 10:06, <michael.vancanneyt at wisa.be> wrote:

>
>
> On Mon, 21 Nov 2011, Graeme Geldenhuys wrote:
>
>  On 2011-11-21 11:17, michael.vancanneyt at w..... wrote:
>>
>>> Where in the Delphi documentation does it mention that?  I couldn't find
>>>> any such reference in the Delphi 7 docs, and I thought FPC implements
>>>> behaviour based on documented behaviour, not implementation behaviour?
>>>>
>>>
>>> Sure. See the 'CommaText' help.
>>>
>>
>> Sure, that is the help for CommaText, not the help for Delimiter or
>> DelimitedText. In the latter documentation it makes no mention of SDF
>> (System Data Format) format usage - which apparently has the Comma or
>> Space character requirement.
>>
>> DelimitedText docs say:  "individual strings are separated by the
>> character specified by the Delimiter property."
>>
>> I guess this boils down to the interpretation of the Delphi
>> documentation then.
>>
>
> In my opinion, the Delphi documentation is quite explicit:
>
> ------------------------------**------------------------------**
> -----------
> When writing DelimitedText, individual strings must be separated using
> QuoteChar at both ends, using Delimiter as a separator, or using both these
> methods.
>
> Note:   CommaText is the same as the DelimitedText property when Delimiter
> is ',' and QuoteChar is '"'.
> ------------------------------**------------------------------**
> -----------
>
> The first paragraph indicate that in fact you should always use " around
> your
> values.
>
> And the last sentence should prompt anyone to go and read the CommaText
> docs.
>
>
This is one of the things concocted to make life difficult for programmers[?].
In my view if the docs are not explicit about space being treated
specially, then it shouldn't be treated specially, but such are the
conventions in the programming world.


> But we're not here to discuss the merits/disadvantages of the Delphi docs
> :-)
>
> Michael.
>
> ______________________________**_________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>



-- 
Frank Church

=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111121/7c198983/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 330.gif
Type: image/gif
Size: 96 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111121/7c198983/attachment.gif>


More information about the fpc-pascal mailing list