New Features

This chapter gives an overview of KEDIT for Windows version 1.5, and has enough information to get you started immediately with most of KEDIT's new features. After you've gotten some practical experience using KEDIT for Windows 1.5, you can review the more detailed reference information covered in the remaining chapters of this Upgrade Guide.

Windows 95/98/NT/2000/Me/XP 32-Bit Support

KEDIT for Windows now includes both a 16-bit Windows 3.1 module and a 32-bit Windows 95/98/NT/2000/Me/XP module. Most of the enhancements in KEDIT for Windows 1.5 are available in both versions of the program, but the following features are specific to the 32-bit version:

Long filenames

The 32-bit module supports the long filenames available under Windows 95/98/NT/2000/Me/XP.

You can access long filenames via File Open and related dialog boxes, in commands entered from KEDIT's command line, and in commands issued from KEDIT macros. Mixed case filenames are supported, as well as filenames containing blanks. Note that filenames containing blanks must be enclosed in double quotes when entered from the KEDIT command line.

To allow for longer file names and file extensions, the DIR command now sets aside 30 columns to display file names and 10 columns for file extensions; you can control this via the SET DIRFORMAT command.

For more information about KEDIT's support for long filenames see Section 3.7, ``Notes on Long Filenames''.

Improved performance

The 32-bit module offers better performance than the 16-bit module. Most things are already fast enough that performance is not an issue, but when working with large files and when processing long running macros, the 32-bit module can be up to 30% faster than the 16-bit module.

Increased limits

Several of KEDIT's internal limits have been increased in the 32-bit module. In particular, you can now have up to 100 files in the ring (the limit is 40 in the 16-bit version of KEDIT) and the maximum WIDTH value (which determines the length of the longest line that you can edit) has increased from 4096 to 32000.

Improved appearance

Several changes have been made to make KEDIT for Windows 1.5 fit in with the look of Windows 95/98/NT/2000/Me/XP. For example, KEDIT now uses the new Explorer-style File Open dialog box, the toolbar and the status line now adapt to changes in the your Windows color scheme, and the details of KEDIT's toolbar icons and window borders are consistent with Microsoft's Windows 95 guidelines.

UNC Filename Support

UNC (Universal Naming Convention) names are supported in both the 16- and 32-bit versions of KEDIT for Windows. This means that you can access files on network servers by using names like \\SERVER2\DISKC\ABC.TXT.

Syntax Coloring Enhancements

KEDIT's syntax coloring facility highlights different types of text within a file, such as keywords, quoted strings, and comments. This makes it easier, for example, to tell which text is part of a comment, and to tell whether a string is properly quoted.

Syntax coloring was one of the most popular features of KEDIT for Windows 1.0 and it has been significantly improved in KEDIT for Windows 1.5. Support for a number of additional languages is now built into KEDIT. In addition, syntax coloring is now user configurable, so that you can add new keywords for existing languages, and add support for new languages.

Built-in Language Support

In KEDIT for Windows 1.0, syntax coloring was only available for C programs and REXX programs. KEDIT for Windows 1.5 adds built-in support for HTML, Java, COBOL, FORTRAN, BASIC, Pascal, and dBase, and for Windows Resource files and .INI files.

Syntax coloring is now applied by default to files with the following extensions:

Extension Parser Description
.BAS BASIC BASIC language
.FRM BASIC Used with Visual BASIC
.C C C/C++ language
.COB COBOL COBOL language
.COBOL COBOL COBOL language
.CBL COBOL COBOL language
.CPP C C/C++ language
.CXX C C/C++ language
.DLG RESOURCE Windows Resource file
.FOR FORTRAN FORTRAN language
.FORTRAN FORTRAN FORTRAN language
.F90 FORTRAN FORTRAN language
.F FORTRAN FORTRAN language
.H C C/C++ language
.HPP C C/C++ language
.HXX C C/C++ language
.HTM HTML HyperText Markup Language
.HTML HTML HyperText Markup Language
.INI INIT INI file
.JAV JAVA Java language
.JAVA JAVA Java language
.KEX REXX REXX/KEXX language
.KLD KLD KEDIT Language Definition file
.KML REXX REXX/KEXX language
.PAS PASCAL Pascal and Delphi language
.DPR PASCAL Delphi Project file
.PRG XBASE dBase or similar language
.RC RESOURCE Windows Resource file
.REX REXX REXX/KEXX language

Nesting

One unique aspect of the syntax coloring facility is its ability to handle nested parentheses and similar items. For example, in a statement like
x = (b + (c * (d + 2)))
there are three levels of parentheses, and each level is displayed in a different color. This makes it easier to understand the logic of an expression, and easier to see if the parentheses are not properly matched.

In C and C++ programs, syntax coloring also uses different colors for nested braces and for nested preprocessor commands like #ifdef and #endif. Nested control structures in languages like REXX are also highlighted. For example, in a REXX program like the following:

do i = 1 to 10
    do j = 1 to 10
       say i + j
    end
end
The outer DO -- END pair would be displayed in a different color from the inner DO -- END pair.

A related command that can be very useful is the CMATCH command, which is assigned by default to Shift+F3. You can use Shift+F3 to move the cursor between matching items, like matching parentheses, and matching DO -- END pairs.

Accuracy

It is important to understand that the parsers that handle syntax coloring are not as complete as the parsers built into a typical compiler. Syntax coloring operates very quickly, processing text in a fairly simple-minded way, without building symbol tables, processing header files, or checking for errors in your text. The goal is to be as efficient as possible, handling all normal situations correctly, but accepting that in some unusual cases, especially in files that contain syntax errors, text may be colored incorrectly.

Controlling Syntax Coloring

KEDIT's syntax coloring facility is user configurable. The details of each language are specified in KEDIT Language Definition files that you can change by, for example, adding your own keywords. You can also develop your own KEDIT Language Definition files to support additional languages. These files are discussed in detail in Chapter 8, ``KEDIT Language Definition Files''.

The following commands are used to control the syntax coloring facility:


Macro Language Enhancements

Several enhancements have been made to the KEXX macro language. The changes are summarized here, with more details given in Chapter 7, ``Macro Language Changes''.

Instructions

Built-in functions

External routines

KEXX now supports calls to external routines. That is, with the CALL instruction and with function invocations, you can call a separate KEXX macro as a subroutine. In the past, you could only invoke separate KEXX macros via the MACRO instruction, but this method provided no convenient way to return a result string from the external macro to the calling macro.

Binary strings

KEXX now supports binary strings, specified as a series of binary digits (that is, 0 or 1) followed by an uppercase or lowercase B, for example
'11011'b

Other New Features


Incompatibilities with KEDIT for Windows 1.0

Here is a list of the known incompatibilities between KEDIT for Windows 1.0 and KEDIT for Windows 1.5. All of the differences are minor, and will have no practical effects on most users:

Notes on Long Filenames

Here are some details about the support provided by the 32-bit version of KEDIT for long filenames. Long filenames are available under Windows 95/98/NT/200/Me, but are not available under Windows 3.1 and are not supported by the 16-bit version of KEDIT.
KEDIT Home Page
KEDIT Overview | Download Libraries | Maintenance Releases
Ordering/Licensing | Demo Version | Technical Support | What's New
KEDIT for Windows 1.6.1 Upgrade | KEDIT Mailing List

Copyright © 1996-2012 Mansfield Software Group, Inc.