Re: [fpc-devel] Unicode RTL for FPC

2023-01-13 Thread Mattias Gaertner via fpc-devel
On Fri, 13 Jan 2023 11:25:56 +0100 Tomas Hajny via fpc-devel wrote: >[...] > > My /etc/fpc.cfg contains: > > > > # searchpath for units and other system dependent things > > -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget > > -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/* > >

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-13 Thread Bart via fpc-devel
On Fri, Jan 13, 2023 at 11:13 AM wkitty42--- via fpc-devel wrote: > > > First of all, adding a 'end;" for the "with" compiles under Linux. > > That's because widestring=unicodestring on Linux. > > i'm a little surprised there is no "mismatched begin/end" error with the caret > pointing to the

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-13 Thread wkitty42--- via fpc-devel
On 1/12/23 10:29 AM, Mattias Gaertner via fpc-devel wrote: On Wed, 11 Jan 2023 23:58:34 +0100 Bart via fpc-devel wrote: [...] begin with WideStringManager do begin writeln(1); Wide2AnsiMoveProc(pwidechar(WSource),RawByteString(ADest), CP_UTF8, Length(WSource));

Re: [fpc-devel] Unicode RTL for FPC

2023-01-13 Thread Mattias Gaertner via fpc-devel
On Sun, 8 Jan 2023 08:46:37 +0100 (CET) Michael Van Canneyt via fpc-devel wrote: >[...] > Should have been > > make install SUB_TARGET=unicodertl PP=path/to/the/new/compiler This does not install the new compiler, so I used the compiler/ppcx64 exe directly to compile a program. I see in the

Re: [fpc-devel] Unicode RTL for FPC

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Mattias Gaertner via fpc-devel wrote: On Sun, 8 Jan 2023 08:46:37 +0100 (CET) Michael Van Canneyt via fpc-devel wrote: [...] Should have been make install SUB_TARGET=unicodertl PP=path/to/the/new/compiler This does not install the new compiler, so I used the

Re: [fpc-devel] Unicode RTL for FPC

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Tomas Hajny via fpc-devel wrote: On 2023-01-13 11:22, Mattias Gaertner via fpc-devel wrote: On Sun, 8 Jan 2023 08:46:37 +0100 (CET) Michael Van Canneyt via fpc-devel wrote: [...] Should have been make install SUB_TARGET=unicodertl PP=path/to/the/new/compiler This

Re: [fpc-devel] Unicode RTL for FPC

2023-01-13 Thread Tomas Hajny via fpc-devel
On 2023-01-13 11:22, Mattias Gaertner via fpc-devel wrote: On Sun, 8 Jan 2023 08:46:37 +0100 (CET) Michael Van Canneyt via fpc-devel wrote: [...] Should have been make install SUB_TARGET=unicodertl PP=path/to/the/new/compiler This does not install the new compiler, so I used the

Re: [fpc-devel] Incorrect hint (5023) "unit not used", if unit is only used in a conditional compiler expression (like: {$IF ..})

2023-01-13 Thread Bart via fpc-devel
On Fri, Jan 13, 2023 at 1:16 PM Michael Van Canneyt wrote: > > Should I report this as a bug? > > Yes. Done. https://gitlab.com/freepascal.org/fpc/source/-/issues/40108 -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] Incorrect hint (5023) "unit not used", if unit is only used in a conditional compiler expression (like: {$IF ..})

2023-01-13 Thread Bart via fpc-devel
Consider the follwoing program: === program test; uses Version; begin {$if TheVersion >= 1} writeln('Version 1 or higher'); {$else} writeln('Version < 1'); {$endif} end. === unit version; interface const TheVersion = 1; implementation end. === Compile with -vh You get the hint:

Re: [fpc-devel] Incorrect hint (5023) "unit not used", if unit is only used in a conditional compiler expression (like: {$IF ..})

2023-01-13 Thread J. Gareth Moreton via fpc-devel
In my opinion, yes, report this as a bug.  Sure, it's what I'd consider "low priority" since it's just an incorrect informative hint rather than something critical, but it's a bug nonetheless. Kit On 13/01/2023 11:54, Bart via fpc-devel wrote: Consider the follwoing program: === program

Re: [fpc-devel] Incorrect hint (5023) "unit not used", if unit is only used in a conditional compiler expression (like: {$IF ..})

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Bart via fpc-devel wrote: Consider the follwoing program: === program test; uses Version; begin {$if TheVersion >= 1} writeln('Version 1 or higher'); {$else} writeln('Version < 1'); {$endif} end. === unit version; interface const TheVersion = 1; implementation

Re: [fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Wayne Sherman via fpc-devel wrote: Some related misunderstandings: 1) When StopRecordPropertyChanges is called it destroys all the change records (stored in TBits) in which case SaveToJSON saves ALL the properties even if they were not loaded or modified previously.

Re: [fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Wayne Sherman via fpc-devel
Is there a better way to track changed TBaseObject properties (and get rid of property index declarations)? Lazarus knows which properties on a form have been changed from their default value and only properties which do not match the default are saved in the lfm file. Can the same thing be used

Re: [fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Wayne Sherman via fpc-devel
Some related misunderstandings: 1) When StopRecordPropertyChanges is called it destroys all the change records (stored in TBits) in which case SaveToJSON saves ALL the properties even if they were not loaded or modified previously. 2) Nothing in restbase.pp or TBaseObject calls

Re: [fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Wayne Sherman via fpc-devel wrote: Is there a better way to track changed TBaseObject properties (and get rid of property index declarations)? Not to my knowledge. If there had been, I would have used it. The advantage of the index as opposed to using a custom assigned

[fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Wayne Sherman via fpc-devel
I am trying to check the googleapiconv "TGoogleRestDescription" object contents (which is descended from restbase TBaseObject) by using "SaveToJSON". But it always saves an empty object, even when the properties have values assigned to them (via LoadFromJSON).

Re: [fpc-devel] restbase.pp LoadFromJSON calling StopRecordPropertyChanges;

2023-01-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 13 Jan 2023, Wayne Sherman via fpc-devel wrote: I am trying to check the googleapiconv "TGoogleRestDescription" object contents (which is descended from restbase TBaseObject) by using "SaveToJSON". But it always saves an empty object, even when the properties have values assigned to