Count sub-components with the definition "TOTO"

It is still not correctly indented.

The contents of every doend and {} block should be indented. So that the start line of code is lined up with the end line and the indent guidelines are unbroken.

The indent guidelines in my Ruby lexing style (Notepad++ editor) are set to cyan color. See how the first do aligns at the same indent as it’s end, with all the subordinate code indented 1 ident.
Then again, the if is aligned with it’s own end and it’s subordinate code indented.
And again, the inner doend block is indented. And so on,… and so forth …

It will often help when you are coding a block to create the end line immediately after typing the starting line. Then go back up and insert the code between the lines. (Some code editors can do this “automagically”.)


Nor is it color lexed correctly. Again see

[How to] Colourize code on the forum? (pinned topic)

1 Like