Re: [fpc-pascal] Constant members within class

2007-06-01 Thread Christos Chryssochoidis
On 5/31/07, Matt Emson <[EMAIL PROTECTED]> wrote: >taclass = class > fi:integer; > public > property i write fi; > end; Not to pick on little details, but shouldn't that be: property i: interger read fi; as the OP wanted a read only member? What you gave them was write on

Re: [fpc-pascal] Constant members within class

2007-05-31 Thread Matt Emson
>taclass = class > fi:integer; > public > property i write fi; > end; Not to pick on little details, but shouldn't that be: property i: interger read fi; as the OP wanted a read only member? What you gave them was write only. Maybe I misunderstood their request, if so sorry.

Re: [fpc-pascal] Constant members within class

2007-05-30 Thread Marco van de Voort
> Thanks a lot for the prompt response. I 'm a total novice in Object > Pascal. I will have a look to the classes' properties? Yes. Properties can be read-only. Moreover, it is Delphi and FPC compat in all recent, and even not so recent versions. ___

Re: [fpc-pascal] Constant members within class

2007-05-30 Thread Christos Chryssochoidis
Thanks a lot for the prompt response. I 'm a total novice in Object Pascal. I will have a look to the classes' properties… Marco van de Voort wrote: Is there a way to define const members for a class, as for example in TClass = class public const i : integer;// and hopping to b

Re: [fpc-pascal] Constant members within class

2007-05-30 Thread Marco van de Voort
> Is there a way to define const members for a class, as for example in > > TClass = class > public >const i : integer;// and hopping to be able to set it within > the constructor? It's already there taclass = class fi:integer; public