I've recently updated DBA Tidy - an old program of mine from back in 2001 and thought I'd post the new version here.
Although it's not written in Dark Basic, it's a utility
for Dark Basic .DBA files which will correctly indent the lines.
If your source code is not indented, or is partially/incorrectly indented, DBATidy will sort it out for you - especially useful if your project is quite large and indenting it properly has become too big a task.
It's also essential if you need to post code on the forums as many of the more experienced coders won't bother with unindented code as it is too difficult to follow.
[Edit] Oops - forgot to mention the one single rule to using it:
This probably won't affect the majority of you, but if - like me - your programs have labels scattered around your program like 'EnemyCodeStartsHere:' then DBATidy can confuse them with the start of a procedure and look for an associated Return (the labels used are identical).
So, the rule is that labels on their own on a line are the start of a Gosub procedure. ALL other labels MUST have a REM after the colon.
Examples:
MyProcedure:
Return
On it's own on a line, this label is the start of a procedure and DBATidy will start indenting. Do not add ANYTHING after the colon on the end.
MyLabel: Rem A non-procedure label
With this label, the Rem tells DBTidy that it's not the start of a procedure and does not trigger indentation.
Download file attached.
TDK_Man