Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: c/c++ differences


  • Subject: Re: lug-bg: c/c++ differences
  • From: firedust@email.domain.hidden (Stanislav Lechev [AngelFire])
  • Date: Tue, 8 Jul 2003 10:41:29 +0300


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 07 July 2003 19:41, Nikolay Mitev wrote:

[-cut-]

<em class="quotelev1">> Klu4ovata duma tuk e polimorphism i az se opitah da ti obqsnq, 4e v tozi
<em class="quotelev1">> kontekst polymorphism ne mozhe da ima, tuj kato nqma6 obekt, a e 4ista i
<em class="quotelev1">> prosta (kato kupan policaj) funkciq.
<em class="quotelev1">>
<em class="quotelev2">> > primerno da si naprawish C++ modul
<em class="quotelev2">> > w kojto da imash
<em class="quotelev2">> > bool testfunc (int a);
<em class="quotelev2">> > bool testfunc (long a);
<em class="quotelev1">>
<em class="quotelev1">> Ot tova, koeto si napisal, moga da predpolozha, 4e burka6 ponqtiqta
<em class="quotelev1">> overloading s polymorphism.
<em class="quotelev1">>

ne sywsem ... smqtam che mi e absolyutno qsno kakwa e razlikata m/y
polymorphism i overloading...
prosto kakto pisah po gore ne sym se izrazil prawilno ...
wypreki che ot howto-to razbrah kak se prawi fokusa ...
no edwa li shte mi se nalovi da go prilagam na towa niwo :)
i opredeleno osyznawam kakwa e razlikata ... :)

otnosno primera ti - beshe idealen :)
samo w edno ne sym siguren ...
dali naistina w C++ tipa na funkciqta ne uchastwa w resolvinga...
no move lesno da se proweri :)

<p><em class="quotelev1">> Zatova kratko obqsnenie:
<em class="quotelev1">>  Da overloadne6 nqkoj funkciq ozna4ava da ima o6te funkcii sus su6toto ime,
<em class="quotelev1">> no razli4ava6ti se po broj/tip parametri i cv-qualification. Tipa na
<em class="quotelev1">> rezultata ne u4astva v resoving-a.
<em class="quotelev1">> Ot tam kato izvika6 taq funkciq s opredeleni parametri, kompilatora v
<em class="quotelev1">> compile-time re6ava koq "versiq" na funkciqta da izvika.
<em class="quotelev1">>
<em class="quotelev1">> Pri polymorhphism ima6 bazov klas i naslednici, v kojto ima6 funkcii sus
<em class="quotelev1">> su6toto ime i sus su6tiq broj/tip parametri i cv-qualification (signature).
<em class="quotelev1">> Togava v run-time se re6ava koj metod da se izvika v zavisimost ot
<em class="quotelev1">> dinami4niq tip na obekta.
<em class="quotelev1">>
<em class="quotelev1">> Sumnqvam se, 4e sum go obqsnil qsno no glavnata ideq e, 4e tuk imame early
<em class="quotelev1">> binding (overloading) vs. late binding (polymorphism).  Az prosto ti dadoh
<em class="quotelev1">> primer, kak mozhe6 da kombinira6 polymorphism s dinami4ni biblioteki. V
<em class="quotelev1">> posledstvie vidqh, 4e i v Howto-to e daden podoben na moq primer.
<em class="quotelev1">>
<em class="quotelev1">> <snip>
<em class="quotelev1">>
<em class="quotelev1">> cheers,
<em class="quotelev1">> face

- -- 
- -=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-
  Regards,                                            AngelFire  
      Stanislav Lechev                    <firedust_at_vega.bg>     
     PGP Key: http://firedust.vega.bg/pgp/StanislavLechev.asc    
   Vega Internet Service Provider (tm)  --  http://www.vega.bg   
- -=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-=#=-

<p>-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/CnWr8RPXBhiMqewRAqQ3AJ9hsW9LbPL/G4+vSOCA83bMxCOwqACfTg38
nyAY7UBwwfFlztfEZzslYq8=
=qbk4
-----END PGP SIGNATURE-----
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.