Re: [fpc-pascal] TIniFile crash

2025-07-28 Thread Jean SUZINEAU via fpc-pascal
May be it would be safer to read the list of sections with INI.ReadSections and then delete each section with INI.EraseSection ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, Hairy Pixels via fpc-pascal wrote: On Jul 28, 2025 at 10:13:20 AM, Martin Frb via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: Or have array element index done different? type TFooArray = array (.0..9.) of Byte; SomeFooArray(.3.) := 1; Oh wait, that compil

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Hairy Pixels via fpc-pascal
On Jul 28, 2025 at 10:13:20 AM, Martin Frb via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Or have array element index done different? > type TFooArray = array (.0..9.) of Byte; > SomeFooArray(.3.) := 1; > > Oh wait, that compiles. ;) > never saw that before! so ugly too. Why do

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Sven Barth via fpc-pascal
Travis Siegel via fpc-pascal schrieb am Mo., 28. Juli 2025, 15:42: > > Take for instance, comments. > > { this is a comment} > > works just as well as > > (* this is a comment *) > > I don't believe I've ever seen you complain about multiple ways to put > comments in the code > That is a bad exa

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Sven Barth via fpc-pascal
Pierre Muller via fpc-pascal schrieb am Mo., 28. Juli 2025, 15:27: > > > Le 28/07/2025 à 10:07, Michalis Kamburelis via fpc-pascal a écrit : > > Michael Van Canneyt wrote: > >> Personally, I prefer the backtick solution. > >> The triple quote is slow, it requires postprocessing the string. > >> T

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Martin Frb via fpc-pascal
On 28/07/2025 17:59, Michalis Kamburelis via fpc-pascal wrote: Moreover, in case of multi-line comments, the additional confusion (which I still think is possible) is because there are {$xxx} compiler directives changing their behavior, and some of them apply only to backtick-style, some only to

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
> Your argument makes no sense. There's always been multiple ways to do > many things in pascal, and it's never caused any more confusion than any > other typical language construct. I don't think the comparison to "multiple ways to write a comment" is proper here. Because various ways to write c

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Hairy Pixels via fpc-pascal
On Jul 28, 2025 at 9:12:53 AM, Michael Van Canneyt wrote: > Because the amount of whitespace to remove at the start of every line > is determined by the amount of spaces before the closing triple quotes. > > Ergo, you can only strip the whitespaces at the start of every line > after the whole st

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, Hairy Pixels via fpc-pascal wrote: On Jul 28, 2025 at 1:04:49 AM, Michael Van Canneyt via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: Personally, I prefer the backtick solution. The triple quote is slow, it requires postprocessing the string. The backtick soluti

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread DougC via fpc-pascal
Actually, in Pascal (* and *) came before { }. But this is quite off topic for this thread, so let's leave it. Doug C. On Mon, 28 Jul 2025 10:41:31 -0400 Hairy Pixels via fpc-pascal wrote --- On Jul 28, 2025 at 8:24:38 AM, Brian via fpc-pascal < mailto:fpc-pascal@lists.freepasc

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Hairy Pixels via fpc-pascal
On Jul 28, 2025 at 8:24:38 AM, Brian via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > The two ways to do comments are, IMO, almost essential. The way I was > taught to write Pascal, about 45 years ago now, was to use braces for > comments - but then if you needed to comment out a whole

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Brian via fpc-pascal
On 7/28/25 09:26, Travis Siegel via fpc-pascal wrote: Your argument makes no sense.  There's always been multiple ways to do many things in pascal, and it's never caused any more confusion than any other typical language construct. Take for instance, comments. { this is a comment} works jus

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Hairy Pixels via fpc-pascal
On Jul 28, 2025 at 1:04:49 AM, Michael Van Canneyt via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Personally, I prefer the backtick solution. > The triple quote is slow, it requires postprocessing the string. > The backtick solution needs only one pass. > > > I positively HATE it whe

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Hairy Pixels via fpc-pascal
On Jul 28, 2025 at 7:26:08 AM, Travis Siegel via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Your argument makes no sense. There's always been multiple ways to do > many things in pascal, and it's never caused any more confusion than any > other typical language construct. > > Take fo

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, Pierre Muller via fpc-pascal wrote: Le 28/07/2025 à 10:07, Michalis Kamburelis via fpc-pascal a écrit : Michael Van Canneyt wrote: Personally, I prefer the backtick solution. The triple quote is slow, it requires postprocessing the string. The backtick solution needs o

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Travis Siegel via fpc-pascal
On 7/27/2025 7:24 PM, David Connolly via fpc-pascal wrote: Personally, I prefer the back tick, but they're both excellent additions to the language. As do I. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/c

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Travis Siegel via fpc-pascal
Your argument makes no sense.  There's always been multiple ways to do many things in pascal, and it's never caused any more confusion than any other typical language construct. Take for instance, comments. { this is a comment} works just as well as (* this is a comment *) I don't believe I

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Pierre Muller via fpc-pascal
Le 28/07/2025 à 10:07, Michalis Kamburelis via fpc-pascal a écrit : Michael Van Canneyt wrote: Personally, I prefer the backtick solution. The triple quote is slow, it requires postprocessing the string. The backtick solution needs only one pass. I positively HATE it when people start treati

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, DougC via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal < mailto:fpc-pascal@lists.freepascal.org > schrieb am Mo., 28. Juli 2025, 11:21: If this argument is to carry any weight, then we also need to remove all instances where FPC did things differently from Delph

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, Sven Barth via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal schrieb am Mo., 28. Juli 2025, 11:21: If this argument is to carry any weight, then we also need to remove all instances where FPC did things differently from Delphi: [snip] - anonymous functions expl

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread DougC via fpc-pascal
Michael Van Canneyt via fpc-pascal < mailto:fpc-pascal@lists.freepascal.org > schrieb am Mo., 28. Juli 2025, 11:21: If this argument is to carry any weight, then we also need to remove all instances where FPC did things differently from Delphi: False. This argument still carries considerab

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Mo., 28. Juli 2025, 11:21: > If this argument is to carry any weight, then we also need to remove > all instances where FPC did things differently from Delphi: > > [snip] > - anonymous functions explicitly are interfaces. > [snip] Anonymous function

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Mo., 28. Juli 2025, 09:05: > The solution is simple: > if you don't like the backticks, don't use them. > Independent of the specific feature this is not a good argument, because more often than not one has to work with third party code, thus one def

[fpc-pascal] TIniFile crash

2025-07-28 Thread James Richters via fpc-pascal
I'm having an issue with TIniFile, I have a pretty simple procedure, It deletes the old .ini file, waits for it to be gone, creates a new one, writes a bunch of variables to it, then frees it. It works 99% of the time, but 1% of the time it crashes right in the middle of writing the file. The

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
> But pas2js exists, I believe it is important, and that explains my decision. OK. I will have to accept this decision :) Well I see your arguments (Pas2js compatibility + you feel Delphi design is "horror" :) ). Even if I do see a different decision as more optimal. For the sake of clarity, I do

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 28 Jul 2025, Michalis Kamburelis via fpc-pascal wrote: Michael Van Canneyt wrote: Personally, I prefer the backtick solution. The triple quote is slow, it requires postprocessing the string. The backtick solution needs only one pass. I positively HATE it when people start treating

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michalis Kamburelis via fpc-pascal
Michael Van Canneyt wrote: > Personally, I prefer the backtick solution. > The triple quote is slow, it requires postprocessing the string. > The backtick solution needs only one pass. > > > I positively HATE it when people start treating whitespace as > significant. No YAML or Python for me on th

Re: [fpc-pascal] Feature "Multiline strings" added

2025-07-28 Thread Michael Van Canneyt via fpc-pascal
On Sun, 27 Jul 2025, Michalis Kamburelis wrote: Michael Van Canneyt wrote: Let's delete custom very special FPC variant with ticks. leave only Delphi variant, please. in English it is maybe called as 'align implementation with Delphi'. It is aligned with Delphi ? why? to keep the same so