> On 24 Jan 2008, at 20:27, Marco van de Voort wrote:
> >
> > To be honest, if we wouldn't be able to do that now, and a request for
> > implementation came, my answer would be pretty much the same.
>
> I strongly disagree with that answer to those points.
No surprise there. I know you are a bit
On Friday 25 January 2008 12:30, Peter Vreman wrote:
> > Regarding class constants: I missed them, too, already, although
> > not too much. ;)
>
> Maybe you should read the documentation. Static fields are supported
> already for 10 years:
>
> ~/fpc/compiler>>> cat p.pp
> {$mode objfpc}
> {$static
> Regarding class constants: I missed them, too, already, although not too
> much. ;)
Maybe you should read the documentation. Static fields are supported already
for 10 years:
~/fpc/compiler>>> cat p.pp
{$mode objfpc}
{$static on}
type
cl=class
l : longint;static;
end;
var
c1,c2 : cl;
On Thursday 24 January 2008 20:27, Marco van de Voort wrote:
> > On 24 Jan 2008, at 19:45, Marco van de Voort wrote:
> > >> constants.
> > >
> > > A constant is already in a scope, the unit.
> >
> > So are constants local to a function. Being able to restrict the
> > scope to a certain function or
Marco van de Voort:
Class constants add the ability to provide scoped, "namespaced"
constants.
A constant is already in a scope, the unit.
The unit scope is a very open scope. Via class constants, one gets private,
protected and public scoping for constants, all of which are essential scope
> Marco van de Voort wrote:
>>> Marco van de Voort wrote:
> Does FPC support class constants, and if it doesn't, are there any plans
> to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be "what would make this possib
Marco van de Voort wrote:
Marco van de Voort wrote:
Does FPC support class constants, and if it doesn't, are there any plans
to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be "what would make this possible?"
What about class vars?
S
On 24 Jan 2008, at 20:27, Marco van de Voort wrote:
On 24 Jan 2008, at 19:45, Marco van de Voort wrote:
A constant is already in a scope, the unit.
So are constants local to a function. Being able to restrict the
scope to a certain function or group of functions is nevertheless
useful.
T
> On 24 Jan 2008, at 19:45, Marco van de Voort wrote:
> >> constants.
> >
> > A constant is already in a scope, the unit.
>
> So are constants local to a function. Being able to restrict the
> scope to a certain function or group of functions is nevertheless
> useful.
To be honest, if we woul
On 24 Jan 2008, at 19:45, Marco van de Voort wrote:
Henry Vermaak wrote:
I'm not sure what you mean - do you mean would I be willing to
write the
support myself?
i think he's asking what the use of it is. number 2 under the
link he
gave.
Oh, ok. Well, I'll try to summarize:
Class co
> Henry Vermaak wrote:
> >> I'm not sure what you mean - do you mean would I be willing to write the
> >> support myself?
> >
> > i think he's asking what the use of it is. number 2 under the link he
> > gave.
>
> Oh, ok. Well, I'll try to summarize:
>
> Class constants add the ability to provi
Henry Vermaak wrote:
I'm not sure what you mean - do you mean would I be willing to write the
support myself?
i think he's asking what the use of it is. number 2 under the link he
gave.
Oh, ok. Well, I'll try to summarize:
Class constants add the ability to provide scoped, "namespaced" con
On 24/01/2008, Jonathan Benedicto <[EMAIL PROTECTED]> wrote:
>
> I'm not sure what you mean - do you mean would I be willing to write the
> support myself?
i think he's asking what the use of it is. number 2 under the link he gave.
henry
___
fpc-pascal
Marco van de Voort wrote:
Does FPC support class constants, and if it doesn't, are there any plans
to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be "what would make this possible?"
Hi Marco,
I'm not sure what you mean - do you mean
> Marco van de Voort wrote:
> >> Does FPC support class constants, and if it doesn't, are there any plans
> >> to add this support?
> >
> > Have a look at
> > http://www.freepascal.org/faq.var#extensionselect
> >
> > The question would be "what would make this possible?"
>
> What about class v
Marco van de Voort wrote:
Does FPC support class constants, and if it doesn't, are there any plans
to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be "what would make this possible?"
What about class vars?
___
Leonardo M. Ramé wrote:
With your response I assume he meant something like "static attributes" when he said
"class
constants".
Yup. A class variable is another matter, which afaik cannot be reached
with one class per unit approach.
--- Joao Morais <[EMAIL PROTECTED]> wrote:
A class fu
With your response I assume he meant something like "static attributes" when he
said "class
constants".
--- Joao Morais <[EMAIL PROTECTED]> wrote:
> A class function would be a better approach.
>
>
Leonardo M. Ramé wrote:
Jonathan,
I never needed such type of feature, a propossed solution is to create one unit
per class, and
declare your constants in the implementation section of each unit.
A class function would be a better approach.
Example:
unit People
interface
type
TPeople
>
> Does FPC support class constants, and if it doesn't, are there any plans
> to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be "what would make this possible?"
___
fpc-pascal maillist - fp
Jonathan,
I never needed such type of feature, a propossed solution is to create one unit
per class, and
declare your constants in the implementation section of each unit.
Example:
unit People
interface
type
TPeople = class
..
end;
implementation
const
name = 'default name';
...
PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Benedicto
Sent: Wednesday, January 23, 2008 11:26 AM
To: FPC-Pascal
Subject: [fpc-pascal] class constants
Hello,
Does FPC support class constants, and if it doesn't, are there any pla
Hello,
Does FPC support class constants, and if it doesn't, are there any plans to
add this support?
Example:
type
TMyClass = class
begin
private
const MyConst = '123';
end;
Jon
___
fpc-pascal maillist - fpc-pascal@lists.fre
23 matches
Mail list logo