@Rabenauge: https://www.arduino.cc/reference/en/...tructure/goto/
ich kenne - und habe selber - ein paar Programme, bei denen es nahezu unmöglich ist, ohne goto auszukommen - Beispiel gefällig?The reason that many programmers frown upon the use of goto is that with the unrestrained use of goto statements, it is easy to create a program with undefined program flow, which can never be debugged.
With that said, there are instances where a goto statement can come in handy, and simplify coding. One of these situations is to break out of deeply nested for loops, or if logic blocks, on a certain condition.
schön formuliert
Holomino hat völlig Recht, du musst deine Variablendeklarationen für die Strings ein paar Stufen höher machen, z.B. im Kopf der Funktion oder sogar global, damit sie nie von goto übersprungen werden können.
Lesezeichen