By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Declined BTM tidy

Has anyone written a BTM tidy?

It would do things like
1. consistent case of keywords and set varables.
2. consistent use of blank space.
3. consistent indents.
4. consistent format for top lines to document.
5. normallise CrLF line endings in case disturbed, include presence of one at EOF
6. normalise alternate forms.
Not that I am aware of in the 20-odd years of TCC 's and its predecessors (4DOS, 4NT, 4OS2) existence. However, if you use the IDE to create your batch programs, it provides most of the features you desire. Many other editors can also be customized for the TCC syntax.

Note that #5 is not relevant to JPsoft batch files. They will work correctly for both POSIX style and PC-DOS style line terminators, even mixed in the same file. EOF always acts as line terminator. However, I am not aware of any editors which in the Windows environment create files that do not conform to your rules (unless contrary options are explicitly chosen), so I don't see this as a feature one would use.

By #6 do you mean consistently choosing the same form for the four commands which have alternate names, i.e., CD vs. CHDIR, REN vs. RENAME, DEL vs. ERASE, MD vs. MKDIR ? Personally I use multiple aliases for each of those, each of which includes a specific set of options I often use. For example, I use alias names based on DEL when I want to verify each deletion by a prompt, and names based on ERASE for unconditional deletion, and DEL is one of those aliases. But the aliases would not be known to the program, so it would have to parse the command to determine whether a token is an alias or a variable. And you can use the name of files with or without extension as commands, too. There are search rules to determine what a "command" is supposed to do...