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

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

I’m racking my brains trying to think of any examples in which to test this option.

Nothing in the Assembler or Mod-2 comments Topspeed assembler - ide / docs - ClarionHub

I’m aware that colons get used in labels and can be doubled up by the shipping templates as a naming convention to avoid conflicts, but I’m not aware of any examples where a statement could end with a colon?

Any suggestions?

TIA

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

Ok I wasnt sure if this was referring to CODE as in anything in a .clw below a CODE statement or anything in a .clw including the data section or which method used to add embed code.

Its bit over the place because embeds accessed from the embed tree have their priority label and Column1 tick box option, but the Filled or View Source editors ignore the column 1 tickbox. So it was a case of trying to figure out what was actually trying to be achieved.

this is what I had written down.

Treat statement ends with colon as label
Default: Unticked

In Clarion, the standard templates can generate labels that can contain one or more colons.
Eg BRW1::Sort0:Locator IncrementalLocatorClass ! Default Locator
BRW1::View:Browse VIEW(BaseDataType)
This is a naming convention the templates use to avoid name conflicts between template generated labels and hand code. You can also terminate labels with a colon for this same reason, although extremely rare!

Cant find any examples to test unless this is colouring or highlighting syntax.

I’m writing a manual on how to customise the IDE, hence this question. 29 pages so far just text, no screen shots to bloat it out :wink: and I’m only upto Tools, Options Text Editor, Highlighting, which will be a section in itself considering the lack of documentation online.
Full list of tags for syntax highlighting - SharpDevelop Wiki (archive.org)
Creating syntax highlighting - SharpDevelop Wiki (archive.org)

Thanks!

1 Like