On Tue, 26 Sep 2006, Jeremy Cowgar wrote:
> Below is a simple program that I *think* is working wrong. I am new to Pascal, > so I may very well be doing something wrong. > > Can anyone comment? Space is always a delimiter. You should use SL.DelimitedText := '"Hello World"|"How are you doing?"'; Michael. > > Jeremy > > -------------------- > > program stringlistbug; > > uses Classes; > > var > SL : TStringList; > begin > SL := TStringList.Create; > SL.Delimiter := '|'; > SL.DelimitedText := 'Hello World|How are you doing?'; > > writeln('One ="', SL[0], '"'); > writeln('Two ="', SL[1], '"'); > end. > > (* > Output: > $ ./stringlistbug > One ="Hello" > Two ="World" > > Shouldn't it be: > $ ./stringlistbug > One = "Hello World" > Two = "How are you doing?" > *) > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal