Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReGaHSS: foreach [5/12 BP-5b] -> Datentypänderung (zu idarray null) der Variable im 1.Parameter führt zu falscher Ausgabe #2615

Open
BadenPower opened this issue Jan 14, 2024 · 0 comments
Labels
🐛 bug-report Something isn't working 🏷️ ReGaHss This refs the ReGaHss component

Comments

@BadenPower
Copy link

Describe the issue you are experiencing

Ist der 2. Parameter der foreach-Anweisung vom Datentyp integer und es wird innerhalb der Schleife der Datentyp der Variable, welche im 1. Parameter der foreach-Anweisung verwendet wird, in den Datentyp idarray geändert, wobei die Variable keine gültige Referenz enthält und verbleibt bis zum Ende des Durchganges als solche, dann wird der interne Schleifenwert auf 0 gesetzt. Der Ausgabetyp wird beim nachfolgenden Schleifendurchlauf wieder automatisch zu integer und in normaler Weise hochgezählt.

Describe the behavior you expected

Erwartet würde, dass die Änderung des Datentyps innerhalb des Schelifendurchlaufs für die weiteren Schleifendurchläufe keine Auswirkung hat. Vor allem darf der interne Schleifenwert nicht beeinflusst werden.

Steps to reproduce the issue

Ausführung des folgenden Skriptes unter "Skript testen":

WriteLine("Start");
WriteLine(dom.BuildLabel());
integer lCount = 0;
string lEnum;
integer lParam2 = 10;
idarray lIdarray;

foreach(lEnum,lParam2)
{
  lCount = lCount + 1;
  WriteLine("--------------------------------------------------");
  WriteLine("Durchlauf: " # lCount);
  if(true)
  {
    Write(lEnum.Type() # " ");
  }
  WriteLine(lEnum);
  if(lCount == 5)
  {
    lEnum = lIdarray;
    !lEnum = true;
    WriteLine("Enum geändert");
  }
}
WriteLine("--------------------------------------------------");
WriteLine("Schleifenende:");
if(true)
{
  Write(lEnum.Type() # " ");
}
WriteLine(lEnum);
WriteLine("lCount = " # lCount);
WriteLine("");
WriteLine("Ende");

What is the version this bug report is based on?

CCU3 mit ReGaHSS-Version R1.00.0388.0235

Which base platform are you running?

rpi3 (RaspberryPi3)

Which HomeMatic/homematicIP radio module are you using?

n/a

Anything in the logs that might be useful for us?

bestehend seit:
ab ReGaHss-Version R1.00.0388.0227 (20.10.2021)

Additional information

Ausgabe des Skriptes:

Start
R1.00.0388.0235
--------------------------------------------------
Durchlauf: 1
integer 1
--------------------------------------------------
Durchlauf: 2
integer 2
--------------------------------------------------
Durchlauf: 3
integer 3
--------------------------------------------------
Durchlauf: 4
integer 4
--------------------------------------------------
Durchlauf: 5
integer 5
Enum geändert
--------------------------------------------------
Durchlauf: 6
integer 1
--------------------------------------------------
Durchlauf: 7
integer 2
--------------------------------------------------
Durchlauf: 8
integer 3
--------------------------------------------------
Durchlauf: 9
integer 4
--------------------------------------------------
Durchlauf: 10
integer 5
--------------------------------------------------
Durchlauf: 11
integer 6
--------------------------------------------------
Durchlauf: 12
integer 7
--------------------------------------------------
Durchlauf: 13
integer 8
--------------------------------------------------
Durchlauf: 14
integer 9
--------------------------------------------------
Durchlauf: 15
integer 10
--------------------------------------------------
Schleifenende:
integer 11
lCount = 15

Ende
@BadenPower BadenPower added the 🐛 bug-report Something isn't working label Jan 14, 2024
@BadenPower BadenPower changed the title ReGaHSS: foreach [3/12 BP-4b] -> Datentypänderung (zu idarray null) der Variable im 1.Parameter führt zu falscher Ausgabe ReGaHSS: foreach [5/12 BP-5b] -> Datentypänderung (zu idarray null) der Variable im 1.Parameter führt zu falscher Ausgabe Jan 14, 2024
@github-actions github-actions bot added the 🧊 stale Ticket is in a stale state (about to be closed) label Apr 14, 2024
@jens-maus jens-maus added 🏷️ ReGaHss This refs the ReGaHss component and removed 🧊 stale Ticket is in a stale state (about to be closed) labels Apr 14, 2024
@jens-maus jens-maus added this to the future release milestone Apr 14, 2024
Repository owner deleted a comment from github-actions bot Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug-report Something isn't working 🏷️ ReGaHss This refs the ReGaHss component
Projects
Development

No branches or pull requests

2 participants