Tools > Options > Text Editor > Clarion > Smart Formatter > Statement ending with colon as Label?

Used in combination with “Enable entered line formatting”, if you write a label and end it with a colon, that gets idented to the column 1 else idents on other column. Example, open a clw and write at the end this two lines:
mylabel:[ENTER]myvar=1[ENTER]
mylabel: would go to column 1 and myvar=1 would stay on its column

If you don’t activate “Enable entered line formatting”, you could get the previous behavior marking a block of code (those two lines for example) and press CTRL-I (ident), or taking the cursor to the first character (eg.“m” from mylabel:) and pressing ENTER, the line would move to the first column at the next line, and on the “m” of myvar it would move to the same column (not 1) on next line.

Those two lines could be on the same line separated with at least one space.

Usually when you think in labels in CODE section you think in GOTOs, so probably not much used in Clarion, where labels doesn’t need to end with colon, and if it ends with colon, it is part of its name.

https://clarion.help/doku.php?id=declaration_and_statement_labels.htm

https://clarion.help/doku.php?id=goto_go_to_a_label_.htm

1 Like