Control strategy model modeling specification (naming principle)

3.1. Naming principle

The naming of files, folders, subsystems, modules, input and output modules, parameters, signals, buses, etc. should comply with the following principles:
1. Use meaningful names: accurately express the meaning of variables;
2. Use coding information: adopt standards Abbreviation/abbreviation or acronym;
3. Add data type: specify the type of variable;
4. Add project or system unit: exactly indicate the unit
used by the variable ; 5. Use the variable's (scope) domain: indicate the source and storage of the variable Types of.

3.2. Naming Convention

General naming conventions for files, folders, subsystems, modules, input and output modules, parameters, signals, buses, etc.:
1. Start with characters (A~Z, a~z), characters, numbers (0~9) and The underscore and other combinations constitute the name of the variable, and it is sensitive to the case of characters, and follows the general C language variable naming principle;
2. The first character cannot be numbers and underscores, and the end characters cannot be underscores; underscores can be used to separate characters, but they are not allowed Use 2 or more underscores in a row to separate characters;
3. Chinese characters are not allowed, and spaces are not allowed;
4. Name length: 3 to 31 characters/characters length (excluding extensions and. Characters);
5. Yes To enhance readability, use underscores to separate upper and lower case characters. In principle, there are no more than four underscores in variable names;
6. (Signal and parameter names) It is prohibited to use any MATLAB keywords/reserved words, function names or operator names. For example: "pi", "true", "false", "break", "case", "catch", "classdef", "continue", "else", "elseif", "end", "for", 'function','global','if','otherwise','parfor','persistent','return','spmd','switch','try','while','eps','Enf ','Intmax' ,'Intmin','NaN','pi','realmax','realmin','true','false','inf'...
7. It is forbidden to use any characters used in the code automatically generated by MATLAB, such as:' const','TRUE','FALSE','infinity','nil','double','single','or','enum'…

category

special requirements

file

The extension identifier (extension) cannot contain spaces.

Folder / subsystem

Carriage return is not allowed ;

Module

Line breaks can be used

Input output module

Newline characters are not allowed ;

Parameters / signals / bus

Newline characters / no control characters are not allowed ;

Guess you like

Origin blog.csdn.net/lm393485/article/details/88894302