> On Jun 2, 2019, at 2:48 PM, Michael Van Canneyt
> wrote:
>
>> I just learned that pchar is not ref counted like I used to think so I’m
>> curious why this code doesn’t fail. Shouldn’t this crash because I free
>> TStringList and then access GetText?
>
> You're first doing gettext and then
On Sun, 2 Jun 2019, Ryan Joseph wrote:
I just learned that pchar is not ref counted like I used to think so I’m
curious why this code doesn’t fail. Shouldn’t this crash because I free
TStringList and then access GetText?
You're first doing gettext and then freeing. So this is OK.
string
I just learned that pchar is not ref counted like I used to think so I’m
curious why this code doesn’t fail. Shouldn’t this crash because I free
TStringList and then access GetText?
strings := TStringList.Create;
strings.LoadFromFile(vertexShaderPath);
vertexShaderSource := strings.GetText;
stri
On 16/08/17 15:45, Benito van der Zander wrote:
> Hi,
[sorry I could not stop myself from reordering your top-post]
> Am 16.08.2017 um 15:48 schrieb Gabor Boros:
>> 2017. 08. 16. 15:21 keltezéssel, Michael Van Canneyt írta:
>>> Because the quotes must be the first and last character of each
>>> s
Hi,
very stupid defaults indeed.
I just had a bug last week, because I was using TStringList as map and
forgot to change it to case-sensitive
Cheers,
Benito
Am 16.08.2017 um 15:48 schrieb Gabor Boros:
2017. 08. 16. 15:21 keltezéssel, Michael Van Canneyt írta:
Because the quotes must be
On 2017-08-16 14:48, Gabor Boros wrote:
SL2.QuoteChar:=#0; solved my problem. But strange if the TStringList
think from a starting " the string is quoted. For example if data.cvs
contains "abc|89|0 I got the next result with my example program
(without QuoteChar trick): 0 * abc|89|0
Try using t
2017. 08. 16. 15:21 keltezéssel, Michael Van Canneyt írta:
Because the quotes must be the first and last character of each string
(or "cell").
As noted in another reply, set the quote character to something unused, and
it will disable (or circumvent) quoting altogether.
SL2.QuoteChar:=#0; sol
2017. 08. 16. 15:15 keltezéssel, Kevin Jesshope írta:
Setting the quotechar to something impossible (linefeed, #0 etc) stops
the quote processing.
SL2.QuoteChar:=#0; solved my problem. Thank you!
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.fre
On Wed, 16 Aug 2017, Gabor Boros wrote:
Hi All,
With the attached example program and data.csv I got the next result:
0 * 84392
1 * asfds
2 * hytr
3 * 43421454
4 * O
5 * fdsfds
6 * 654645645 "O" fdsfsd
7 * hgfgfedw
8 * fg
9 * 321.544
10 * 89
11 * 0
"O" fdsfds - broken into two parts which
Setting the quotechar to something impossible (linefeed, #0 etc) stops the
quote processing.
SL2.QuoteChar:=#10;
results in
0 * 84392
1 * asfds
2 * hytr
3 * 43421454
4 * "O" fdsfds
5 * 654645645 "O" fdsfsd
6 * hgfgfedw
7 * fg
8 * 321.544
9 * 89
10 * 0
Regards
Kevin Jesshope - In Touch Com
Hi All,
With the attached example program and data.csv I got the next result:
0 * 84392
1 * asfds
2 * hytr
3 * 43421454
4 * O
5 * fdsfds
6 * 654645645 "O" fdsfsd
7 * hgfgfedw
8 * fg
9 * 321.544
10 * 89
11 * 0
"O" fdsfds - broken into two parts which is bad from my POV. See 4 * O
and 5 * fds
On Wed, 7 Apr 2010, Michael Müller wrote:
Hi,
the following code behaves different between Delphi and Free Pascal:
{$APPTYPE CONSOLE}
{$IFDEF FPC}
{$MODE delphi}
{$ENDIF}
uses
Classes;
type TFoo = class(TStringList)
public
constructor Create;
end;
constructor TFoo.Create;
begin
inherited
Hi,
the following code behaves different between Delphi and Free Pascal:
{$APPTYPE CONSOLE}
{$IFDEF FPC}
{$MODE delphi}
{$ENDIF}
uses
Classes;
type TFoo = class(TStringList)
public
constructor Create;
end;
constructor TFoo.Create;
begin
inherited Create;
{$IFDEF FPC}
// Is needed by Fre
On Mon, 14 Jan 2008, Damien Gerard wrote:
>
> I often use TObjectLis, which is able to destroy by itself objects in its
> list.
> However, is it the same with a TStringList when an object is added with
> AddObject ?
No.
>
> I mean when the method .Clear or Delete are called, is my associated
I often use TObjectLis, which is able to destroy by itself objects in
its list.
However, is it the same with a TStringList when an object is added
with AddObject ?
I mean when the method .Clear or Delete are called, is my associated
object is destroyed in the same time ?
I suppose there i
On 26/09/06, Jeremy Cowgar <[EMAIL PROTECTED]> wrote:
Thanks for the info though, I'll figure another way.
Jeremy
Try the following approach:
--
function tiNumToken(const pStrValue, pStrToken : string) : integer;
var
i, iCount : integer;
lsValue :
I was hoping to use it to parse a pipe delimited file. This will not
work as I do not want " chars as part of the result, I'd have to add
it in, then subtract them out. That's kind of weird behavior that a
delimiter would be forced (space) even when the delimiter field is set.
Thanks for th
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?
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?
Jeremy
program stringlistbug;
uses Classes;
var
SL : TStringList;
begin
SL := TStringList.Create;
SL.
Hi!
How can i query the real memory consumption of a filled TStringList?
Lately I watched 200 stringlists containing approx. 12 String of
differing lengths (12kByte as CSV on disk) more than 70 MBs ...
TIA,
Marc
___
fpc-pascal maillist - [EMAIL PR
- Original Message -
From: Taj Morton <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 14, 2004 1:04 PM
Subject: [fpc-pascal]TStringList index
> Hi all,
> This code has been driving me nuts for the past week.
> IDs:=TStringList.Create
Hi Vincent,
>
> Instead do:
>IDs.Add(Tmp.Strings[0]);
Aha! Thank you!
--Taj
--
panic: kernel trap (ignored)
___
fpc-pascal maillist - [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Sun, 14 Mar 2004 11:04:34 -0800
Taj Morton <[EMAIL PROTECTED]> wrote:
> Hi all,
> This code has been driving me nuts for the past week.
You have to add them to the list, before you can access them.
>IDs:=TStringList.Create;
Creates a list without elements
> for i:=0 to Datab.List_Fie
Hi all,
This code has been driving me nuts for the past week.
IDs:=TStringList.Create;
for i:=0 to Datab.List_Field.Count-1 do
begin
Tmp:=TStringList(Datab.List_Field.items[i]);
IDs.Strings[i]:=Tmp.Strings[0];
Tmp.Free;
end;
It crashes with
An un
24 matches
Mail list logo