Another possible Problem with the definition

TFPColor (fpc)  record with word <> TColor (lazarus) -$7FFFFFFF-1..$7FFFFFFF <> TFPReportColor (fpreport) UInt32

So you cannot use in Lazarus the 'well known' TColors. With TColor it is also Delphi compatible.

If the defines are Lazarus compatible. It works for both systems. I can make a patch if needed. But the teams have to IMHO to decide the best way :-)

Andreas


Am 21.02.2018 um 23:53 schrieb Michael Van Canneyt:


On Wed, 21 Feb 2018, Mattias Gaertner wrote:

On Wed, 21 Feb 2018 19:54:55 +0000
Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote:

[...]
> Because UInt32 is not a JSON dataformat.
Well, then I'll say that FPC's JSON needs to be extended to support UInt32, as it is a perfectly valid Object Pascal data type.

How should FPC's JSON support something, that is not supported by
JSON?

The problem is not in JSON.

Native Javascript supports 2^52 (or so) integer values, so every UInt32 value should fit
if written properly.

FPC's JSON supports Int64 and even QWord in FPC, so a UInt32 is definitely supported.

If the colors (a UInt32) is currently written as Longint (signed 32-bit) then of course a range check will follow, and this needs to be fixed.

The easiest solution is simply to read/write it as Int64.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to