// Tower-Control auf MEGA 2560
const char ver[] = {"TC-V1.0.8 rotary"};
// Vorbereitung LCD-Menu Zeichenketten
const unsigned menueStrLen {12};
const unsigned hauptMenuePunkte {12};
Nach dem drücken von STRG-T ist die erste Zeile beginnend mit const unsigned umgebrochen:
const char ver[] = {"TC-V1.0.8 rotary"};
// Vorbereitung LCD-Menu Zeichenketten
const unsigned menueStrLen
{
12
};
const unsigned hauptMenuePunkte {12};
kommt noch ein Kommentar dazu, ist es noch verrückter:
const unsigned menueStrLen
{
12
}; // Kommentar
const unsigned hauptMenuePunkte
{
12
};
const unsigned turmAnzeigePunkte{5};
Ein // NOPAD hilft auch nicht. Ich hab mir jetzt mit einem // INDENT-OFF - // INDENT-ON geholfen.
Hat wer ne Idee was da nicht funktioniert?
Ist meine IDE kaputt?
kaputt - nein. macht er bei mir auch.
kannst mit einem
constexpr unsigned menueStrLen {12};
leben?
aber es liegt vermutlich am Kommetar davor...
2 Likes
Hm. Stimmt.
Wenn der raus ist, gehts.
Ich nehm mal Deine Variante.
Danke!
hm... WTF...
//a
const unsigned test_a (12); //OK
//b
const unsigned test_b { 12}; //bricht
//c
const unsigned test_c = 12; // OK
//"Leere" Zeile
;
const unsigned test_leerzeile {12}; //ok
//constexpr
constexpr unsigned test_constexpr {12}; //OK
du findest Sachen...
noiasca:
hm... WTF...
Ich hab die Lösung!
Kurzfassung:
in der Formatter.conf
--keep-one-line-blocks
Langfassung:
quick update... the controls for the formatting in the IDE is held at \lib\formatter (for me its C:\Program Files (x86)\Arduino\lib\formatter. Astyle options are held here. Change it, and restart the IDE to take effect. I added
keep-one-line-blocks
keep-one-line-statements
and the braces are not split. These options control how code blocks held within braces are handled, not apparently differentiating between a code block's use of braces, and the C++11 use in uniform declaration. If, as it ap…
1 Like
system
Closed
January 2, 2022, 12:39pm
6
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.