Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 6. Sep. 2018, 16:33: > > > > On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt > wrote: > > > > No, the whole point of default is that they should be for any kind of > field. > > For example if you want a nullable boolean, you'll do something like > > > > Type > >

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Ryan Joseph
> On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt > wrote: > > No, the whole point of default is that they should be for any kind of field. > For example if you want a nullable boolean, you'll do something like > > Type >TNullable= Record >Private > F : T; > isAssigned :

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Michael Van Canneyt
On Thu, 6 Sep 2018, Ryan Joseph wrote: On Sep 5, 2018, at 11:22 AM, Ryan Joseph wrote: I just realized that default shouldn’t be allowed on non-object fields right? I think that’s what was decided and makes most sense to me too. Disregard my last email. Sorry if I make a bunch of noise

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Michael Van Canneyt
On Wed, 5 Sep 2018, Ryan Joseph wrote: On Sep 4, 2018, at 7:15 PM, Sven Barth via fpc-pascal wrote: The idea of the default property is that *all* operators (and methods) (except management operators) are hoisted from the type of the default property. The assignment of one record with

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Ryan Joseph
> On Sep 5, 2018, at 11:22 AM, Ryan Joseph wrote: > > I just realized that default shouldn’t be allowed on non-object fields right? > I think that’s what was decided and makes most sense to me too. Disregard my > last email. Sorry if I make a bunch of noise while I’m working on this but >

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Ryan Joseph
> On Sep 4, 2018, at 7:15 PM, Sven Barth via fpc-pascal > wrote: > > Would you please stop thinking with the C operators? They are merely > syntactic sugar and they don't exist by themselves. For this topic at least > please stick to their full versions (in your example "rec := rec + 10")

[fpc-pascal] SetLength warnings - request

2018-09-06 Thread Vojtěch Čihák
Hello,   even if there's closed issue https://bugs.freepascal.org/view.php?id=34169 I would like to ask if it can be reconsidered.   The subject is that SetLength now gives warning: Variable "dynamic array" of a managed type does not seem to be initialized in 3.3.1 and 3.1.1 while it doesn't

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Ryan Joseph
> On Sep 4, 2018, at 12:35 PM, Sven Barth via fpc-pascal > wrote: > > I think you need to be clearer what you want to achieve in the end. The > default property as intended by Maciej has the idea that it hoists the > operators of the default property type to the record it is contained in.

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Ryan Joseph
> On Sep 4, 2018, at 7:15 PM, Sven Barth via fpc-pascal > wrote: > > The idea of the default property is that *all* operators (and methods) > (except management operators) are hoisted from the type of the default > property. The assignment of one record with default property to another of

[fpc-pascal] SetLength warnings - request

2018-09-06 Thread Vojtěch Čihák
Hello,   even if there's closed issue https://bugs.freepascal.org/view.php?id=34169 I would like to ask if it can be reconsidered.   The subject is that SetLength now gives warning: Variable "dynamic array" of a managed type does not seem to be initialized in 3.3.1 and 3.1.1 while it doesn't