On Sun, 4 Jun 2023, Juha Manninen via fpc-pascal wrote:
On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
Correct. Property RecInstance is read only.
No, I can define it as :
property RecInstance: TMyRec read fRecInstance write fRecIns
Martin Frb via fpc-pascal schrieb am So.,
4. Juni 2023, 18:10:
> On 04/06/2023 17:49, Martin via fpc-pascal wrote:
> > On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
> >> Why the following code fails to compile?
> >> MyObj.RecInstance.ii := 123;
> > Technically you can modify the member
OK, I understand mostly. Thanks.
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On 04/06/2023 17:49, Martin via fpc-pascal wrote:
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
MyObj.RecInstance.ii := 123;
Technically you can modify the members of the temp record (just to
have the work thrown away afterwards).
So I guess
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
TMyRec = record
...
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
...
MyObj.RecInstance.ii := 123;
Access through property seems to be the problem. Accessing
fRecI
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
TMyRec = record
...
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
...
MyObj.RecInstance.ii := 123;
Access through property seems to be the problem. Accessing
fRecI
On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
>
> Correct. Property RecInstance is read only.
>
No, I can define it as :
property RecInstance: TMyRec read fRecInstance write fRecInstance;
and still get the same error.
Juha
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
> RecInst
Formatting was a little weird. This is what I meant, but the error remains :
type
TMyRec = record
ss: String;
ii: Integer;
end;
TMyClass = class
private
fName: String;
fRecInstance: TMyRec;
public
property RecInstance: TMyRec read fRecInstance;// write fRecInstance;
Compiler version is FPC 3.2.2 on Linux.
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Why the following code fails to compile?
type
TMyRec = record
ss: String;
ii: Integer;
end;
TMyClass = class
private
fName: String;
fRecInstance: TMyRec;
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
end;
var
MyObj : TMyClass;
begin
MyObj
11 matches
Mail list logo