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
- New or enhanced KEXX instructions include SELECT,
SIGNAL label, SIGNAL ON|OFF condition, CALL ON|OFF condition,
and PROCEDURE EXPOSE.
- In previous versions of KEXX, instructions processed by
INTERPRET could not CALL internal routines or invoke internal routines
as functions. This limitation has been removed.
Built-in functions
- The REXX functions B2X(), CONDITION(), ERRORTEXT(),
SOURCELINE(), SYMBOL(), TRACE(), VALUE(), and X2B() are now supported.
- The new COUNTSTR() function counts the number of occurrences
of one string in another, and the CHANGESTR() function lets you replace
these occurrences with a different string.
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
- The default Alt+X key assignment has been enhanced. When
you are working with a file other than a DIR.DIR file, Alt+X will
now edit the file named at the cursor position. For example, if you
are editing a C program with the line
#include <local.h>
you can now place the cursor on ``local.h'' and press
Alt+X to edit that file.
- Toolbar buttons are now grayed out when they are unavailable.
Also, minor changes have been made to the look of the toolbar, and
a few of the buttons have been changed to be more consistent with
Microsoft's current recommendations.
- Clipboard support has been enhanced. You can now query and
set the contents of the clipboard from within a macro, and you can
append text to the existing clipboard contents. Also, if the cursor
is on the command line and there is no command line selection, you
can now Cut or Copy from a marked block in the current file, and do
not first need to move the cursor to the file area.
- New LINE and COLUMN initialization options let you control
your initial location in a newly-loaded file; this previously required
some fancy footwork in your profile.
- SET PATH and SET MACROPATH still let you specify an environment
variable with a list of directories to search for files to be edited
or macros to be run, but you can now also specify a list of directories
directly. This makes it possible to dynamically change the list of
directories to search. It can also eliminate KEDIT's dependence on
environment variables, which is desirable because their values cannot
be conveniently changed while Windows is active.
- The default for SET PATH is now *PATH;*INCLUDE;=, which
means that, during searches for files to be edited, KEDIT will look
in the directories listed in your PATH environment variable, the directories
listed in your INCLUDE environment variable, and in the directory
of the current file. This automatic search of the directory of the
current file is often quite useful.
- SET AUTOEXIT ON tells KEDIT for Windows to end your editing
session automatically when the last file is removed from the ring,
just as text mode KEDIT does. With the default of AUTOEXIT OFF, your
editing session continues even if all files have been removed from
the ring; this gives you the option of selecting other files to edit
or using File Exit to end the session.
- All commands that operate on box blocks will now also operate
on one-line stream blocks, treating them as if they were box blocks.
For example, you can now LEFTADJUST the text within a one-line stream
block.
- The FILLBOX command, now known as the FILL command, will
operate on line and stream blocks as well as on box blocks, and the
OVERLAYBOX command will operate on line blocks and one-line stream
blocks as well as on box blocks.
- KEDIT can now be invoked by the Windows shell to print
files whose extensions have been associated with KEDIT. The profile
used to print a file is controlled by the new SET PRINTPROFILE command.
- The POPUP command, which in the past always placed the pop-up
menu at the mouse cursor location, can now be told to position the
pop-up menu at the text cursor location, or near the center of KEDIT's
frame window.
- EXTRACT /TARGET/, EXTRACT /BLOCK/, EXTRACT /FIELD/, and
EXTRACT /FILESTATUS/ have been enhanced to return additional useful
information to a macro. EXTRACT /FILESEARCH/ has been added.
- SET TABS INCR n has been enhanced to extend tab columns
all the way to the current WIDTH setting; in the past at most 32 tab
columns could be in effect. INCR can also now be used following a
list of specific tab columns. For example, to set tabs in columns
10 and 20 and every 5 columns thereafter:
SET TABS 10 20 INCR 5
- Prefix commands to uppercase (U, UU) and lowercase (L, LL)
text have been added.
- With SET FORMAT EXTENDED in effect, KEDIT now treats lines
with less than (``<'', used with HTML tags) or greater than (``>'',
used to quote text in e-mail messages) in column 1 as the start of
a new paragraph.
- The COUNT command, when issued from a macro, now returns
the number of occurrences counted in the macro variable COUNT.1 and
the number of lines containing at least one occurrence in COUNT.2.
Similar changes have been made to the CHANGE, SCHANGE, and ALTER commands.
- A few additional keys can now be defined, including the
Application key found on some recent Windows-specific keyboards, along
with some additional Ctrl+ combinations like Ctrl+; and Ctrl+Star.
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:
- Some of the details of which SET ECOLOR values control which
type of syntax coloring have changed. For example, ECOLOR G is used
with incomplete quoted strings in KEDIT for Windows 1.0, while in
KEDIT for Windows 1.5, ECOLOR S is used instead. If you have made
changes to the default ECOLOR settings, you may need to make adjustments
to account for the differences.
- EXTRACT /TABS/ used to return the actual tab columns in
TABS.1. It now returns the SET TABS value which may be, for example
``INCR 8'', in TABS.1 and returns the actual tab columns in TABS.2.
- In KEDIT for Windows 1.0, READV CMDLINE, PULL, and PARSE
PULL caused KEDIT to display a dialog box with an edit field to be
used for data entry. In KEDIT for Windows 1.5, READV CMDLINE, PULL,
and PARSE PULL instead read a line of input from the KEDIT command
line. You can use the new READV EDITFIELD command in KEDIT for Windows
1.5 if you want to read from a dialog box edit field instead of from
the command line.
- In KEDIT for Windows 1.0, the PUT and PUTD commands left
the last line written to disk as the focus line if STAY OFF was in
effect. In KEDIT for Windows 1.5, PUT and PUTD with STAY OFF in effect
instead make the line after the last line written to disk become the
focus line.
- 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
'1101 1100'b
This means that quoted strings in KEXX macros can no
longer be immediately followed by a variable named B, since KEXX will
interpret this as an attempt to use a binary string. (Because of KEXX's
existing support of hexadecimal strings, a similar restriction already
existed on variables named X. Note that no variables other than B
and X are affected by this special handling.) For example,
b = 12
say 'Twelve'b
would previously have displayed ``Twelve12'', but will
now give an error referring to an invalid binary string. It should
be rewritten as
b = 12
say 'Twelve'||b
- See the following section for information about how KEDIT's
fileid handling is affected by the long filename support available
in the 32-bit version of KEDIT.
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.