Article View: pl.comp.lang.pascal
Article #92288Record... Pytanie :/
From: Mentor
Date: Mon, 03 Dec 2007 11:36
Date: Mon, 03 Dec 2007 11:36
36 lines
1500 bytes
1500 bytes
Witam pracuje w lazarusie i c++
W c mam strukturę danych:
#define PACKED __attribute__ ((packed))
struct tcp_mysql_sent {
long id;
char net_addr;
char device;
short temp_komora;
short temp_parownik;
short nastawa;
char state;
char time[9];
char date[11];
}PACKED;
sizeof(struct tcp_mysql_sent) daje wartosc "33" zgadza się
w lazarusie mam:
type tcp_mysql_sent = record
id : integer;
net_addr : char;
device : byte;
temp_komora : smallint;
temp_parownik : smallint;
temp : smallint;
state : char;
_time : array[1..9] of char;
_date : array[1..11] of char;
end;
sizeof(tcp_mysql_sent) daje mi wartosc "36" zle i tu pytanie czemu ?
skoro ze składni rekordu wychodzi 33 ?
Pozdrawiam Mentor
Technical Details
Message-ID:
<fj0po9$9t2$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: Mentor <mardoook@poczta.gazeta.pl> Newsgroups: pl.comp.lang.pascal Subject: Record... Pytanie :/ Date: Mon, 03 Dec 2007 12:36:40 +0100 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 36 Message-ID: <fj0po9$9t2$1@inews.gazeta.pl> NNTP-Posting-Host: clq254.neoplus.adsl.tpnet.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1196681801 10146 83.31.118.254 (3 Dec 2007 11:36:41 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Mon, 3 Dec 2007 11:36:41 +0000 (UTC) X-User: mardoook User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit