On 23 Feb 2012, at 17:17, Everton Vieira wrote:
Is there any plans to implement public procedures/function of a class that
can be used without been necessary to create the class?
Those already exist. They are called class methods. See
http://www.freepascal.org/docs-html/ref/refsu27.html
Hello,
while converting bullet physic code to native fpc, i would find it handy
to have something like class methods for objects. (Methods without
self pointer)
(It would enhance the readability of the code much, because I were not
forced to
move such c++ class functions to global
It exists already, but is called 'static'
program testso;
Type
MyObject = Object
procedure MySomething; static;
end;
Procedure MyObject.MySomething;
begin
Writeln('OK');
end;
Var
O : MyObject;
begin
O.MySomething;
end.
Michael.
On Fri, 16 Jul 2010, Helmut Hartl wrote:
On Fri, 16 Jul 2010 10:48:19 +0200 (CEST)
Michael Van Canneyt mich...@freepascal.org wrote:
Var
O : MyObject;
begin
O.MySomething;
end.
Interesting that you can call them on not initialized objects.
I always assumed that they had to be called in a static way:
begin
Am 16.07.10 10:48, schrieb Michael Van Canneyt:
It exists already, but is called 'static'
Thank you for clarification, in a quick test it seem to work for my use
case.
When is it likeley that this feature will arrive in 2.4.x ?
helmut
___
Helmut Hartl wrote on Fri, 16 Jul 2010:
Am 16.07.10 10:48, schrieb Michael Van Canneyt:
It exists already, but is called 'static'
Thank you for clarification, in a quick test it seem to work for my use case.
When is it likeley that this feature will arrive in 2.4.x ?
In 2.4.x, you have to
On Fri, 16 Jul 2010, Reimar Grabowski wrote:
On Fri, 16 Jul 2010 10:48:19 +0200 (CEST)
Michael Van Canneyt mich...@freepascal.org wrote:
Var
O : MyObject;
begin
O.MySomething;
end.
Interesting that you can call them on not initialized objects.
I always assumed that they had to be
Am 16.07.10 12:46, schrieb Michael Van Canneyt:
Always learning something new.
One is never too old to learn :-)
Michael.
But one is always able to age faster,
while boldly going to where no man has gone
baldly before :-) (spelling intentional)
While testing with a simplified usage
On Fri, 16 Jul 2010, Helmut Hartl wrote:
Am 16.07.10 12:46, schrieb Michael Van Canneyt:
Always learning something new.
One is never too old to learn :-)
Michael.
But one is always able to age faster,
while boldly going to where no man has gone
baldly before :-) (spelling intentional)
See also http://www.stack.nl/~marcov/buildfaq.pdf for some pointers about
building the FPC cvs.
Thank you for the tutorial, it helped me a lot. It was exciting to see the
compiler building process on the screen :-) So now I have a 1.9.1 for i386
Linux!
I have encountered a problem when doing
See also http://www.stack.nl/~marcov/buildfaq.pdf for some pointers about
building the FPC cvs.
Thank you for the tutorial, it helped me a lot. It was exciting to see the
;
(unit Unix is something that I'm working on atm)
I did a simple typecast:
Result := Boolean(AssignPipe
When porting a Kylix/Delphi project to FPC (version 1.9.0 Linux) I've
encountered this small problem using class methods:
When I pass an object instance as parameter in class methods I have a sigsev
like in this example
program TestFail;
uses
SysUtils;
Type
TMyObject = Class
private
When porting a Kylix/Delphi project to FPC (version 1.9.0 Linux) I've
encountered this small problem using class methods:
When I pass an object instance as parameter in class methods I have a
sigsev
like in this example
Am I doing something wrong or is a bug I've found?
It was a bug in the
Hmm, here it returns
-bash-2.05b$ ./bugtest
TMyObject
-bash-2.05b$
with
Free Pascal Compiler version 1.9.1
Compiler Date : 2003/11/11
Compiler Target: i386
on FreeBSD
So it could be it that is already fixed after 1.9.0
Great, :-)
One more question, where can I find the version
14 matches
Mail list logo