<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60282</guid>
        <pubDate>Fri, 16 May 2003 12:27:28 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60282</link>
        <description><![CDATA[Anatoly_Podgoretsk: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Song, 16.05.03, 15:11:07</span><div class='quote '>Вот это не копал, хотя была мысля, но некогда. Кстати это даже в хэлпе написано, правда не помню где :( (хотел процитировать, не получилось)</div></div><br><br>Может быть разное размещение в памяти, в первом случае не обязательно подряд, более наглядно это для таких случаев<br><br>c1: char;<br>e1: extended;<br>c2: char;<br><br>компилятор может разместить так e1, c1, c2 взависимости от выравнивания, если конечно в языке и компиляторе ничего не изменилось с давних времен.<br><br>]]></description>
        <author>Anatoly_Podgoretsk</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60280</guid>
        <pubDate>Fri, 16 May 2003 12:13:56 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60280</link>
        <description><![CDATA[vovs: type<br> SomeRecord = record<br>  ...<br>  Caption: array[0..63]of ANSIChar;<br> end;<br><br>var<br> Rec: SomeRecord;<br> Cap: array[0..63]of ANSIChar;<br><br>begin<br> ...<br> Rec.Caption:=Cap;  //  Вот тут-то и выскакивает ошибка Incompatible types<br>[/code]<br><br>Чем это можно объяснить?<br>Q: Радной это тип &quot;type&quot;, это переменная &quot;var&quot; - принципиально разные вещи.<br><br>Скорее так:<br>type<br> type1 = record<br> &nbsp;...<br> &nbsp;type2: array[0..63]of ANSIChar;<br><br>var<br> Rec: type1;<br> Cap,: type2;<br> Caption: type2;<br><br><br>]]></description>
        <author>vovs</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60278</guid>
        <pubDate>Fri, 16 May 2003 11:11:07 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60278</link>
        <description><![CDATA[Song: Вот это не копал, хотя была мысля, но некогда. Кстати это даже в хэлпе написано, правда не помню где :( (хотел процитировать, не получилось)]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60276</guid>
        <pubDate>Fri, 16 May 2003 11:02:29 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60276</link>
        <description><![CDATA[DesWind: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Song, 16.05.03, 13:31:17</span><div class='quote '>А вот почему<br><br>Вот это<br><br>n1: Integer;<br>n2: Integer;<br><br>и это<br><br>n1,n2: Integer;<br><br>с точки зрения компилятора не одно и тоже. Однак ошибку типов он не выводит, потому что самостоятельно приводит один тип к другому, а в случае с Char не может.<br><br></div></div><br>А как они поразному располагаются в памяти?<br>]]></description>
        <author>DesWind</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60274</guid>
        <pubDate>Fri, 16 May 2003 10:49:05 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60274</link>
        <description><![CDATA[Song: Да они оба целые, но в памяти объявляются по разному.]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60273</guid>
        <pubDate>Fri, 16 May 2003 10:36:22 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60273</link>
        <description><![CDATA[Mischka: ты, наверное, имеешь ввиду, что<br>A1: array[0..255]of Smth;<br>и<br>A2: array[0..255]of Smth;<br>являются разными типами?<br>А Integer - он и в африке Integer.]]></description>
        <author>Mischka</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60271</guid>
        <pubDate>Fri, 16 May 2003 09:31:17 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60271</link>
        <description><![CDATA[Song: А вот почему<br><br>Вот это<br><br>n1: Integer;<br>n2: Integer;<br><br>и это<br><br>n1,n2: Integer;<br><br>с точки зрения компилятора не одно и тоже. Однак ошибку типов он не выводит, потому что самостоятельно приводит один тип к другому, а в случае с Char не может.<br><br>]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60269</guid>
        <pubDate>Fri, 16 May 2003 08:47:39 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60269</link>
        <description><![CDATA[Mischka: Спасибо. При компиляции не ругается, пока не скажу, насколько правильно это будет работать в дальнейшем... Но вроде бы должно.<br>А все-таки, с чем связано появление вышеозначенной ошибки?]]></description>
        <author>Mischka</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60267</guid>
        <pubDate>Fri, 16 May 2003 07:33:19 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60267</link>
        <description><![CDATA[Song: Type MyMas=array[0..63]of Char;<br><br>Type<br> SomeRecord = record<br> &nbsp;Caption: MyMas;<br> end;<br><br>var<br> Rec: SomeRecord;<br> Cap: MyMas;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> Rec.Caption:=Cap;<br>end;<br>]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60265</guid>
        <pubDate>Fri, 16 May 2003 05:59:16 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60265</link>
        <description><![CDATA[vach: Межет сперва нужно обявить <br>type <br>Cap: array[0..63]of ANSIChar<br>а потом тулить его в рекорд?]]></description>
        <author>vach</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60263</guid>
        <pubDate>Fri, 16 May 2003 05:36:41 +0000</pubDate>
        <title>Error: Incompatible types</title>
        <link>https://forum.sources.ru/index.php?showtopic=5026&amp;view=findpost&amp;p=60263</link>
        <description><![CDATA[Mischka: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">type&#60;br&#62; SomeRecord = record&#60;br&#62; &nbsp;...&#60;br&#62; &nbsp;Caption: array[0..63]of ANSIChar;&#60;br&#62; end;&#60;br&#62;&#60;br&#62;var&#60;br&#62; Rec: SomeRecord;&#60;br&#62; Cap: array[0..63]of ANSIChar;&#60;br&#62;&#60;br&#62;begin&#60;br&#62; ...&#60;br&#62; Rec.Caption:=Cap; &nbsp;// &nbsp;Вот тут-то и выскакивает ошибка Incompatible types&#60;br&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br><br>Чем это можно объяснить? А лучше бы еще и заставить работать...<br><br>ЗЫ: Если писать Rec.Caption:='Some caption' все работает прекрасно. Но мне-то надо из переменной брать значение!]]></description>
        <author>Mischka</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	