Re: [fpc-pascal] Managed record types

2024-11-02 Thread Bart via fpc-pascal
Consider this: type { TRec } TRec = record // whatsoever class operator Initialize(var aRec: TRec); end; { TRec } class operator TRec.Initialize(var aRec: TRec); begin writeln('class operator TRec.Initialize(var aRec: TRec)'); end; function foo: TRec; begin writeln('foo'); en

Re: [fpc-pascal] type helpers in trunk

2024-11-02 Thread Adriaan van Os via fpc-pascal
Thomas Kurz via fpc-pascal wrote: Do you have `{$MODESWITCH TYPEHELPERS}`? Yes ! Regards, Adriaan van Os ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] type helpers in trunk

2024-11-02 Thread Thomas Kurz via fpc-pascal
Do you have `{$MODESWITCH TYPEHELPERS}`? - Original Message - From: Adriaan van Os via fpc-pascal To: FPC-Pascal users discussions Sent: Saturday, November 2, 2024, 16:05:35 Subject: [fpc-pascal] type helpers in trunk Has something changed for type helpers in fpc trunk ? I don 't see

[fpc-pascal] Managed record types

2024-11-02 Thread Thomas Kurz via fpc-pascal
Hello, when I make a record type managed by adding an `Initialize` operator according to [1], can I rely on the record being initialized at the beginning of a function in which the record is the function result? Example: type TRec = record // whatsoever class operator Initialize(var aRec:

[fpc-pascal] type helpers in trunk

2024-11-02 Thread Adriaan van Os via fpc-pascal
Has something changed for type helpers in fpc trunk ? I don 't see a note of it in . I have code that compiles with 3.2.2, but the trunk compiler doesn't recognize (or doesn't accept) dot operations on the type. Very strange. Regards, Adriaan van