<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Текстове поле]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1677</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1677&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Текстове поле.]]></description>
		<lastBuildDate>Sun, 30 Jul 2023 06:57:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Текстове поле]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5166#p5166</link>
			<description><![CDATA[<p>Вы можете определить массив ссылок на переменные из структуры RemoteXY и далее уже через этот массив ссылок обращаться к полям структуры по индексу.<br /></p><div class="codebox"><pre><code>struct {
  char text_1[11];
  char text_2[16];
  char text_3[5];
  char text_4[11];
} RemoteXY;

//дополнительный массив ссылок
char *textLinks[] = {
  RemoteXY.text_1, 
  RemoteXY.text_2, 
  RemoteXY.text_3, 
  RemoteXY.text_4
}; 

void setAllText()  { 
  for (int i=0; i&lt;4; i++) {
    sprintf (*textLinks[i], &quot;Field %d&quot;, i+1);
  }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sun, 30 Jul 2023 06:57:45 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5166#p5166</guid>
		</item>
		<item>
			<title><![CDATA[Текстове поле]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5146#p5146</link>
			<description><![CDATA[<p>тут такое дело для выведение в интерфейс значений нада писать допустим sprintf (RemoteXY.text_2, str);, так вот RemoteXY.text_2 - указывает на поле в котором должно вывести значение str, а если мне допустим нада по очеререди вывести в 10 полей значение, не писать же 10 раз&nbsp; sprintf (RemoteXY.(название поля), допусти 10 полей text_1-10, можно как то написать чтоб например RemoteXY.text_1....RemoteXY.text_2.....RemoteXY.text_3... например&nbsp; <br />text_1;<br />text_2;<br />text_3;<br />text_4;<br />text_5;</p><p>int r=0;<br />int str=1;<br />sprintf(RemoteXY.text_&#039;r&#039;, str)<br />str=+1;<br />r++;</p><p>тоесть после каждого выполение кода, значение r меняетса, поетому и меняетса название текстового поля, обясните можна ли так зделать если да то как?</p>]]></description>
			<author><![CDATA[null@example.com (rijs4407)]]></author>
			<pubDate>Sun, 11 Jun 2023 16:07:28 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5146#p5146</guid>
		</item>
	</channel>
</rss>
