What's New in Version 32

CMDebug 32.10:

 

 

IDE / Batch Debugger:

 

Added support for creating & editing NTFS streams. The syntax is "filename.ext:streamname".

 

 

New Internal Variables:

 

_BATCHLABEL - Returns the name of the current GOSUB subroutine. (Or an empty string if not in a subroutine.)

 

 

Updated Commands:

 

COPY

 

/G -  now writes the progress % directly to the display instead of STDOUT.

 

DO / ITERATE

 

ITERATE n - if n is specified and > 0, ITERATE will exit n nested DO loops and then iterate the nth parent DO loop.

 

MOVE

 

/G -  Now writes the progress % directly to the display instead of STDOUT.

 

POPD

 

/N - Pop the directory off  the stack, but don't change the directory.

 

PUSHD

 

/N - Push the directory onto the stack, but don't change the directory.

 

RD

 

/Nj - Don't follow junctions / symlinks

 

WATCH

 

The WATCH header now displays a timestamp before the command name.

 

/A - Highlights all changes between the current run and the first one,instead of the difference between the current and previous runs.

 

/B - Beeps if the return code != 0

 

/F - Freezes the display if hte output changed, and prompts you to enter a key to continue.

.

/U - Beep if the output changes

 

/X - Exits if the output changes

 

 

New Commands:

 

CALLER

 

Returns the context of the current batch call, including the line number, (optional) subroutine label, and batch file or library name. The syntax is:

 

CALLER n

 

If n is not specified, CALLER displays the line number and batch file or library name for the current line. If n is specified, CALLER displays the line number, subroutine label (or "main" if not in a subroutine), and batch or library name. The n value for the current line is 0, the previous call in the program stack is 1, etc.

 

EXEC

 

Replace the current TCC shell with the specified program. The syntax is:

 

EXEC command [args ...]

 

FALSE

 

Returns 0 (and sets ERRORLEVEL to 0).

 

FSEARCH

 

Search files for text.  (FSEARCH is the replacement for the aged and soon-to-be-deprecated FFIND, and the options and syntax are almost identical. New features will only be implemented in FSEARCH, not FFIND. (FSEARCH is entirely new code; it doesn't share anything with FFIND.) The FSEARCH syntax is:

 

FSEARCH [/= /+n /-n /8 /B /C /E"regex" /F /G /H /I /L /N[dehjs] /Q /S[[+]n] /T"text" /U /V /Y /Z] [path] filename

 

/+n - Skip the first n matches

 

/-n - Stop after n matches

 

/8 - Instead of scanning the files for their type, they are assumed to be UTF8 (this is a little faster).

 

/B - Only display filenames (no header or footer or summary or matching lines)

 

/C - Match case

 

/E"..." - Regular expression search

 

/F - Stop after first match (overrides /V)

 

/G - Change to the directory containing the first matching file (also sets /F and overrides /V)

 

/H - Don't search for text in binary files. By default, this includes .exe, .dll, .sys, .chm, .zip, .pdb, .pch, .obj,

.tar, .com, and .ewriter. You can define your own list by setting the "BINARY_FILES" environment variable.

 

For example, to ignore .exe, .sys, and .dll files:

 

BINARY_FILES=.exe;.sys;.dll

 

/I - Used with /T to tell FSEARCH to ignore wildcard characters (*, ?, and [...]).

 

/L - Display line numbers for matching text

 

/N... - Disable options:

 

D - Don't scan hidden subdirectories

 

E - Don't display errors

 

H - No header

 

J - Skip junctions

 

S - No footer (summary)

 

/Q - Don't display any output. The internal variables (see below - _fsearch_errors, _fsearch_files, and _fsearch_matches are set).

 

/S - Search subdirectories of the specified (or default) path.

 

If you specify a number following the /S, FFIND will limit the subdirectory recursion to the number specified. For example, if you have a directory tree "\a\b\c\d\e", /S2 will only go to the "a", "b", and "c" directories.

If you specify a + followed by a number after the /S, FFIND will not search for files until it gets to that depth in the subdirectory tree. For example, if you have a directory tree \a\b\c\d\e, /S+2 will not find anything in \a or \a\b.

 

/T"..." - Search for the matching text. Supports TCC wildcards (?, *, and [...]).

 

/U - Only display summary line (no filenames or matching lines; overrides /V)

 

/V - Display all matching text (FFIND defaults to only displaying the first match in each file)

 

/Y - Display a "Continue Y/N" prompt after displaying each match

 

/Z - Highlight the matched text

 

FSEARCH will automatically determine the file type (ASCII, UTF8, or UTF16).

 

FSEARCH sets three internal variables:

 

_fsearch_errors - Errors when running FSEARCH (i.e., file/path not found, file locked, access denied, etc.)

 

_fsearch_files - The number of files containing one or more matches

 

_fsearch_matches - The total number of matches

 

INTERNAL

 

Runs the specified internal command, ignoring any aliases, plugins, or external apps.  The syntax is:

 

INTERNAL command args ...

 

If command is not an internal TCC command, INTERNAL will return an error.

 

RANDOM

 

Generates  a random integer, bool, float, char, or string.  The syntax is:

 

RANDOM /I start, end - Create an integer >= start and <= end. The start and end arguments are signed 64-bit values.

 

RANDOM /B - Create a boolean (0 or 1)

 

RANDOM /F start, end, precision - Create a floating point number >= start and <= end, with precision decimal places.

 

RANDOM /C start, end - Create a character between (inclusive) the characters start and end.

 

RANDOM /S start, end, length Create a string composed of characters between start and end (inclusive).

 

RANDOM /D n - Roll an n sided dice.

 

TRUE

 

Returns 1 (and sets ERRORLEVEL to 1).

 

 


 

 

CMDebug 32.0:

 

CMDebug and TCC-RT  are built with a new version of Visual Studio.

 

 

TCC-RT:

 

Many security, performance & size improvements.

 

Added support for 8K monitors.

 

Added support for Python 3.13.

 

 

IDE / Batch Debugger:

 

Many security, performance & size improvements.

 

Added support for 8K monitors.

 

Improved the syntax styling performance for large files.

 

The editor now supports autocompletion for TCC or CMD command names, internal variables, and variable functions. To display the autocompletion dropdown, enter the partial name and then press Ctrl-Enter.

 

There are two new options in the File menu:

 

Save to HTML - saves the current file as an HTML file.

 

Save to XML - saves the current file as an XML file.

 

There is a new option in the View menu:

 

Mark max colum - Invokes a dialog box asking for a column #. Then draws a vertical line following that column in the edit window. This can be useful to identify overly-long lines.

 

 

Help:

 

Help for CMDebug is now available in English, French, German, and Spanish. You can download the help files from:

 

JP Software Downloads - Take Command, TCC, CMDebug, and TCC-RT

 

The eWriter file viewer has been updated to version 4.0, and the skin for the Take Command help has been rewritten.

 

The help is build with a new version of Help & Manual (9.4.1).

 

 

New Commands:

 

WATCH

 

Run command(s) repeatedly, displaying the output and highlighting the difference(s) from the last run. WATCH allows you to see how program output changes over time.

 

The syntax is:

 

WATCH [/C /D /Hn /In /Mn /Nf /Nh /R"regex" /Tn /V] "command ..."

 

/CClear the display and home the cursor before each run

 

/DDisable the highlight colorization

 

/HnDisplay only the leading n lines

 

/InInterval (in seconds) between each run

 

/MnMaximum number of times to run the command

 

/NfDisable the WATCH footer

 

/NhDisable the WATCH header

 

/R"regex"Only display the output lines that match the regular expression

 

/TnDisplay only the trailing n lines

 

/VVerbose output (header and footer)

 

CommandCommand(s) to execute

 

Command can be an internal command, alias, batch file, or an external application.

 

A simple example to display how WATCH works:

 

watch /c /v "echo time=%%_time & echo date=%%_date"

 

Note that you need to double your %'s if you want the variables to be expanded by the specified commands instead of by WATCH.