Configuration | Naming conventions Configuration of the naming conventions Formation of the expected prefix The prefix expected for the different declarations is formed depending on the configuration of the options found in the Options [ } 89] dialog. On the Options [ } 89] page you will also find explanations on how the expected prefix is formed, as well as some samples. Placeholder {datatype} with alias variables and properties Please also note the possibilities of the placeholder {datatype} [ } 92] , which you can use for the prefix definition of alias variables and properties.
Local prefix definition for structured types For variables of structured types, you can specify a prefix locally in the data type declaration using the 'nameprefix' attribute [ } 124] . Sample output The variable iCounter : INT; is declared. For INT variables, however, the prefix n is specified with the help of NC0014. The following error is therefore output in the Error list [ } 118] when the static analysis is performed: TE1200 81 Version: 2.11.1 Names Nodes and elements for which a prefix can be defined The number in brackets after each element, for example "PROGRAM (102)", is the prefix convention number that is output if the naming convention is not followed.
Prefix You can define the naming conventions by entering the required prefix in this column. Please note the following notes and options: • Several possible prefixes per line ◦ Multiple prefixes can be entered separated by commas. ◦ Example: "x, b" as prefixes for variables of data type BOOL. "x" and "b" may be used as prefix for Boolean variables. • Regular expressions ◦ You can also use regular expressions (RegEx) for the prefix. In this case you have to use @ as additional prefix. ◦ Example: "@b[a-dA-D]" as prefix for variables of data type BOOL. The name of the boolean variable must start with "b", and may be followed by a character in the range "a-dA-D".
• Data type placeholder ◦ For variables of the Alias data type and for properties you can use the data type placeholder "{datatype}" as prefix. ◦ Example:
Prefix for the variable data type Alias (33) = "{datatype}" Prefixes for variables Organizational node for all variables for which a prefix dependent on their data type or scope can be defined Prefixes for POUs Organizational node for all POU types and method validity ranges for which a prefix can be defined Prefixes for DUTs Organizational node for the DUT data types Structure, Enumeration, Alias or Union for which a prefix can be defined Prefixes for user- defined types (NC0160) Available from TC3.1 Build 4026 An organizational node for configuring a prefix for specific user-defined types, particularly those from libraries or for read-only types (e.g. PVOID, HRESULT).
For more information see: NC0160: User-defined type [} 89]