<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=23501&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2020-12-29T14:47:06+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=23501&amp;mode</id>
<entry>
<author><name><![CDATA[JarekB]]></name></author>
<updated>2020-12-29T14:47:06+01:00</updated>
<published>2020-12-29T14:47:06+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230356#p230356</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230356#p230356"/>
<title type="html"><![CDATA[Re: składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230356#p230356"><![CDATA[
Coś wymyśliłem. Ale być może dostanę oklep słowny.<br />Wielka improwizacja ale nie pyszczy się kompilator.[syntax=c]TS_SOFTTIMERS * t;<br />    t = &amp; soft_timers&#91;Number_Timer&#93;;<br />    t-&gt;cnt = cnt;<br />    t-&gt;interval = interval;                     <br />    t-&gt;tmr_callback = tmr_callback;[/syntax]<br /><br />Dzięki wielkie ja sobie tu wymyślałem, a odpowiedzi powyżej <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />tak to jest jak się nie chodziło na lekcje angielskiego <br />whatever type  - jakikolwiek typ <br />Wiedziałem że dam ciała <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18188">JarekB</a> — 29 gru 2020, o 14:47</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2020-12-29T14:42:58+01:00</updated>
<published>2020-12-29T14:42:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230355#p230355</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230355#p230355"/>
<title type="html"><![CDATA[Re: składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230355#p230355"><![CDATA[
<div class="quotetitle">JarekB napisał(a):</div><div class="quotecontent"><br />Kompilator nie zna takiego słowa &quot;WhateverType&quot;<br /></div><br />Po prostu zamiast tego słówka wstawiasz dowolny typ wskaźnikowy - w tym wypadku typ jaki ma tablica timerów <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 29 gru 2020, o 14:42</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[fofex]]></name></author>
<updated>2020-12-29T14:39:24+01:00</updated>
<published>2020-12-29T14:39:24+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230354#p230354</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230354#p230354"/>
<title type="html"><![CDATA[Re: składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230354#p230354"><![CDATA[
LOL. <br />Przecież trzeba wstawić prawidłowy (tj. typ elementu tablicy soft_timers).<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=21072">fofex</a> — 29 gru 2020, o 14:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JarekB]]></name></author>
<updated>2020-12-29T14:24:33+01:00</updated>
<published>2020-12-29T14:24:33+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230353#p230353</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230353#p230353"/>
<title type="html"><![CDATA[Re: składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230353#p230353"><![CDATA[
Nie działa<br />Kompilator nie zna takiego słowa &quot;WhateverType&quot;<br />Pyszczy aż uszy więdną <br /><br />[syntax=c]timers.c: In function 'Soft_timers_napelniamy':<br />timers.c:68:5: error: unknown type name 'WhateverType'<br />     WhateverType *t = soft_timers + Number_Timer;<br />     ^<br />timers.c:68:23: warning: initialization from incompatible pointer type &#91;-Wincompatible-pointer-types&#93;<br />     WhateverType *t = soft_timers + Number_Timer;<br />                       ^<br />timers.c:69:6: error: request for member 'cnt' in something not a structure or union<br />     t-&gt;cnt = cnt;                                  <br />      ^<br />timers.c:70:6: error: request for member 'interval' in something not a structure or union<br />     t-&gt;interval = interval;<br />      ^<br />timers.c:71:6: error: request for member 'tmr_callback' in something not a structure or union<br />     t-&gt;tmr_callback = tmr_callback;<br />      ^[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18188">JarekB</a> — 29 gru 2020, o 14:24</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[fofex]]></name></author>
<updated>2020-12-29T14:07:09+01:00</updated>
<published>2020-12-29T14:07:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230352#p230352</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230352#p230352"/>
<title type="html"><![CDATA[Re: składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230352#p230352"><![CDATA[
[syntax=c]{<br />   WhateverType *t = soft_timers + Number_Timer;<br />   t-&gt;cnt = cnt;<br />   t-&gt;interval = interval;<br />   t-&gt;tmr_callback = tmr_callback;<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=21072">fofex</a> — 29 gru 2020, o 14:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JarekB]]></name></author>
<updated>2020-12-29T11:55:41+01:00</updated>
<published>2020-12-29T11:55:41+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230348#p230348</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230348#p230348"/>
<title type="html"><![CDATA[składnia C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23501&amp;p=230348#p230348"><![CDATA[
Witajcie trochę robiłem porządków w kodach i mam pytanie <br />W VBA jest  możliwość uproszczenia zapisów - linia od 6 do 11<br />Wpadłem na pomysł żeby coś takiego zastosować w C<br />Poniżej trzy linijki wyrwane z kodu które chciałbym zapisać jak w VBA<br />Czy ktoś widział taką możliwość zapisu?<br /><br /><br />[syntax=c]soft_timers&#91;Number_Timer&#93;.cnt =  cnt;                         // to działa i jest ok<br />soft_timers&#91;Number_Timer&#93;.interval = interval;                // to działa i jest ok<br />soft_timers&#91;Number_Timer&#93;.tmr_callback = tmr_callback;        // to działa i jest ok[/syntax]<br />        <br />[syntax=vb]Dim theLabel As Label<br />Dim labelCounter As Integer<br /><br />For labelCounter = 1 To 3<br />    Set Label = UserForm1.Controls.Add(&quot;Forms.Label.1&quot;, &quot;Test&quot; &amp; labelCounter, True)<br />    With Label<br />        .Caption = &quot;Test&quot; &amp; labelCounter<br />        .Left = 10<br />        .Width = 50<br />        .Top = 10 + (labelCounter * 40)<br />    End With<br />Next labelCounterUserForm1.Show<br />End Sub[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18188">JarekB</a> — 29 gru 2020, o 11:55</p><hr />
]]></content>
</entry>
</feed>