Thread View: pl.comp.lang.pascal
2 messages
2 total messages
Started by webmajsterek
Wed, 30 Jun 2010 15:39
Generic a deklaracja w metodzie klasy
Author: webmajsterek
Date: Wed, 30 Jun 2010 15:39
Date: Wed, 30 Jun 2010 15:39
17 lines
1249 bytes
1249 bytes
type
MyClass=class
var Next:MyClass;
procedure Add(Source :MyClass );
end;
da się zrobić odwolanie w klasie generycznej do samej siebie ???
( to ponizej niestety nie dizała -- a nie mam pomysłu jak ten problem ominąć )
generic MyClass=class
var Next:MyClass;
procedure Add(Source :MyClass );
end;
--
Wysłano z serwisu OnetNiusy: http://niusy.onet.pl
Re: Generic a deklaracja w metodzie klasy
Author: Łukasz 'Maly' Ostrowski
Date: Thu, 01 Jul 2010 08:55
Date: Thu, 01 Jul 2010 08:55
24 lines
1491 bytes
1491 bytes
On Wed, 30 Jun 2010 17:39:51 +0200, webmajsterek@poczta.onet.pl wrote: > type > > MyClass=class > var Next:MyClass; > procedure Add(Source :MyClass ); > end; > > da się zrobić odwolanie w klasie generycznej do samej siebie ??? > ( to ponizej niestety nie dizała -- a nie mam pomysłu jak ten problem ominąć ) > > generic MyClass=class > var Next:MyClass; > procedure Add(Source :MyClass ); > end; Zgodnie z dokumentacją, jak powiadają Czesi, to se ne da. Jak chcesz prawdziwe dżeneriksy/templejty to użyj języka sprawnego w tym zakresie ;-). -- Pozdrawiam, Łukasz 'Maly' Ostrowski. http://l3v.pl/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads