Start a new topic

increment variable name

 Hello, it is possible with a for loop variables to count high?

Here's an example:

if(altkanal0.txt!=main.kanal0.txt)
{
  altkanal0.txt=main.kanal0.txt
  b0.txt=main.name0.txt
  b0.txt=b0.txt+"\r\r"
  b0.txt=b0.txt+main.kanal0.txt
}
if(altkanal1.txt!=main.kanal1.txt)
{
  altkanal1.txt=main.kanal1.txt
  b1.txt=main.name1.txt
  b1.txt=b1.txt+"\r\r"
  b1.txt=b1.txt+main.kanal1.txt
}
if(altkanal2.txt!=main.kanal2.txt)
{
  altkanal2.txt=main.kanal2.txt
  b2.txt=main.name2.txt
  b2.txt=b2.txt+"\r\r"
  b2.txt=b2.txt+main.kanal2.txt
}
if(altkanal3.txt!=main.kanal3.txt)
{
  altkanal3.txt=main.kanal3.txt
  b3.txt=main.name3.txt
  b3.txt=b3.txt+"\r\r"
  b3.txt=b3.txt+main.kanal3.txt
}
if(altkanal4.txt!=main.kanal4.txt)
{
  altkanal4.txt=main.kanal4.txt
  b4.txt=main.name4.txt
  b4.txt=b4.txt+"\r\r"
  b4.txt=b4.txt+main.kanal4.txt
}
if(altkanal5.txt!=main.kanal5.txt)
{
  altkanal5.txt=main.kanal5.txt
  b5.txt=main.name5.txt
  b5.txt=b5.txt+"\r\r"
  b5.txt=b5.txt+main.kanal5.txt
}
if(altkanal6.txt!=main.kanal6.txt)
{
  altkanal6.txt=main.kanal6.txt
  b6.txt=main.name6.txt
  b6.txt=b6.txt+"\r\r"
  b6.txt=b6.txt+main.kanal6.txt
}
if(altkanal7.txt!=main.kanal7.txt)
{
  altkanal7.txt=main.kanal7.txt
  b7.txt=main.name7.txt
  b7.txt=b7.txt+"\r\r"
  b7.txt=b7.txt+main.kanal7.txt
}


The short answer is No.  This would either require an array of variables, or change the structure of the components from records to objects, and the routines for casting.


Perhaps with the assistance of the connecting MCU a method could be found.  This would be better answered in the Free Chat section - if you are wanting a discussion on it.

I am now reviewing all of the Feature Requests, this will take some time, patience please.

Although this wasn't a real feature request, it is now marked as reviewed.

Login or Signup to post a comment