[fpc-pascal] with in classes/records
Michael Van Canneyt
michael at freepascal.org
Mon Sep 10 01:34:18 CEST 2018
On Sun, 9 Sep 2018, Sven Barth via fpc-pascal wrote:
> Am 09.09.2018 um 16:16 schrieb Michael Van Canneyt:
>>
>>
>> On Sun, 9 Sep 2018, Ryan Joseph wrote:
>>
>>> It seems syntacticly possible that default properties could be
>>> recursive by having a default property reference a record/class with
>>> another default property. Should that be allowed?
>>
>> I don't think so. Let's start with 1 level.
>> For default arrays it's also only one level deep.
> Ehm... news flash:
I know that, but I meant you cannot immediatly go to the second level.
You must specify the 2 indexes as in:
> Writeln(Test[21][2]);
> Though one can argue that default array properties are used explicitely
> using the "[…]"-syntax while a non-array default property is
> automatically triggered with ".".
Yes.
Michael.
More information about the fpc-pascal
mailing list