<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><title>Re: C _ jak rozepsat řádek</title><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.StylE-mailovZprvy18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=CS link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dobrý den,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> Trochu resuscituji toto vlákno, definice níže<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> _ProgramEEprom *pAutoMesic = &ProgramRAM[Program][RAM_AutoMesic];<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> if (*pAutoMesic->Mesic == 0 || *pAutoMesic->Mesic > 12)//kontrola mezí<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> (*pAutoMesic).Mesic = 1;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Radek s if hlasi <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>podprogramy.c:260: error: pointer required<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>podprogramy.c:260: error: pointer required<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>podprogramy.c:260: error: pointer required<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>podprogramy.c:260: error: pointer required<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>fakticky ty pointery mě zničí. Záměrně používám techniku (*p….).xxxx i *p….->xxxx abych si osvojil oba zápisy. Co mi uniká v tom řádku s IF? Díky za nakopnutí. Míra<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p><span style='font-size:10.0pt'>> (*pProgEEpr).EndProgram = 1;<br><br>><br>> Hezký den.<br>><br>><br>> Dne 27.4.2013 12:18, Miroslav Draxal napsal(a):<br>>> Dobrý den<br>>><br>>> Mějme<br>>><br>>> char MenuPolozkaSet;<br>>><br>>> typedef union {<br>>><br>>> char value;<br>>><br>>> struct {<br>>><br>>> unsigned Bit0 : 1;<br>>><br>>> unsigned Bit1 : 1;<br>>><br>>> unsigned Bit2 : 1;<br>>><br>>> unsigned Bit3 : 1;<br>>><br>>> unsigned Bit4 : 1;<br>>><br>>> unsigned Bit5 : 1;<br>>><br>>> unsigned Bit6 : 1;<br>>><br>>> unsigned Bit7 : 1;<br>>><br>>> } Bits;<br>>><br>>> struct {<br>>><br>>> unsigned val : 7;<br>>><br>>> unsigned bit_ : 1;<br>>><br>>> } ProlnutiPauza;<br>>><br>>> struct {<br>>><br>>> unsigned Mesic : 5;<br>>><br>>> unsigned AutoOnOff : 1;<br>>><br>>> unsigned EndProgram : 1;<br>>><br>>> };<br>>><br>>> } _ProgramEEprom;<br>>><br>>> (*((_ProgramEEprom*) & MenuPolozkaSet)).EndProgram = 1; // tohle je OK<br>>><br>>> Pokud bych to chtěl rozepsat přes fyzický ukazatel<br>>><br>>> _ProgramEEprom *pProgEEpr = (_ProgramEEprom*) &MenuPolozkaSet;<br>>><br>>> *pProgEEpr.EndProgram = 1;<br>>><br>>> To hází chybu<br>>><br>>> MenuKey.c:261: error: struct/union required<br>>><br>>> MenuKey.c:261: error: illegal conversion between types<br>>><br>>> Což asi chápu, ale jak to napsat. Snažím se tomu přijít na kloub. V těch<br>>> pointerech plavu.<br>>><br>>><br>>><br>>> __________ Informace od ESET NOD32 Antivirus, verze databaze 8272<br>>> (20130426) __________<br>>><br>>> Tuto zpravu proveril ESET NOD32 Antivirus.<br>>><br>>> <a href="http://www.eset.cz">http://www.eset.cz</a><br>>><br>>><br>>> _______________________________________________<br>>> HW-list mailing list - sponsored by <a href="http://www.HW.cz">www.HW.cz</a> <<a href="http://www.HW.cz">http://www.HW.cz</a>><br>>> <a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a> <<a href="mailto:Hw-list@list.hw.cz">mailto:Hw-list@list.hw.cz</a>><br>>> <a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br>> _______________________________________________<br>> HW-list mailing list - sponsored by <a href="http://www.HW.cz">www.HW.cz</a> <<a href="http://www.HW.cz">http://www.HW.cz</a>><br>> <a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a> <<a href="mailto:Hw-list@list.hw.cz">mailto:Hw-list@list.hw.cz</a>><br>> <a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br>><br>><br>><br>> __________ Informace od ESET NOD32 Antivirus, verze databaze 8272<br>> (20130426) __________<br>><br>> Tuto zpravu proveril ESET NOD32 Antivirus.<br>><br>> <a href="http://www.eset.cz">http://www.eset.cz</a><br>><br>><br>><br>> __________ Informace od ESET NOD32 Antivirus, verze databaze 8272<br>> (20130426) __________<br>><br>> Tuto zpravu proveril ESET NOD32 Antivirus.<br>><br>> <a href="http://www.eset.cz">http://www.eset.cz</a><br>><br>><br>> _______________________________________________<br>> HW-list mailing list - sponsored by <a href="http://www.HW.cz">www.HW.cz</a><br>> <a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a><br>> <a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br>_______________________________________________<br>HW-list mailing list - sponsored by <a href="http://www.HW.cz">www.HW.cz</a><br><a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a><br><a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a></span><o:p></o:p></p><p class=MsoNormal><br><br>__________ Informace od ESET NOD32 Antivirus, verze databaze 8274 (20130427) __________<br><br>Tuto zpravu proveril ESET NOD32 Antivirus.<br><br><a href="http://www.eset.cz">http://www.eset.cz</a><o:p></o:p></p></div> <BR>
<BR>
__________ Informace od ESET NOD32 Antivirus, verze databaze 8343 (20130517) __________<BR>
<BR>
Tuto zpravu proveril ESET NOD32 Antivirus.<BR>
<BR>
<A HREF="http://www.eset.cz">http://www.eset.cz</A><BR>
</body></html>