Re: [fpc-pascal] Seek with text file

2018-04-03 Thread James Richters
For my use, it seems to work very well. I am creating a file where it pretty much appends a new entry to the end of a file, but occasionally the process needs to over-write the previous entry. This TStringlist is indeed very easy to work with this Tstringlist, especially since I was given an

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Mark Morgan Lloyd
On 03/04/18 12:45, Rik van Kekem wrote: From the code-snippet from Anthony you can see it's really easy to use. 1000 lines of about average 70 characters per lines would be72*1000=70MB. 72 kB, not MB. Big enough to give some very old systems problems if they used a Windows component as an e

Re: [fpc-pascal] Lazarus Mailing list down?

2018-04-03 Thread wkitty42
On 04/03/2018 07:00 AM, Torsten Bonde Christiansen wrote: Hi All. I haven't gotten any mails on the Lazarus mailing list since 31/03-2018 - and the two mails I sent today doesn't seem to have gone through. this one seems to have made the trip just fine... Kind regards, Torsten. __

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Rik van Kekem
Op 03-04-2018 13:58 schreef James Richters: Thank you for the advice and for the example. I don't know what is considered a large file.. these files can be maybe about 1000 lines long, most will be less, would this solution be suitable for files of this size? Is Tstringlist something like an a

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread James Richters
Thank you for the advice and for the example. I don't know what is considered a large file.. these files can be maybe about 1000 lines long, most will be less, would this solution be suitable for files of this size? Is Tstringlist something like an array of strings? -Original Message-

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Rik van Kekem
Op 03-04-2018 13:04 schreef Anthony Walter: If the file is not to big you could simply write: procedure ChangeLastLine(const FileName, NewLine: string); var   S: TStrings; begin   S := TStringList.Create;   try     S.LoadFromFile(FileName);     if S.Count > 0 then       S[S.Count - 1] := N

Re: [fpc-pascal] Lazarus Mailing list down?

2018-04-03 Thread Michael Van Canneyt
On Tue, 3 Apr 2018, Torsten Bonde Christiansen wrote: Hi All. I haven't gotten any mails on the Lazarus mailing list since 31/03-2018 - and the two mails I sent today doesn't seem to have gone through. I have the same problem. Michael. ___ fpc-p

[fpc-pascal] Lazarus Mailing list down?

2018-04-03 Thread Torsten Bonde Christiansen
Hi All. I haven't gotten any mails on the Lazarus mailing list since 31/03-2018 - and the two mails I sent today doesn't seem to have gone through. Kind regards, Torsten. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

[fpc-pascal] 0030208: "not" doesn't work properly on bitpacked booleans

2018-04-03 Thread Luca Olivetti
I was going to report a bug but I see it's already fixed https://bugs.freepascal.org/view.php?id=30208 however it's still there in 3.0.4, released a year and a half later than the fix. Will the fix be backported/merged to the next 3.0.6? For the time being I have to use fpc 2.6.4, but that's not

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Anthony Walter
If the file is not to big you could simply write: procedure ChangeLastLine(const FileName, NewLine: string); var S: TStrings; begin S := TStringList.Create; try S.LoadFromFile(FileName); if S.Count > 0 then S[S.Count - 1] := NewLine else S.Add(NewLine); finally

Re: [fpc-pascal] Seek with text file

2018-04-03 Thread Rik van Kekem
Op 03-04-2018 12:03 schreef James Richters: So then I tried Var Myfile: file of String; Mydata:String; Assign(myfile,'test.txt'); Reset(myfile); Seek(myfile,FILESIZE(myfile)-1); Write(myfile,'New Line'+mydata); Close(myfile); And what d

[fpc-pascal] Seek with text file

2018-04-03 Thread James Richters
I am trying to figure out how I can remove the last line of a text file to replace it with a new one. I can do this with typed files with seek... but I am confused on how I could do this with just a text file. If I use: Var Myfile: Text; Mydata:String; Assign(myfile,'test.txt'

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-03 Thread Michael Van Canneyt
On Tue, 3 Apr 2018, Tomas Hajny wrote: On Tue, April 3, 2018 09:21, Michael Van Canneyt wrote: . . But cheetah do have whiskers. Other people complained the old logo weren't really look like a cheetah's face. Which "old logo" is that ? As far as I know, the only logo FPC has is the little

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-03 Thread Tomas Hajny
On Tue, April 3, 2018 09:21, Michael Van Canneyt wrote: . . >> But cheetah do have whiskers. Other people complained the old logo >> weren't really look like a cheetah's face. > > Which "old logo" is that ? As far as I know, the only logo FPC has is the > little running cheetah on the website.

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-03 Thread Michael Van Canneyt
Please look at the lazarus logo/icon. It has no whiskers. I opened lazarus.freepascal.org and I found it's using a paw as its logo. Did I miss something? Sorry… I haven't been following Lazarus news for quite a while, so I don't know the current logo. I meant the icon it uses for the IDE

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-03 Thread Michael Van Canneyt
On Mon, 2 Apr 2018, Mr Bee via fpc-pascal wrote: The proposed logo is updated. What's new: - it has eye balls. - more rounded face. - more rounded ears. - more visible whiskers. Cheetah is a member of cat big family. So, of course it will look like a cat or kitten. Nothing I can do about it.