Introduction MTB Statements File System Compiler Applications Reference Guide Index

Overview What's New Publication Information

Here are the new features in the MTB language.

WAIT statement
The WAIT statement was added in Build 294. It is a synonym for INPUT (0) "".

(Flush) mnemonic
Support for the (Flush) mnemonic was added in Build 294. The (Flush) mnemonic, when sent to a RAW printer, causes any pending data retained by the spooler to be sent to the printer.

(EasyScan) mnemonic
(EasyScan) mouse clicks now occur on the up-click instead of the down-click. This is consistent with other Windows applications. Also, an (EasyScan) code of 14 indicates that the right mouse button was clicked.

New Directive
The INCLUDE directive was added in Build 292. INCLUDE is a synonym for USE. This statement will change the vocabulary of the MTB language. What were previously called "usefiles" will now also be known as "include files."

END Statement
Starting with Build 292, the END statement can be used to denote the end of a section within a usefile (also known as an include file).

PSTAT Function
Starting with Build 292, Comet adds leading zeros to the partition name in the PSTAT function if you specify a "short" partition name. For example, if your code includes PSTAT("3"), Comet will perform PSTAT("003").

New Mnemonics
The (Copy from Clipboard), (Copy to Clipboard), and (Query Clipboard) mnemonics were added in REL 01.05. The (CrMode) and (ShellExecute) mnemonics were added in REL 00.06. In REL version 99.01, added the (Launch) mnemonic, which launches Windows applications or documents, and the (Screen) mnemonic, which sets a maximum screen size of 255 columns by 255 rows.

Sytem Symbolic Constants
As of Comet98 and Comet2000 Build 278, Comet includes four system symbolic constants. Like system variables, these symbolic constants are available to be used in an MTB program without being defined or set. The four system symbolic constants are:

TRUE
FALSE
DECPASS
EXEPASS

Added new features in Comet98 Build 266 (May 2000)

Increased Maximum Program Size in Comet98
Effective in Comet98 Build 237, the maximum program size has been increased. Previously, the limit on program size (common + local + formats + constants + code) was 56K. The program loader has been changed to allow larger programs. Now, an MTB program that is larger than 56K loads into 2 memory segments, and the following restrictions apply:

32-character Labels
All labels in MTB now have a maximum length of 32 characters. Previously, the maximum length of a label was 8 characters (longer labels were accepted, but the first 8 characters had to be unique).

This feature applies to the following elements within MTB:

String Symbolic Constants
The SET directive has been expanded to include a string as the symbolic constant. The "string SET" statement replaces the symbolic constant string with a specific string constant when the program is compiled. The string constant may contain up to 254 characters.

Conditional Compilation
The MTB compiler contains a conditional compilation feature. You can write an MTB source program that includes portions of code that will be compiled only if a symbolic constant has been SET. As a result, you can write one comprehensive source program, but include or exclude specific sections simply by setting a flag in your source program.

Windows Printer Mnemonics
MTB now includes more than 25 mnemonics for Windows printers. These mnemonics, when used with the MTB Windows Development Library, provide a way to print multiple fonts and colors, print bitmap graphics, print line graphics, set orientation and paper size, and more.

ACCESS Statement
The ACCESS statement can now access up to 10 non-configured Comet directories.

DATE2NUM and NUM2DATE Functions
Two additional date manipulation functions have been added to MTB. The DATE2NUM function converts a formatted date string to a date serial number. The NUM2DATE function converts a date serial number to a formatted date string.

FSTAT Function
The FSTAT function now includes the full create date and update date. Both are in the form MMDDYYYY (note the 4-digit year).

INTEL and INTELD Functions
MTB includes two system-level functions named INTEL and INTELD. These functions were implemented in support of the MTB Windows Driver Library. They can be used in Data Division (with a constant numeric argument) and in the Procedure Division (with a constant or variable numeric argument).

BINARY Function
The BINARY function returns an 8-byte string representing the 8 bits in a byte.

Not Supported in Comet98
Comet98 does not support the enhanced character set. As a result, the following video mnemonics are also not supported beyond Comet 504:

(Enhanced Characters On)
(Enhanced Characters Off)
(Check Box On)
(Check Box Off)
(Close Icon)
(Radio Button On)
(Radio Button Off)

Added New Control for Reading Tab-delimited Text Files
In Comet 504.244/Comet98 Build 244, added a control to Comet to allow tab characters to be passed through to an MTB program reading a text file. Previously, if an MTB program read a text file that contained tab-delimited fields, the tab characters ("@09@") were converted to blanks ("@20@"). The following control was added

The new control is:

FILE (lun) CTL="@01@"

where lun = the logical unit number of the text file being read

Changed Printer Type in DSTAT
In release 504.249 and 505.249, changed the printer type in the DSTAT function to more accurately reflect the printer type.