🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi
Article #334594

Przecieżenie się źle łapie

#334594
From: aaaa
Date: Sat, 07 Jan 2012 14:14
22 lines
1814 bytes
Witam,
Mam 2 funkcje przeciążone:

function f(A: Cardinal): Cardinal; overload;
function f(A: Word): Word; overfload;

Jesli uzyję argumentu typu Cardinal to odpala się pierwsza defincja. I 
dobrze.
Jeśli użyję argumentu typu Integer to odpala się druga(!) definicja. I źle.
Jak zrobię:

function f(A: Cardinal): Cardinal; overload;
function f(A: Word): Word; overfload;
function f(A: Integer): Integer; overfload;

To dla argumentu typu Integer odpala się trzecia. Czyli dobrze.
Dlaczego Integer łapie się do Worda a nie do Cardinala? Przecież ma 4 bajty 
jak Cardinal. Żeby chociaż Word był ze znakiem jak Integer to bym zrozumiał, 
ale tak...?

Pozdrawiam,
A
Technical Details
Message-ID: <4f085347$0$1228$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!news2.arglkargh.de!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!news2.arglkargh.de!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
From: "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com>
Newsgroups: pl.comp.lang.delphi
Subject: Przecieżenie się źle łapie
Date: Sat, 7 Jan 2012 15:14:39 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109
X-Antivirus: avast! (VPS 120107-0, 2012-01-07), Outbound message
X-Antivirus-Status: Clean
Lines: 23
Message-ID: <4f085347$0$1228$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 83.9.58.37
X-Trace: 1325945671 unt-rea-b-01.news.neostrada.pl 1228 83.9.58.37:1088
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit