Comments are not formatted as desired

Symptom:

When formatting code in the ST-editor, comments are not aligned to each other. An empty line is inserted, if the file starts with a comment.
In detail: If you format already existing ST-code by using the command Format (in the context menu under Source) or the key combination Ctrl+Shift+F, comments in the ST-code are not aligned to each other (see example).

Example (before formatting)
FUNCTION_BLOCK FUB_LEDCylon
/*
* The LEDs are shifted back and forth.
*/
END_FUNCTION_BLOCK
Example (after formatting)
FUNCTION_BLOCK FUB_LEDCylon
/*
* The LEDs are shifted back and forth.
*/
END_FUNCTION_BLOCK

Moreover, if there is a comment inserted at the top of the file, an empty line is inserted before this comment. Hence, the file starts with an empty line.

Solution: Use a logi.CAD 3 version ≥ 1.116.0. In version 1.116.0, the formatting of the code has been modified so that the above-mentioned problems do not occur anymore.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg logi.cals recommends to install and use the most current versions of logi.CAD 3 and the runtime system so that the latest features and problem fixes according to the release notes are provided in the used version.


Did this article help you? Did you find the requested information in this user documentation?
If not, contact the support team of logi.cals. State your questions or suggestions to improve/enhance the user documentation as detailed as possible.