[fpc-pascal] download site and mixed http

2024-04-25 Thread Mattias Gaertner via fpc-pascal
Hi, On https://www.freepascal.org/down/x86_64/linux-hungary.html are links without "https://;, causing the browser to bark: "File not downloaded: Potential security risk". Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] class constructor exception

2024-04-23 Thread Mattias Gaertner via fpc-pascal
On 23.04.24 09:32, Andrey Zubarev via fpc-pascal wrote: Hi, Set ExceptProc to your handler in unit initialization section in unit usesed before the problematic one? It is set by lcl TApplication. Just found out: It works with other exceptions, but not with EAbort. And that indeed creates

[fpc-pascal] class constructor exception

2024-04-22 Thread Mattias Gaertner via fpc-pascal
Hi, When an exception is raised in a class constructor the application aborts without any error. How can I get an error? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] fpc-pascal Digest, Vol 236, Issue 35

2024-03-01 Thread Mattias Gaertner via fpc-pascal
On 29.02.24 19:21, Jos Wegman via fpc-pascal wrote: The packages for the Lazarus mac OS x86-64 Lazarus 3.2 on sourceforge are not correct. There is no compiler package. Instead there are two fpc src packages. Just a heads-up. Thanks for the hint. I uploaded the package. Mattias Op do

[fpc-pascal] Lazarus Bugfix Release 3.2

2024-02-28 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 3.2. This is a bugfix release and was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_3.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

[fpc-pascal] Lazarus Release 3.0

2023-12-21 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 3.0. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_3.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2 Here is the list

Re: [fpc-pascal] method-definition

2023-12-15 Thread Mattias Gaertner via fpc-pascal
On 15.12.23 16:00, Martin Frb via fpc-pascal wrote: [...] However, a method can be reintroduced, and be virtual/abstract. type   TFoo = class     procedure Bar; virtual; abstract;   end;   TFoo2 = class(TFoo)     procedure Bar; reintroduce; virtual; abstract;   end; Can that make

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 16:42, Mattias Gaertner via fpc-pascal wrote: On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 16:58, Michael Van Canneyt via fpc-pascal wrote: [...] Yes, absolutely. But we may need a ref. counting mechanism then. Or at least we need to decide who 'owns' the streams; At first sight it seems to me the gTTFontCache should own all font streams. Yes. On second thought,

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this:  TTFFileInfo = class(TObject)  ...  

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 13:38, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this:   TTFFileInfo = class(TObject)   ...   public     // Load a TTF file from file or stream.    

[fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
Hi, How to load a custom font from a stream instead of from a file? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Lazarus Release Candidate 2 of 3.0

2023-10-16 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the second release candidate of Lazarus 3.0. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_3.0_release_notes

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 17:18:56 +0700 Hairy Pixels via fpc-pascal wrote: >[...] > > First of all: Is it valid UTF-8 or do you have to check for broken > > or malicious sequences? > > If they give the parser broken files that's their problem they need > to fix? the user has control over the file

[fpc-pascal] Lazarus Release Candidate 1 of 3.0

2023-07-03 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the first release candidate of Lazarus 3.0. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_3.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 15:27:10 +0700 Hairy Pixels via fpc-pascal wrote: >[...] > I was just curious how ChatGPTs implementation compared to other > programmer. Apparently the quality is often terrible. But it can be useful. > What I'm really trying to do is improve a parser so it can read UTF-8

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 12:01:11 +0700 Hairy Pixels via fpc-pascal wrote: > > On Jul 3, 2023, at 11:36 AM, Mattias Gaertner via fpc-pascal > > wrote: > > > > Useless array of. > > And it does not return the bytecount. > > it's an open array so what's the probl

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 14:12:03 +0700 Hairy Pixels via fpc-pascal wrote: > > On Jul 3, 2023, at 2:04 PM, Tomas Hajny via fpc-pascal > > wrote: > > > > No - in this case, the "header" is the highest bit of that byte > > being 0. > > Oh it's the header BIT. Admittedly I don't understand how this

Re: [fpc-pascal] Parse unicode scalar

2023-07-02 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 11:58:33 +0700 Hairy Pixels via fpc-pascal wrote: > > On Jul 3, 2023, at 11:43 AM, Mattias Gaertner via fpc-pascal > > wrote: > > > > There is a header byte. > > > > It depends, if you want to check for invalid UTF-8 sequences. >

Re: [fpc-pascal] Parse unicode scalar

2023-07-02 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 08:29:11 +0700 Hairy Pixels via fpc-pascal wrote: > > On Jul 2, 2023, at 11:16 PM, Jer Haan wrote: > > > > This table is copied from Wikipedia.Hope it’s useful > > for you. If you improve the code pls let me know. > > This is perfect, thanks! Much more complicated than I

Re: [fpc-pascal] Parse unicode scalar

2023-07-02 Thread Mattias Gaertner via fpc-pascal
On Mon, 3 Jul 2023 09:34:10 +0700 Hairy Pixels via fpc-pascal wrote: >[...] > Ok today I I just tried to ask ChatGPT and got an answer. I must have > asked the wrong thing yesterday but it got it right today (with one > syntax error using an inline "var" in the code section for some > reason).

Re: [fpc-pascal] Pchar from constant string

2023-06-29 Thread Mattias Gaertner via fpc-pascal
On Thu, 29 Jun 2023 21:18:44 +0700 Hairy Pixels via fpc-pascal wrote: > What is really happening in this snippet? I think it must be > implicitly taking the address of the constant string but is it also > adding the null terminator automatically? The string prints with > writeln so it must be

[fpc-pascal] 3123 inherited not supported inside inline

2023-06-24 Thread Mattias Gaertner via fpc-pascal
Hi, With development fpc I get a lot of messages like: fgl.pp(1112,1) Note: (3123) "inherited" not yet supported inside inline procedure/function Since most users can't do anything about the fgl inline modifier, this message dilutes the output. IMO such a message should be off by default.

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

2023-06-16 Thread Mattias Gaertner via fpc-pascal
On Fri, 16 Jun 2023 20:51:42 +0700 Hairy Pixels via fpc-pascal wrote: > > On Jun 16, 2023, at 6:23 PM, Thomas Kurz via fpc-pascal > > wrote: > > > > Whether it's elegant is a different question. In my opinion YES > > because it often gives better readable code than nested "if" > > statements

Re: [fpc-pascal] What is -CO ?

2023-06-15 Thread Mattias Gaertner via fpc-pascal
On Thu, 15 Jun 2023 22:00:03 +0200 Jonas Maebe via fpc-pascal wrote: > On 09/06/2023 12:03, Mattias Gaertner via fpc-pascal wrote: > > What is -CO? > > > > In the docs I can only find this sentence: > > "Check for possible overflow of integer operations"

[fpc-pascal] What is -CO ?

2023-06-09 Thread Mattias Gaertner via fpc-pascal
Hi, What is -CO? In the docs I can only find this sentence: "Check for possible overflow of integer operations" Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Mattias Gaertner via fpc-pascal
On Sun, 4 Jun 2023 16:04:48 +0300 Juha Manninen via fpc-pascal wrote: > Why the following code fails to compile? > > type > TMyRec = record > ss: String; > ii: Integer; > end; > TMyClass = class > private > fName: String; > fRecInstance: TMyRec; > property >

Re: [fpc-pascal] Freeing memory with exceptions

2023-05-25 Thread Mattias Gaertner via fpc-pascal
On Thu, 25 May 2023 07:55:39 +0200 Sven Barth via fpc-pascal wrote: >[...] > But this is what "managed type" *means*: that the compiler and RTL > will make sure that it's correctly freed as long as nothing > unexpected happens. ... and exceptions are expected. Maybe better: As long as the user

Re: [fpc-pascal] Size of set.

2023-05-23 Thread Mattias Gaertner via fpc-pascal
On Tue, 23 May 2023 06:50:08 -0400 James Richters via fpc-pascal wrote: > >You can transverse a set with > > for ... in An even better: for e in TEnum do ; // traverse every possible enum for e in aSet do ; // traverse only enums in aSet > Interesting, I learned something new, I did

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Mattias Gaertner via fpc-pascal
On Thu, 30 Mar 2023 13:03:52 +0200 Tomas Hajny via fpc-pascal wrote: >[...] > I don't know where it is configured in Lazarus, but you need to use > the -Xe parameter when using command-line compilation. Project / Project Options / Compiler Options / All Options Mattias

[fpc-pascal] Lazarus Release 2.2.6

2023-03-09 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.2.6. This is a bugfix release and was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

[fpc-pascal] CalDAV

2023-02-20 Thread Mattias Gaertner via fpc-pascal
Hi, How to connect to nextcloud CalDAV using fpc? I need to connect to one calendar, list dates, delete dates, create dates. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] aligned?

2023-01-30 Thread Mattias Gaertner via fpc-pascal
On Mon, 30 Jan 2023 18:45:48 +0100 Florian Klämpfl via fpc-pascal wrote: > > Am 30.01.2023 um 14:03 schrieb Mattias Gaertner via fpc-pascal > > : > > > > Hi, > > > > What does the fpc built-in function aligned? > > > > For example in FloatT

[fpc-pascal] aligned?

2023-01-30 Thread Mattias Gaertner via fpc-pascal
Hi, What does the fpc built-in function aligned? For example in FloatToStrFIntl: Str(Double(Extended(Aligned(Value))):precision+7, Result); Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Why in {$mode delphi} it works and in {$mode objfpc} it doesn't?

2023-01-16 Thread Mattias Gaertner via fpc-pascal
On Mon, 16 Jan 2023 22:12:52 +0100 Mattias Gaertner via fpc-pascal wrote: > On Mon, 16 Jan 2023 19:50:34 +0100 > Giuliano Colla via fpc-pascal wrote: > > > I stumbled into a problem I don't understand. > > > > I'm developing a little program for an ftp clie

Re: [fpc-pascal] Why in {$mode delphi} it works and in {$mode objfpc} it doesn't?

2023-01-16 Thread Mattias Gaertner via fpc-pascal
On Mon, 16 Jan 2023 19:50:34 +0100 Giuliano Colla via fpc-pascal wrote: > I stumbled into a problem I don't understand. > > I'm developing a little program for an ftp client. In order to > connect to the site I need the site address from the site name, and > the libc gethostbyname() provides

Re: [fpc-pascal] TFPHttpClient & TFPHttpServer

2023-01-03 Thread Mattias Gaertner via fpc-pascal
On Tue, 3 Jan 2023 23:58:42 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: >[...] > > Q4: TFPHTTPServer has property Address. I reckon it will be set to > > 'localhost' here. Is it correct? > > It depends on what you want. Best is to leave it empty. That will use 0.0.0.0, which is

Re: [fpc-pascal] Open array in object constructor gives error

2022-12-31 Thread Mattias Gaertner via fpc-pascal
On Sat, 31 Dec 2022 10:35:52 +0700 Hairy Pixels via fpc-pascal wrote: > Why is using the open array parameter illegal using the Object type? > > > > {$mode objfpc} > > program test; > > type > TMyObject = object > constructor Create(text: array of String); >

Re: [fpc-pascal] Exploring block statements with CodeTools not working

2022-10-17 Thread Mattias Gaertner via fpc-pascal
On Mon, 17 Oct 2022 08:41:23 +0700 Hairy Pixels via fpc-pascal wrote: > > On Oct 16, 2022, at 9:53 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > > Blocks like WHILE and TRY. > > > > Codetools are optimized for finding declarations of a few &g

Re: [fpc-pascal] Exploring block statements with CodeTools not working

2022-10-16 Thread Mattias Gaertner via fpc-pascal
On Sun, 16 Oct 2022 21:05:23 +0700 Hairy Pixels via fpc-pascal wrote: > > On Oct 16, 2022, at 4:17 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > > That's correct. There are no nodes for simple statements like > > "a:=1". > > Really? I was

Re: [fpc-pascal] Exploring block statements with CodeTools not working

2022-10-16 Thread Mattias Gaertner via fpc-pascal
On Sun, 16 Oct 2022 09:19:56 +0700 Hairy Pixels via fpc-pascal wrote: > I’m trying to look at the code in a the begin..end section of this > sample program but for some reason when it gets to the BeginBlock > node child count is always 0 (other nodes are as expected though). That's correct.

Re: [fpc-pascal] CodeTools complete code

2022-10-04 Thread Mattias Gaertner via fpc-pascal
On Tue, 4 Oct 2022 14:47:29 +0700 Hairy Pixels via fpc-pascal wrote: > > On Oct 4, 2022, at 2:40 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > > If you don't want the comment above the class, use > > > > with CodeToolBoss.SourceChangeCac

Re: [fpc-pascal] CodeTools complete code

2022-10-04 Thread Mattias Gaertner via fpc-pascal
On Tue, 4 Oct 2022 14:10:29 +0700 Hairy Pixels via fpc-pascal wrote: > I’m trying to use the CompleteCode function in the CodeTools library > and doing some formatting I don’t want. > > Calling it over the “MyProcedure” method in the class it added a > comment and moved the declaration under

[fpc-pascal] Lazarus Release 2.2.4

2022-09-28 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.2.4. This is a bugfix release and was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Re: [fpc-pascal] Are there any drawbacks to "reference to"?

2022-06-20 Thread Mattias Gaertner via fpc-pascal
On Mon, 20 Jun 2022 20:32:44 +0700 Hairy Pixels via fpc-pascal wrote: > Can anyone explain why this works? TProc is a normal function pointer > so how did it capture gVar? gVar is global. No need to capture it. Only stack vars needs capture. Mattias

Re: [fpc-pascal] Feature Announcement: Function References and Anonymous Functions

2022-05-26 Thread Mattias Gaertner via fpc-pascal
On Thu, 26 May 2022 21:47:06 +0200 Sven Barth via fpc-pascal wrote: >[...] > The Free Pascal Developer team is pleased to finally announce the > addition of a long awaited feature, though to be precise it's two > different, but very much related features: Function References and > Anonymous

[fpc-pascal] Lazarus Release 2.2.2

2022-05-19 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.2.2. This is a bugfix release and was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Re: [fpc-pascal] Element type of set at compile time

2022-05-15 Thread Mattias Gaertner via fpc-pascal
On Sun, 15 May 2022 09:03:58 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: > On Sun, 15 May 2022, Hairy Pixels via fpc-pascal wrote: > > > Is there a compiler intrinsic to get the element type of a set at > > compile time? So if you have “set of T” it should return T. > > I don't

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-30 Thread Mattias Gaertner via fpc-pascal
On Sat, 30 Apr 2022 18:17:25 +0700 Hairy Pixels via fpc-pascal wrote: >[...] > So I wonder if the shorthand: > > generic THelper = class helper for TMyClass AFAIK it is planned for mode objfpc to support distinguishing types via template count as in mode delphi: type TMyClass = class

Re: [fpc-pascal] Correct way for using TThread.ForceQueue?

2022-04-25 Thread Mattias Gaertner via fpc-pascal
On Mon, 25 Apr 2022 15:47:57 +0200 Thomas Kurz via fpc-pascal wrote: >[...] > As far as I have seen so far, the common solution is to use a > variable inside the class to cache the parameters, then to use a > DoCallSync procedure which takes no parameters but can use the cached > values inside,

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-25 Thread Mattias Gaertner via fpc-pascal
On Mon, 25 Apr 2022 10:15:26 +0700 Hairy Pixels via fpc-pascal wrote: >[...] > For the case of types I understand we must specialize because we’re > creating a new type each time and there is nothing to infer from the > context, but for functions it’s backwards, that is we know the types > being

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread Mattias Gaertner via fpc-pascal
On Fri, 22 Apr 2022 20:51:56 +0200 Martin Frb via fpc-pascal wrote: >[...] > Well, I tested: It uses the type of the first Param. So it calls a > function for both param of type Byte. The cardinal argument is > converted. (potentially truncated). I agree that Delphi should have used a better

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread Mattias Gaertner via fpc-pascal
On Fri, 22 Apr 2022 20:51:56 +0200 Martin Frb via fpc-pascal wrote: >[...] > I did explore what happens if I throw different types at it, and see > how the current implementation deals with this (what I call) lack of > type safety. > And also asked the question, how should it act?  (Because the

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-21 Thread Mattias Gaertner via fpc-pascal
On Thu, 21 Apr 2022 10:00:46 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: > On Thu, 21 Apr 2022, Hairy Pixels via fpc-pascal wrote: > > > > > > >> On Apr 21, 2022, at 3:48 AM, Mattias Gaertner via fpc-pascal > >> wrote: > >>> W

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-20 Thread Mattias Gaertner via fpc-pascal
On Wed, 20 Apr 2022 19:15:15 +0200 Sven Barth via fpc-pascal wrote: >[...] > This feature is enabled with the modeswitch > ImplicitFunctionSpecialization and is for now not enabled by default > as this has the potential to break existing code. Sad. This feature really makes generic functions

Re: [fpc-pascal] RTLEventWaitFor

2022-04-05 Thread Mattias Gaertner via fpc-pascal
On Tue, 5 Apr 2022 10:23:45 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: >[...] > RTLEventWaitFor uses WaitForSingleObject internally. > > According to this: > > https://docs.microsoft.com/en-gb/windows/win32/sync/wait-functions > > The system clock (and not some high-performance

[fpc-pascal] RTLEventWaitFor

2022-04-04 Thread Mattias Gaertner via fpc-pascal
Hi Michael, Under Linux a RTLEventWaitFor(e,1) usually waits at most 1ms. But under Windows it usually waits at least 15ms. It seems to round to nearest 1/64 of a second. Googling this lead me to question the sanity of some bloggers. Has anyone an idea if this is normal on Windows and if there

Re: [fpc-pascal] converting to UTF8

2022-03-23 Thread Mattias Gaertner via fpc-pascal
On Tue, 22 Mar 2022 04:47:50 -0400 cibersvaa--- via fpc-pascal wrote: > Lazarus 2.012 > FPC: 3.2.0 > SVN: 64642 > OS: Windows 10 Pro/win64 > > I'm reading from a file with character set win1252, I want to convert > it to utf8, but I can't. > > procedure TestString; > var >Original:string;

Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Mattias Gaertner via fpc-pascal
On Tue, 22 Mar 2022 09:31:19 +0100 Victor Campillo via fpc-pascal wrote: >[...] > OPT="-O- -O1 -gl" Is this paranoid or useful? -O- -O1 Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Bit manipulation helpers

2022-02-21 Thread Mattias Gaertner via fpc-pascal
On Mon, 21 Feb 2022 13:34:29 +0100 gabor via fpc-pascal wrote: > W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze: > > Oh my, I was confusing my terms I think. I wanted to do bit masking > > (I think it's called). I was expecting there to be something like > > TestFlag in the RTL

Re: [fpc-pascal] bug or feature?

2022-02-13 Thread Mattias Gaertner via fpc-pascal
On Sat, 12 Feb 2022 12:14:14 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: > On Sat, 12 Feb 2022, Mattias Gaertner via fpc-pascal wrote: > > > Hi, > > > > This can't be right, can it? > > > > type > > TBird = class > >proced

Re: [fpc-pascal] bug or feature?

2022-02-12 Thread Mattias Gaertner via fpc-pascal
On Sat, 12 Feb 2022 17:58:27 +0100 Jonas Maebe via fpc-pascal wrote: >[...] > >> I wouldn't consider this to be working by design, but rather > >> because of implementation limitations. +1 pas2js complained. That's how I found out. Someone renamed a class, added an alias for compatibility,

[fpc-pascal] bug or feature?

2022-02-12 Thread Mattias Gaertner via fpc-pascal
Hi, This can't be right, can it? type TBird = class procedure Fly; end; TEagle = TBird; // alias procedure TEagle.Fly; begin end; Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Lazarus Release 2.2

2022-01-05 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.2. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2 Here is the list

Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-05 Thread Mattias Gaertner via fpc-pascal
On Wed, 5 Jan 2022 09:40:49 +0200 "Dimitrios Chr. Ioannidis via fpc-pascal" wrote: > Hi, > > Στις 5/1/2022 2:00 π.μ., ο/η Rainer Stratmann via fpc-pascal έγραψε: > > https://freepascal.org/ > > the certificate issued for www.freepascal.org and not for > freepascal.org . > > It seems that

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-28 Thread Mattias Gaertner via fpc-pascal
On Tue, 28 Dec 2021 23:11:42 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: >[...] > > Slightly off topic, and my Object Pascal is getting a bit rusty as > > the years go by. ;-) In your factory above, is the "as > > IInterface" part needed. No. > Can't the FPC compiler automatically

Re: [fpc-pascal] Named optional arguments

2021-11-28 Thread Mattias Gaertner via fpc-pascal
On 26.11.21 04:10, Ryan Joseph via fpc-pascal wrote: [...]The majority of the infrastructure is already there so it needs to merely be extended. What do you mean? Is there already some call by arg names in some mode(switch)? Mattias ___

Re: [fpc-pascal] Lazbuild error on Windows

2021-10-29 Thread Mattias Gaertner via fpc-pascal
On Fri, 29 Oct 2021 10:07:58 +0700 Ryan Joseph via fpc-pascal wrote: > Sorry I didn't look up high enough in the output to see this before. > It looks like lazbuild can't find the correct version of the compiler > that is packaged. I can confirm that path exists but I think the > variable

[fpc-pascal] Lazarus Release Candidate 1 of 2.2.0

2021-07-12 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the first release candidate of Lazarus 2.2. This release was built with FPC 3.2.2. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Mattias Gaertner via fpc-pascal
On Wed, 16 Jun 2021 12:26:54 +0200 Bo Berglund via fpc-pascal wrote: > On Wed, 16 Jun 2021 12:08:26 +0200 (CEST), Michael Van Canneyt via > fpc-pascal wrote: > > >FPC/lazarus tell you which units are unused, and in the Lazarus IDE > >you can use the quick actions of the message dialog to

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Mattias Gaertner via fpc-pascal
On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: > If I by habit add a bunch of often used units to the uses clause will > that affects the size of the compiled application even if they are > not in fact used? Yes, if they have e.g. initialization sections. Mattias

[fpc-pascal] -FNsystem

2021-05-27 Thread Mattias Gaertner via fpc-pascal
Hi, There are some dotted units in fpc, e.g. system.uitypes. So it would be nice to have -FNsystem in the default fpc.cfg (Delphi compatible). What do you think? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Mattias Gaertner via fpc-pascal
On Wed, 19 May 2021 19:46:43 +0100 Martin Wynne via fpc-pascal wrote: >[...] > I found that the problem is in the Lazarus Application.OnIdle event, > which fails to honour the Done parameter and runs continuously: How do you know, it is a bug in OnIdle, and not something continuously emitting

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Mattias Gaertner via fpc-pascal
On Tue, 18 May 2021 18:37:38 -0400 Travis Siegel via fpc-pascal wrote: > Apparently, you can release cpu cycles, but it's with the sched_yield > (section 2 in the man pages), not the sleep command on linux. What sleep command are you referring to? What do you mean with cpu cycles? Sleep works

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-29 Thread Mattias Gaertner via fpc-pascal
On Thu, 29 Apr 2021 07:52:19 +0200 Sven Barth via fpc-pascal wrote: >[...] > You completely ignored my first point, which in this case is the much > more significant one: Pascal does not support type inference. FPC does not. Delphi does:

Re: [fpc-pascal] Unicode chars losing information

2021-03-09 Thread Mattias Gaertner via fpc-pascal
On Tue, 9 Mar 2021 08:04:54 +0100 Sven Barth via fpc-pascal wrote: >[...] > FPC is not Java. In FPC you have more fine-grained control over the > resulting binary than "install big, fat runtime". Not to mention that > FPC can target resource constrained systems as well. Optional is good. Maybe

[fpc-pascal] Why has the tkFloat default value changed?

2021-02-28 Thread Mattias Gaertner via fpc-pascal
Hi, In FPC 3.2.0 the default "Default" value of a single/double property has changed from $8000 (fpc 3.0.4) to 0. This breaks TWriter. The $8000 means the property has no default value. Now FPC 3.2.0 no longer writes a property if the value is 0.0, no matter what the stored function

[fpc-pascal] Lazarus Release 2.0.12

2021-02-25 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.0.12. This release was built with FPC 3.2.0. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.0 Windows users

Re: [fpc-pascal] Traits Proposal

2021-02-19 Thread Mattias Gaertner via fpc-pascal
On Fri, 19 Feb 2021 15:37:03 -0700 Ryan Joseph via fpc-pascal wrote: > > On Feb 19, 2021, at 3:14 PM, Sven Barth via fpc-pascal > > wrote: > > > > TObject *is* always the root, but the first entry of the > > inheritance list of a class *must* be a class as well. > > I'm testing interface

Re: [fpc-pascal] self corrupted after jump to overridden method

2021-02-17 Thread Mattias Gaertner via fpc-pascal
On Wed, 17 Feb 2021 15:27:40 +0100 Mattias Gaertner via fpc-pascal wrote: > Hi, > > I have a strange bug, that suddenly Self becomes a random value when > calling an overridden virtual method. It happens when activating a > TCustomSQLQuery. > Below is a gdb stacktrace with fpc

[fpc-pascal] self corrupted after jump to overridden method

2021-02-17 Thread Mattias Gaertner via fpc-pascal
Hi, I have a strange bug, that suddenly Self becomes a random value when calling an overridden virtual method. It happens when activating a TCustomSQLQuery. Below is a gdb stacktrace with fpc 3.3.1, where Self became 0. On other runs I saw various other values. Where to start looking? It happens

[fpc-pascal] bug or feature

2021-01-01 Thread Mattias Gaertner via fpc-pascal
Hi, library test; procedure Test; begin end; exports Test name 3 'abc'; //^^^ end. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Mattias Gaertner via fpc-pascal
On Wed, 2 Dec 2020 13:48:35 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: > On Wed, 2 Dec 2020, Mattias Gaertner via fpc-pascal wrote: >[...] > > What about the simple explanation, that there are two > > resourcestrings with the same name in RTLConsts and LCLStrC

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Mattias Gaertner via fpc-pascal
On Wed, 2 Dec 2020 13:30:13 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: > On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote: > >[...] > > but it doesn't work (sCannotFocus holds the original, not the > > translated, string). > > Seems like Lazarus is not using the regular

[fpc-pascal] fppdf textwidth

2020-11-09 Thread Mattias Gaertner via fpc-pascal
Hi all, This has probably been asked before but I can't find the answer. How to get the text width of a string? I see code for the standard pdf fonts, but all these functions are private. Mattias ___ fpc-pascal maillist -

Re: [fpc-pascal] uses in '' relative paths

2020-10-08 Thread Mattias Gaertner via fpc-pascal
On Thu, 8 Oct 2020 09:37:06 -0300 "Marcos Douglas B. Santos via fpc-pascal" wrote: >[...] > > > unit TOML; > > > interface > > > uses > > > TOMLParser in '/sources', > > > TOMLTypes in '/sources'; > > > > uses > > TOMLParser in 'sources/TOMLParser.pas', > > TOMLTypes in

Re: [fpc-pascal] uses in '' relative paths

2020-10-07 Thread Mattias Gaertner via fpc-pascal
On Wed, 7 Oct 2020 10:53:16 -0600 Ryan Joseph via fpc-pascal wrote: > I'm trying "uses in" which I never knew existed before. > > The idea is that I provide a path to TOML.pas using -Fu then use the > "in" syntax to reference the units which are in a subdirectory. This > makes it safe from the

Re: [fpc-pascal] TFPGMapObject duplicate errors

2020-10-03 Thread Mattias Gaertner via fpc-pascal
On Sat, 3 Oct 2020 15:53:58 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: > On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote: >[...] > > Thanks. Sneaky that sorted had to be set to true. Not sure why that > > would be. > > Because otherwise it would take a linear search to do

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Mattias Gaertner via fpc-pascal
On Wed, 09 Sep 2020 17:44:11 +0200 Tomas Hajny via fpc-pascal wrote: > On 2020-09-09 17:37, Mattias Gaertner via fpc-pascal wrote: > > On Wed, 09 Sep 2020 17:25:09 +0200 > > Tomas Hajny via fpc-pascal wrote: > > > >> On 2020-09-09 13:51, LacaK via fpc-pascal w

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Mattias Gaertner via fpc-pascal
On Wed, 09 Sep 2020 17:25:09 +0200 Tomas Hajny via fpc-pascal wrote: > On 2020-09-09 13:51, LacaK via fpc-pascal wrote: >[...] > A simple question - is TLabel.Caption declared as Utf8String (I don't > use Lazarus)? _Then_ it should work without any issues and/or special > attention from users.

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-08 Thread Mattias Gaertner via fpc-pascal
On Tue, 8 Sep 2020 20:27:20 +0200 Jonas Maebe via fpc-pascal wrote: > On 07/09/2020 08:51, LacaK via fpc-pascal wrote: > > > attached simple Lazarus compilable project (one Form). > > > > ... > > type > >   String1250 = type AnsiString(1250); > > > > const > >   c2: AnsiString = 'áéíóčž'; > >

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Mattias Gaertner via fpc-pascal
On Sun, 30 Aug 2020 16:22:58 +0200 (CEST) Michael Van Canneyt wrote: > On Sun, 30 Aug 2020, Mattias Gaertner wrote: > > > On Sun, 30 Aug 2020 14:30:11 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> [...] > >>> Is there a workaround for fpc 3.2.0? > >> > >> Yes: > >> > >>

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Mattias Gaertner via fpc-pascal
On Sun, 30 Aug 2020 14:16:14 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: > On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > > > On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) > > Michael Van Canneyt via fpc-pascal > > wrote: > > > >>

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Mattias Gaertner via fpc-pascal
On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: > On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > > > Hi, > > > > AddLibrary('libbla.pp') creates under Linux "blalib.so". > > I want "bla.so". &g

[fpc-pascal] fpmake addlibrary

2020-08-30 Thread Mattias Gaertner via fpc-pascal
Hi, AddLibrary('libbla.pp') creates under Linux "blalib.so". I want "bla.so". How to do that? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus start problem after power outage on RPi4

2020-08-24 Thread Mattias Gaertner via fpc-pascal
On Mon, 24 Aug 2020 09:12:19 +0200 Bo Berglund via fpc-pascal wrote: > Tonight there was a power outage in my home where I have a RaspberryPi > 4B development system with Lazarus 2.0.8 and Fpc 3.0.4. > > When it happened the system was running including Lazarus. > Now when I start Lazarus I get

[fpc-pascal] Lazarus Release 2.0.10

2020-07-11 Thread Mattias Gaertner via fpc-pascal
The Lazarus team is glad to announce the release of Lazarus 2.0.10. This release was built with FPC 3.2.0. The previous release Lazarus 2.0.8 was built with FPC 3.0.4. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes

Re: [fpc-pascal] Codetools, identity nodes from includes

2020-07-07 Thread Mattias Gaertner via fpc-pascal
On Tue, 7 Jul 2020 14:09:09 +0700 Ryan Joseph via fpc-pascal wrote: > > On Jul 7, 2020, at 4:57 AM, Mattias Gaertner via fpc-pascal > > wrote: > > > > Something like this: > > > > Node:=AItem.Node; > > if Node<>nil then > > begin &g

Re: [fpc-pascal] Codetools, identity nodes from includes

2020-07-06 Thread Mattias Gaertner via fpc-pascal
On Mon, 6 Jul 2020 10:27:55 +0700 Ryan Joseph via fpc-pascal wrote: > Currently I walk the node tree for a given unit and collect all the > relevant symbols into a list which represents the symbols in the > current document. I'm running into problems with include files > because I'm getting

Re: [fpc-pascal] CodeTools reduce number of completions

2020-07-02 Thread Mattias Gaertner via fpc-pascal
On Thu, 2 Jul 2020 12:55:24 +0700 Ryan Joseph via fpc-pascal wrote: >[...]What would be more helpful is knowing which identifiers are > from those large units and opting out of additional processing. Is > that something which can be quickly known? Maybe something like this:

  1   2   3   >