[fpc-pascal] LoadLibrary, FreeLibrary & Threads (win32)

2023-06-22 Thread Thomas Kurz via fpc-pascal
Dear all, I have spent 2 days now tracking an access violation in my app which I couldn't debug well because it occured somewhere where no debug info was available, but obviously during a call to FreeLibrary. I don't know whether I am allowed to do this or not, but as far as I have read from

Re: [fpc-pascal] Subscript pointers

2023-06-22 Thread Michael Van Canneyt via fpc-pascal
On Thu, 22 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 22, 2023, at 8:41 PM, Michael Van Canneyt via fpc-pascal wrote: It's for easier pointer math, a construct which has been used in FPC since day 1 (AFAIK). Use with care, since no boundary checks are done. You mean instead

Re: [fpc-pascal] Subscript pointers

2023-06-22 Thread Hairy Pixels via fpc-pascal
> On Jun 22, 2023, at 8:41 PM, Michael Van Canneyt via fpc-pascal > wrote: > > It's for easier pointer math, a construct which has been used in FPC since > day 1 (AFAIK). > Use with care, since no boundary checks are done. You mean instead of doing p + 1 or you can do p[1]? It may have

Re: [fpc-pascal] Subscript pointers

2023-06-22 Thread Michael Van Canneyt via fpc-pascal
On Thu, 22 Jun 2023, Hairy Pixels via fpc-pascal wrote: I've forgotten entirely, what does subscripting a pointer do in Pascal? p[0] returns 100 but after that garbage. Seems like a c-style array which doesn't feel right in the language. var i: Integer; p: PInteger; begin p :=

[fpc-pascal] Subscript pointers

2023-06-22 Thread Hairy Pixels via fpc-pascal
I've forgotten entirely, what does subscripting a pointer do in Pascal? p[0] returns 100 but after that garbage. Seems like a c-style array which doesn't feel right in the language. var i: Integer; p: PInteger; begin p := @i; p^ := 100; writeln(p[0]);

Re: [fpc-pascal] Legitimate use of for and break

2023-06-22 Thread wkitty42--- via fpc-pascal
On 6/21/23 10:54 AM, Steve Litt via fpc-pascal wrote: wkitty42--- via fpc-pascal said on Wed, 21 Jun 2023 08:07:59 -0400 On 6/20/23 10:54 PM, Steve Litt via fpc-pascal wrote: It was a long time ago, but if I remember correctly the Whitesmith Pascal and Turbo Pascal 2 and 3 had either break or