On Fri, 12 May 2023, Thomas Kurz via fpc-pascal wrote:
I would expect the type helper to remain functional. The types are the same
for all purposes except they have a different RTTI entry.
But this behaviour seems inconsistent to me. For example:
With "var x:double" I can use "x.IsNan". Wi
> I would expect the type helper to remain functional. The types are the same
> for all purposes except they have a different RTTI entry.
But this behaviour seems inconsistent to me. For example:
With "var x:double" I can use "x.IsNan". With TDateTime, which is defined as
"type TDateTime = type
On Wed, 10 May 2023, Thomas Kurz via fpc-pascal wrote:
Dear Michael,
thank you for the explanation. I understand that the helper overwrites the
original constructor. But...
I have defined "type TSomething = type TVec3f" (note the second "type").
So from my perspective, I'd assume that the
pply to
TVec3f at all because TSomething is defined as a new type, not only an alias
for TVec3f.
- Original Message -
From: Michael Van Canneyt via fpc-pascal
To: Thomas Kurz via fpc-pascal
Sent: Tuesday, May 9, 2023, 23:55:47
Subject: [fpc-pascal] Record Constructors which differ in pa
On Tue, 9 May 2023, Thomas Kurz via fpc-pascal wrote:
Hello,
let's take the following example:
program Project1;
{$MODE OBJFPC}
{$MODESWITCH ADVANCEDRECORDS}
{$MODESWITCH TYPEHELPERS}
type TVec3f = record
x, y, z: Double;
constructor Create (a1, a2, a3: Double);
end;
type TSomething =
Hello,
let's take the following example:
program Project1;
{$MODE OBJFPC}
{$MODESWITCH ADVANCEDRECORDS}
{$MODESWITCH TYPEHELPERS}
type TVec3f = record
x, y, z: Double;
constructor Create (a1, a2, a3: Double);
end;
type TSomething = type TVec3f;
type TSomethingHelper = type helper for TSom