Article View: pl.comp.lang.pascal
Article #92289Re: Record... Pytanie :/
From: Tygrys
Date: Mon, 03 Dec 2007 12:18
Date: Mon, 03 Dec 2007 12:18
40 lines
1789 bytes
1789 bytes
Mentor pisze:
> 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 ?
Spróbuj = packed record;
Tygrys
Technical Details
Message-ID:
<fj0si1$8b5$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<fj0po9$9t2$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Tygrys <news15@wywalto.tygrys.com.pl> Newsgroups: pl.comp.lang.pascal Subject: Re: Record... Pytanie :/ Date: Mon, 03 Dec 2007 13:18:44 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 40 Message-ID: <fj0si1$8b5$1@nemesis.news.tpi.pl> References: <fj0po9$9t2$1@inews.gazeta.pl> NNTP-Posting-Host: aca110.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1196684673 8549 83.16.52.110 (3 Dec 2007 12:24:33 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Mon, 3 Dec 2007 12:24:33 +0000 (UTC) User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <fj0po9$9t2$1@inews.gazeta.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit