Program Menu


Remove code line numbers: Does as you would expect. Removes line numbers from the code and changes GOTOs etc to use labels. The original file is left intact and the new copy without line numbers opens in a new tab..
While MMBasic can run code with line numbers, it is much more efficient to program without line numbers and using SUBs and FUNCTIONs instead of GOSUB etc.

Remove blank lines: Blank lines are good for readability but if memory is tight, removing them will help a bit. 
Copy and pasting code from Web or Word documents can sometimes result in double spacing. This fixes that.

Remove comments: Strip all comments that start with '. Comments with REM will not be removed. Useful when memory is tight.

Remove Indents and Trailing spaces: Removes formatting to reduce file size. You can always use Format to reinstate Indents.

Crunch: Performs the three above operations in one step as well as removing a lot of unnecessary white space. It tends to make code harder to read so is not recommended unless you are really short on space.
It opens a new tab with the resulting file, leaving the original intact. Lines starting with # are left intact. 
By default the first line is left intact even if it is a comment. The first line is special!

Remove non-ASCII characters:  Replaces those annoying quotes that appear in code copied from PDF's or MS Word documents. It also replaces a few other troublesome space characters and any unicode that has crept in.

Make selected lines a comment: Useful for temporally removing sections of code.

Uncomment selected lines: Reverses the above.

Format. Adds Indents to make reading code easier. It also warns if there is a FOR...NEXT or DO...LOOP etc that is not correctly terminated. If the option to use soft-tabs (space characters), any TABs in the file will be converted.

Save keyword case: The keyword case seen in the edit window is temporary and unless you choose to Save Keyword Case, your code will be saved in the case you typed it in. 
MMBasic is not case sensitive so it is purely cosmetic. You may wish to Save keyword case before posting code on Internet forums or in documents. If you have 'Camel' case selected, normally it will not display as such but it will get converted when you do a 'save keyword case'.

Merge: The code is scanned and any lines with INCLUDE directives will have the file referenced inserted.
In the main code a comment line with either "$INCLUDE:" (Quick Basic style) or "#INCLUDE" (C style) with indicate where the include file is to be placed. Running ‘merge’ from the ‘Program’ menu will insert the library files into the main file. A comment line will be inserted at the end of the include file so you know what code was added. The original include directive has another comment (‘) added to prevent subsequent merges from adding a second copy of the include file. An include file can have its own includes. In both cases, the added code is now part of a new file in a new tab, leaving the original file intact. Note: Some versions of MMBasic also have INCLUDE directives or an equivalent and that may be a better choice.

Display Variable Report. List all variables and labels used. You will get awarning if unpaired brackets are detected during the scan. With this list you can locate redundant code.  It also lists sections of code that might get corrupted when posting on TBS forum.

DOS line endings/Unix line endings: Sets the line-endings. Maximites are reasonable tolerant but it is safest to stick to DOS. It will tidy up inconsistencies if code has been pasted from different sources.
MMEdit checks the first 1K of a file when it is loaded and if any <CR> is found it assumes the file has <CRLF> line endings and converts the full file to DOS.
If the check fails to find any <CR> in the first 1k, UNIX style lien endings are assumed and the full file is set to UNIX <LF> only
Most 'mites prefer DOS <CRLF> line endings.
When files are being uploaded via MMCC using "Load and Run", AUTOSAVE is used and the line-ending in the file is ignored and replaced with the line-ending set in MMCC. 

 

 

Last edited: 12 September, 2022