Article View: pl.comp.lang.funkcyjne
Article #573Re: [ocaml] pole statyczne?
From: Marcin 'Qrczak' Kowalczyk
Date: Mon, 31 May 2004 17:09
Date: Mon, 31 May 2004 17:09
13 lines
1351 bytes
1351 bytes
On Mon, 31 May 2004 13:28:26 +0000, koctyxa wrote:
> Chcę trzymać wszystkie obiekty pewnej klasy w jednej liście. W C++
> owa klasa dziedziczyłaby po innej, która by miała statyczną zmienną -
> listę; wtedy w konstruktorze wystarczy napisać lista->add (this). Jak to
> zrealizować w ocamlu?
Zrób globalną zmienną: let lista = ref []
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Technical Details
Message-ID:
<pan.2004.05.31.17.09.46.929172@knm.org.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news2.icm.edu.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<slrncbmcnq.3lp.mrok@atos.wmid.amu.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news2.icm.edu.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Marcin 'Qrczak' Kowalczyk <qrczak@knm.org.pl> Newsgroups: pl.comp.lang.funkcyjne Subject: Re: [ocaml] pole statyczne? Date: Mon, 31 May 2004 19:09:47 +0200 Organization: Klub Nieszkodliwych Manjakow Lines: 14 Message-ID: <pan.2004.05.31.17.09.46.929172@knm.org.pl> References: <slrncbmcnq.3lp.mrok@atos.wmid.amu.edu.pl> NNTP-Posting-Host: paf87.warszawa.sdi.tpnet.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1086023548 8346 217.96.225.87 (31 May 2004 17:12:28 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Mon, 31 May 2004 17:12:28 +0000 (UTC) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit