Hej er det en der kan sige mig, hvorfor min kodning i en sketch ikke bliver grøn, når jeg skrriver specifikationer, eks.. HIGH eller LOW
Version 2.2.1?
Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum .
Your topic has been moved to the dedicated IDE 2.x section of the forum..
You have posted in the English section of the forum; please use the English language.
Hi @oletexas . Arduino IDE 2.x uses a common C++ language syntax highlighting system for coloring the sketch code in the Arduino IDE editor. Unlike Arduino IDE 1.x , it does not have any supplemental capability for developers to define arbitrary additional keywords. For this reason, keywords with special significance in the Arduino language , but not in C++ are not given special coloration as they were in Arduino IDE 1.x.
The Arduino IDE developers are tracking the need to add highlighting for these keywords here:
opened 09:42AM - 18 May 21 UTC
topic: code
type: imperfection
criticality: medium
### Describe the problem
The IDE uses a standard C++ syntax highlighting syst… em. The result is that some keywords/types/CONSTANTS that are specific to [the Arduino programming language](https://www.arduino.cc/reference/en/) do not get syntax highlighting in the Arduino IDE editor.
Examples include:
- `byte`
- `OUTPUT`
- `INPUT`
- `INPUT_PULLUP`
- `LOW`
- `HIGH`
### To Reproduce
Steps to reproduce the behavior:
1. Create a Sketch
1. Replace its content with the following
```C++
byte myNumber = 0;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
pinMode(3, INPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
```
### Expected behavior
Syntax highlighting is provided for all keywords of the Arduino programming language.
### Arduino IDE version
2.0.0-beta.7
### Operating system
All
### Additional context
Note that highlighting for many of the Arduino language keywords are already provided by the C++ highlighter. No special treatment for those keywords is necessary.
---
Also reported at:
- https://github.com/arduino/arduino-ide/issues/1785
- https://github.com/arduino/arduino-ide/issues/1485
- https://github.com/arduino/arduino-ide/issues/890
- https://github.com/arduino/arduino-ide/issues/108
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/1
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/3
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/11
- https://forum.arduino.cc/t/code-colouring-boolean-vs-char/1033122
- https://forum.arduino.cc/t/arduino-ide-2-0-editor-text-color-mismatch-on-keyword-byte/1033975
- https://forum.arduino.cc/t/disimproved-editor-2-x/1049962
- https://forum.arduino.cc/t/ide-v2-0-2-program-interface-functions/1055809/3
- https://forum.arduino.cc/t/ide-2-1-1-colores-de-palabras-reservadas/1150024
- https://forum.arduino.cc/t/arduino-ide-2-2-1-vs-ide-1-8-13/1189218/5
- https://forum.arduino.cc/t/kodning-i-sketch/1212686
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://github.com/arduino/arduino-ide#nightly-builds)
- [X] My report contains all necessary details
Please note that syntax highlighting is purely aesthetic. The lack of coloration of these keywords doesn't have any technical significance.
system
Closed
July 16, 2024, 5:54pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.