Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-07 Thread Jonas Maebe
On 06 Nov 2010, at 16:16, ik wrote: > Further more, what is the difference between a "normal" field and a variable > inside a class: Nothing. Everything defined in a "var" section is a field. The reason the "var" keyword can now be used, is because it is now also possible to define types and c

Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread Paul Ishenin
06.11.2010 22:16, ik wrote: why not something like this: TAClass = class private FField : class integer; end; "var" and "class var" starts new sections in the class declaration. Therefore you can define several class fields or instance fields after them. For example TAClass = class private

Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread ik
On Sat, Nov 6, 2010 at 17:13, Paul Ishenin wrote: > 06.11.2010 21:39, ik wrote: > >> But why class variables and not class fields ? >> > What is the difference? > > "var" is already a reserved word. reserving a word "field" will cause more > problems than using an already reserved word. > why n

Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread Paul Ishenin
06.11.2010 21:39, ik wrote: But why class variables and not class fields ? What is the difference? "var" is already a reserved word. reserving a word "field" will cause more problems than using an already reserved word. Best regards, Paul Ishenin.

Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread Sven Barth
On 06.11.2010 15:39, ik wrote: But why class variables and not class fields ? As I personally think about normal class fields as "variables per class instance", I see no difference between calling something "class field" or "class variable". If it is the "var" keyword you are stumbling on,

Re: [fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread ik
But why class variables and not class fields ? Ido LINESIP websites: http://www.linesip.com http://www.linesip.co.il On Sat, Nov 6, 2010 at 09:26, leledumbo wrote: > > > I think both are basically identical, but the work of the first one is > > much more clear. I had never used them, but I

[fpc-pascal] Re: variables in class, class variables and fields

2010-11-06 Thread leledumbo
> I think both are basically identical, but the work of the first one is > much more clear. I had never used them, but I think the above code is > right, do not ? Yes. Usually we need this when creating a thread pool, so we know how many threads have been created. -- View this message in conte