Backtick identifiers
By using backticks, characters can also be used in identifiers that are not normally permitted in identifiers, such as special characters. The acute accent character is used for backticks: ´ (Unicode: U+02CA)
The use of backticks is recommended in order to be able to use the same identifiers in CODESYS as in other programming languages or documents, such as circuit diagrams.
Any character may be used between two backticks, except line breaks and other backticks. Keywords are also allowed as identifiers between backticks.
Examples:
´Variable+9´
´INT´
The backticks are part of each identifier and therefore var1 and ´var1´ are two different identifiers.
Example
PROGRAM PLC_PRG
VAR
var1 : INT;
´var1´: INT;
END_VAR
var1 := var1 + 1;
´var1´ := 12;
Are there any limitations or is something missing in my development environment?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Important:
` - Backtick - ASCII 96
' - Apostrophe or Single Quote - ASCII 39
In the online help for some reason it renders ’ ...
The only issue I don't get, why identifiers are still case-insensitive, even within `backtricks`?
`mPa` and `MPa` for milli-, mega Pascal are the same identifiers, unfortunately... Is this a bug or a feature?
Hello, I’m in Codesys 3.5.20.40 and I try to declare the variable ´var1´ but I get an error.
here : https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_rules.html
i read :
Backtick identifiers
By using backticks, characters can also be used in identifiers that are not normally permitted in identifiers, such as special characters. The acute accent character is used for backticks: ´ (Unicode: U+02CA)
The use of backticks is recommended in order to be able to use the same identifiers in CODESYS as in other programming languages or documents, such as circuit diagrams.
Any character may be used between two backticks, except line breaks and other backticks. Keywords are also allowed as identifiers between backticks.
Examples:
´Variable+9´
´INT´
The backticks are part of each identifier and therefore var1 and ´var1´ are two different identifiers.
Example
PROGRAM PLC_PRG
VAR
var1 : INT;
´var1´: INT;
END_VAR
var1 := var1 + 1;
´var1´ := 12;
Are there any limitations or is something missing in my development environment?
Important:
` - Backtick - ASCII 96
' - Apostrophe or Single Quote - ASCII 39
In the online help for some reason it renders ’ ...
The only issue I don't get, why identifiers are still case-insensitive, even within `backtricks`?
`mPa` and `MPa` for milli-, mega Pascal are the same identifiers, unfortunately... Is this a bug or a feature?
Otherwise can do pretty nasty things with it:
Last edit: Strucc.c 2025-11-05
Hello, thank you for letting me know.