Re: [fpc-pascal] class methods

2012-02-23 Thread Jonas Maebe
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

[fpc-pascal] class methods for objects

2010-07-16 Thread Helmut Hartl
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

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Michael Van Canneyt
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:

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Reimar Grabowski
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

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Helmut Hartl
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 ___

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Jonas Maebe
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

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Michael Van Canneyt
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

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Helmut Hartl
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

Re: [fpc-pascal] class methods for objects

2010-07-16 Thread Michael Van Canneyt
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)

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-14 Thread Dean Zobec
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

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-14 Thread Marco van de Voort
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

[fpc-pascal]class methods in FPC version 1.9.0

2003-11-13 Thread dean
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

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-13 Thread Peter Vreman
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

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-13 Thread Dean Zobec
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