Florian Klaempfl wrote:
> Constructor procvars are indeed not supported but the way to achieve
> what you want is to use class type variables
>
> t_mammal_class = class of t_mammal;
>
> function find_or_create_animal (color : byte;
> pass_mammal_type : t_mammal_class) : t_mammal;
>
>
thanks =) nicknames can be tricky...
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Try the following...
Yury Sidorov
Cheers,
G.
On 19 March 2010 03:27, Felipe Monteiro de Carvalho wrote:
> Or at least does anyone know the e-mail of the user "jura" which
> submited the previous wince tests so that I can ask him how he did it?
--
Regards,
- Graeme -
_
On 19 Mar 2010, at 10:27, Graeme Geldenhuys wrote:
> Jonas Maebe het geskryf:
>>>
>>> GDB 7.1 released!
>
> So is there anything new/improved related to Object Pascal
I think at least one potential GDB crashing bug was fixed in the Pascal
expression parser: http://sourceware.org/ml/
Jonas Maebe het geskryf:
>>
>>GDB 7.1 released!
So is there anything new/improved related to Object Pascal, to make it
worth the upgrade?
>From the listed changes I see nothing regarding Pascal. :-/
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free
Begin forwarded message:
> From: Joel Brobecker
> Date: 18 Mar 2010 23:20:49 GMT+01:00
> To: g...@sourceware.org
> Subject: [ANNOUNCEMENT] GDB 7.1 released!
> Reply-To: g...@sourceware.org
>
>GDB 7.1 released!
>
> Release 7.1 of GDB, the GNU Debugger, is now available via anonymou
> As you can (probably) see, I would like t_barnyard to be able to create
> any descendant of t_mammal. In the above example, I want it to create a
> brown pig if it doesn't find one, so I tried to pass the t_pig
> constructor, along with the brown parameter that said constructor will
> require
I'd like to pass a constructor as a procvar. Don't know if this is
possible. Here is some silly illustrative code that doesn't work:
{$mode objfpc}
uses classes, sysutils;
type
t_mammal = class
public
constructor create (color : byte); virtual;
end;
t_pig = class (t_mammal)