Command and SET Option Changes

This chapter summarizes the changes made in KEDIT for Windows to KEDIT's commands, SET options, and related items. Most of the chapter focuses on the changes that affect users of KEDIT 5.0. The last section of the chapter, Section 5.7, ``Additional Changes for KEDIT 4.0 Users'', summarizes the additional changes that KEDIT 4.0 users, who are not familiar with all of the commands in KEDIT 5.0, will notice.

New and Changed Commands

Commands Changed

CHANGE

Change /string1/string2/ [target [n [m]]
The CHANGE command, when issued from a macro, sets the macro variable CHANGE.0 to 3, returns the number of occurrences changed in CHANGE.1, returns the number of lines changed in CHANGE.2, and returns the number of lines truncated in CHANGE.3. SCHANGE, ALTER, and COUNT return similar information.

CHDIR

CHDIR [d:]path
When you specify both a drive and directory for the CHDIR command, text mode KEDIT makes the specified directory become the current directory for the specified drive, but does not make that drive become the current drive. KEDIT for Windows does make the specified drive become the current drive, because this is most often what you intended.

You can now also use ``CHDIR ='', which is handled as a special case. It makes the drive and directory of the current file become the current drive and directory.

CMATCH

CMATCH [OUTER|INNER]
The CMATCH command, assigned by default to Shift+F3, is used to move the cursor to a matching parenthesis or brace. It has been enhanced so that, when KEDIT's syntax coloring facility is active, it properly accounts for parentheses and braces within quoted strings and comments, and so that it can handle matching keywords like the DO -- END pairs found in KEXX macros.

DIALOG

DIALOG /prompt/ [options]
The DIALOG command's dialog boxes are now displayed as standard Windows dialog boxes.

New options supported by DIALOG include ICONEXCLAMATION, ICONINFORMATION, ICONQUESTION, and ICONSTOP, which determine the icon that appears in the dialog box. By default, if the YESNO or YESNOCANCEL options are used, a question mark icon is displayed. Otherwise, the default action is to display no icon.

Also available is the FIXEDFONT option, which causes KEDIT to use a fixed-pitch font rather than the default proportional font for the dialog box. FIXEDFONT is useful if there are multiple lines of text in the prompt and you want certain columns of the text to line up.

Similar changes have also been made to the ALERT command.

DOS

DOS [command]
DOSNOWAIT command
DOSQUIET command
The DOS, DOSNOWAIT, and DOSQUIET commands work in KEDIT for Windows by creating a separate MS-DOS window to run your DOS commands. Note that changes made to the current directory of that MS-DOS window do not affect KEDIT's current directory.

HELP

HELP [topic]
The HELP command in KEDIT for Windows accesses a standard Windows Help file. The separate KHELP utility provided with text mode KEDIT is not used with KEDIT for Windows.

KEDIT

Kedit [fileid ...] [(options [)]]
You can now specify multiple fileids on the KEDIT command line, and you can use wildcard characters when you specify them. For example, the following are now legal KEDIT commands:
KEDIT ABC.TXT DEF.TXT GHI.TXT
KEDIT *.H
KEDIT *.TXT \TEMP\TEST.KEX FILE1.C (NOPROFILE
Note that since KEDIT loads all of the files you are editing into memory, loading a large number of files can be time consuming and may use up a significant amount of memory. You are limited to a maximum of 40 files in the ring in the 16-bit version of KEDIT for Windows and 100 files in the ring in the 32-bit version of KEDIT for Windows.

KHELP

KHELP [topic]
The KHELP command is equivalent to the HELP command and, like the HELP command, now accesses a standard Windows Help file. The separate KHELP utility provided with text mode KEDIT is not used with KEDIT for Windows.

MARK

MARK Line|Box|Stream [PERSISTent|SELection]
     [Anchor|Word] [RESET]
MARK CMDline [SELection] Anchor|Word [RESET]
MARK Line [PERSISTent|SELection] [Anchor] ALL
MARK REANCHOR line [col]
Several new operands have been added to the MARK command in KEDIT for Windows to support marking selections.

READV

READV Cmdline [initial]
READV EDITfield [initial]
READV KEY [Ignoremouse|NOIgnoremouse]
READV EDITFIELD is new. It displays a dialog box and reads a line of input from an edit field within the dialog box.

READV KEY no longer returns extended shift status information in READV.5; READV.4 is now the last variable set by READV KEY.

READV KEY reports 56 (the scan code of the Alt key) as the scan code for text entered via Alt key+Numeric pad; in text mode KEDIT the scan code is reported as 0.

SORT

SORT target [[Ascending|Descending] n1 m1] ...
The DOS version of KEDIT has a 10,000 line limit on the number of lines that can be sorted. This limit has been removed in KEDIT for Windows; the number of lines that you can sort is limited only by available virtual memory. Note, however, that sort performance can degrade significantly if the data to be sorted will not fit within your machine's physical memory and must be paged to and from disk by Windows.

SOS

SOS action1 [action2 ...]
The following new SOS actions, documented in the Reference Manual, have been added: SOS DELSEL, SOS QUICKFINDACT, SOS QUICKFINDB, and SOS QUICKFINDF.

STATUS

STATUS
The STATUS command now leads to the display of a dialog box giving the status of most SET options. Using the STATUS command is equivalent to using the Options Status dialog box.

XEDIT

Xedit [fileid ...] [(options [)]]
The XEDIT command performs exactly the same functions as the KEDIT command and, like the KEDIT command, now lets you specify multiple files at a time.

Commands Added

ANSITOOEM

ANSITOOEM [target]
Use the ANSITOOEM command to convert text in a specified portion of your file from the OEM character set to the ANSI character set.

CLIPBOARD

CLIPboard COPY|CUT|PASTE
CLIPboard APPEND CUT|COPY
CLIPboard PUT text
CLIPboard APPEND PUT text
CLIPboard CLEAR
The CLIPBOARD command moves data to or from the Windows clipboard. It is used mainly in the macros that handle the clipboard-related items on the Edit menu, and in their toolbar and keyboard equivalents.

EXTEND

EXTEND command
EXTEND is a specialized command used mainly in the macros assigned to Shift+cursor-pad-keys that let you extend selections when INTERFACE CUA is in effect.

The EXTEND command extends the selection from its current anchor point (or, if there is no current selection, from the cursor position) to a new location. To determine the new location, KEDIT executes the command; the selection is extended to the position occupied by the cursor after the command completes.

INIUTIL

INIUTIL SAVE|CLEAR STATE|HISTory|SETTINGS
INIUTIL SAVE SET option
INIUTIL CONVERT SETTINGS
Use the INIUTIL command to help manage the contents of KEDIT's INI file, KEDITW.INI. Most KEDIT users will not need to use the INIUTIL command, since KEDITW.INI is normally updated automatically by KEDIT at the appropriate times.

MERGE

MErge target1 target2 [col]
The MERGE command takes one group of lines, from the focus line up to (but not including) the line specified by target1, and merges it with another group of lines, beginning at the line specified by target2. See the Reference Manual for full details about the MERGE command.

OEMTOANSI

OEMTOANSI [target]
Use the OEMTOANSI command to convert text in a specified portion of your file from the OEM character set to the ANSI character set.

POPUP

POPUP [MOUSE|TEXT|CENTER] /item1/[item2/item3/...]
Use the POPUP command from within a macro, normally a macro associated with a mouse action, to display a pop-up menu to the user of the macro. The user of the macro then uses the mouse or keyboard to make a choice from the menu, and this choice is returned to your macro.

SHOWDLG

SHOWDLG dialog
The SHOWDLG command displays and processes one of KEDIT for Windows' built-in dialog boxes. It is used mainly by the menu-handling macros that are activated when you select an item from one of KEDIT's menus.

WINDOW

WINdow MINimize|MAXimize|RESTORE [DOCument|FRAME]
WINdow CASCADE
WINdow TILE [Horizontally|Vertically]
WINdow CLOSE [DOCument|FRAME|FILE]
WINdow NEWwindow
WINdow NEXTwindow|PREVwindow
WINdow ARRANGEIcons
WINdow MENUmode [menuname]
The WINDOW command performs assorted operations related to the sizing and positioning of KEDIT's frame window or of your document windows. The WINDOW command is most often used in macros and is not usually issued directly from the command line. For example, the macro that handles the Window Cascade menu item issues the WINDOWCASCADE command to tell KEDIT to cascade your document windows.

WINEXEC

WINEXEC [WAIT|NOWAIT] [NORMal|MAXimize|MINimize] command
Use the WINEXEC command to run an external Windows program. WINEXEC can also run DOS programs, but DOS programs are usually run via DOS, DOSNOWAIT, or DOSQUIET, which can only run DOS programs and cannot run Windows programs.

WINHELP

WINHELP fileid [topic]
Use the WINHELP command to invoke the Windows Help program so that you can view a Windows Help file.

The WINHELP command is most often used to display Help files for programs other than KEDIT, since you can get to KEDIT's Help file by pressing F1, by using the Help menu, and by using the HELP command.

New Prefix Commands

New prefix area commands are available to uppercase or lowercase text:

U, nU, and UU uppercase one line, n lines, or a group of lines.

L, nL, and LL lowercase one line, n lines, or a group of lines.


New and Changed SET Options

SET Options Removed

The following SET options are supported in text mode KEDIT but are not used in KEDIT for Windows. Most of them involve some aspect of DOS, OS/2, or text mode display handling that is not relevant under Windows.

KEDIT gives you an error message if you enter SET, QUERY, or MODIFY commands for any of these unsupported options. To avoid problems with existing macros, macros can issue SET commands involving these options without causing errors; the SET commands yield non-zero return codes and are otherwise ignored. Similarly, macros can also use EXTRACT commands and implied EXTRACT functions involving these options; default results are returned and no errors are issued.

SET BLINK

[Set] BLINK ON|OFF
In text mode KEDIT, SET BLINK determines whether SET COLOR can be used to specify blinking text. Blinking text is not available under Windows, so SET BLINK is not supported by KEDIT for Windows.

SET BORDER

[Set] BORDer color
In text mode KEDIT, SET BORDER determines the color used in the border area at the outer edge of your display screen. Windows applications cannot use this border area, so SET BORDER is not supported by KEDIT for Windows.

SET
CURSORSHAPE

[Set] CURSORSHape AUTO
[Set] CURSORSHape USER over1 over2 ins1 ins2 [ON|OFF]
In text mode KEDIT, SET CURSORSHAPE controls the size and positioning of the cursor. In KEDIT for Windows, the cursor is instead controlled by SET CURSORSIZE and SET CURSORTYPE.

SET EAPRESERVE

[Set] EAPRESERVE ON|OFF|CRITICAL
SET EAPRESERVE is used in the OS/2 version of KEDIT to determine whether, when you edit a file that has OS/2 Extended Attributes, the Extended Attributes are preserved. Windows does not support Extended Attributes, so SET EAPRESERVE is not supported in KEDIT for Windows.

SET KEYBOARD

[Set] KEYBOARD Enhanced|Standard
SET KEYBOARD determines whether the DOS version of KEDIT accesses the keyboard with newer BIOS calls that support keyboards with 12 function keys, or with older BIOS calls that only support keyboards with 10 function keys. KEDIT for Windows uses Windows, and not BIOS calls, to access the keyboard, so SET KEYBOARD is no longer necessary.

SET LOGO

[Set] LOGO ON|OFF
In text mode KEDIT, SET LOGO determines whether KEDIT's copyright notice is displayed on the status line at the start of a KEDIT session. In KEDIT for Windows, this copyright notice is always displayed and SET LOGO is not used.

SET MOUSE

[Set] MOUSE ON|OFF HIDE|NOHIDE LEFT|RIGHT dblclk scroll
In text mode KEDIT, SET MOUSE determines whether KEDIT's mouse support is enabled, and controls various details of how the mouse operates. In KEDIT for Windows, mouse support is always enabled and you can use the Windows Control Panel to determine the details of how the mouse operates, so SET MOUSE is no longer needed.

SET MOUSEBAR

[Set] MOUSEBAR ON|OFF
The mousebar used in text mode KEDIT has been replaced in KEDIT for Windows by the toolbar, and SET MOUSEBAR is no longer used. Note that SET MOUSETEXT commands used to setup your own mousebar contents will still work in KEDIT for Windows if you use TOOLBAR ON BOTH to enable both the top and bottom toolbars.

SET PSCREEN

[Set] PSCREEN height [width] [RESET|PRESET]
SET PSCREEN is used in text mode KEDIT to determine the height and width of the text mode display. In KEDIT for Windows, all output is displayed within the frame window, and you can use the mouse to determine the size of the frame window and of your document windows.

SET RETRACE

[Set] RETRACE ON|OFF|BIOS
SET RETRACE controls the method used by the DOS version of KEDIT to update your display. SET RETRACE is not needed in KEDIT for Windows, because all screen updates are handled by Windows.

SET REXXIO

[Set] REXXIO ON|OFF
SET REXXIO determines how text mode KEDIT handles input and output from REXX macros. Since REXX macros are not supported in this version of KEDIT for Windows, SET REXXIO is not needed.

SET SHIFTSTATE

[Set] SHIFTSTATE ON|OFF
In text mode KEDIT, SET SHIFTSTATE determines whether KEDIT displays, on the status line, the status of Caps Lock, Numeric Lock, and Scroll Lock. This feature was a holdover from the days when most PC keyboards did not have indicator lights to display the same information, and is not available in KEDIT for Windows.

SET SWAP

[Set] SWAP ON|OFF
In the DOS version of KEDIT, SET SWAP determines whether KEDIT swaps itself out to EMS or XMS memory when shelling to DOS. SET SWAP is not needed in KEDIT for Windows, since Windows automatically swaps data to disk as necessary to make memory available for DOS sessions.

SET SYSRC

[Set] SYSRC n
In text mode KEDIT, SET SYSRC lets you set a return code that can be tested by a program or batch file that invoked KEDIT. Windows does not support this type of return code, so SET SYSRC is not available in KEDIT for Windows.

SET TOPVIEW

[Set] TOPVIEW ON|OFF
In the DOS version of KEDIT, SET TOPVIEW ON helps KEDIT run in a window under IBM's TOPVIEW and under compatible systems like Quarterdeck's DESQView. Since the special handling involved is not needed under Windows, SET TOPVIEW is not available in KEDIT for Windows.

SET Options Changed

SET ATTRIBUTES

[Set] ATTRibutes n1 [n2 ... n30]
For compatibility with text mode KEDIT, SET ATTRIBUTES is still available, but it is no longer documented in the Reference Manual because we recommend that you instead use the SET COLOR command. There are now 30 attribute values that you can set, up from 17 in KEDIT 4.0 and 26 in KEDIT 5.0. See the description of QUERY ATTRIBUTES in the Reference Manual for a list of the 30 different items involved.

SET BEEP

[Set] BEEP ON|OFF
KEDIT default: OFF

The frequency and duration operands supported in text mode KEDIT are not available in KEDIT for Windows, and if you specify them they are ignored. KEDIT now calls a standard routine within Windows whenever it needs to beep and does not access the speaker directly.

SET COLOR

[Set] COLOR field foreground [ON background]
[Set] COLOR field DEFAULT
The changes made to the SET COLOR command are described in Section 3.5, ``Colors''.

SET DIRFORMAT

[Set] DIRFORMat fname fext year
KEDIT default (32-bit): 30 10 2
KEDIT default (16-bit): 8 3 2

SET DIRFORMAT is not used in the DOS version of KEDIT, but in the OS/2 version of KEDIT its first two operands can be used to specify how much room to reserve for file names and for file extensions in DIR.DIR listings, and this is now available in KEDIT for Windows so that DIR.DIR files can display the long filenames supported by Windows 95/98/NT/2000/Me/XP.

The third operand of SET DIRFORMAT, which is new in KEDIT for Windows, determines the number of digits used to display the year in DIR.DIR files. It can be set to either 2 (the default, which yields two-digit years, such as 95 or 96, in DIR.DIR listings) or 4 (which yields four-digit years, such as 1995 or 2000).

SET DRAG

[Set] DRAG Box|Line|Stream [PERSISTent|SELection]
      [Anchor|Word] [RESET]
[Set] DRAG CMDline [SELection] [Anchor|Word] [RESET]
[Set] DRAG DRAGDROP
[Set] DRAG NONE
KEDIT default: NONE

SET DRAG is a specialized command, used only in the macros that process mouse clicks, to control what will happen when you drag the mouse after clicking a mouse button. New operands have been added in KEDIT for Windows so that the mouse can be used to mark both persistent blocks and selections, and can be used for drag-and-drop move and copy operations.

SET FCASE

[Set] FCASE ASIS|LOWER
(32-bit version only)

KEDIT Default: ASIS

SET FCASE is not used in the DOS version of KEDIT, but it is used in the OS/2 version of KEDIT to control the handling of mixed case fileids. SET FCASE is available in the 32-bit version of KEDIT for Windows because Windows 95/NT/98/2000/Me/XP also support mixed case fileids.

With the default of FCASE ASIS (``as is''), KEDIT displays filenames in the same case (upper, lower, or mixed) that the names have on disk, and creates new files using exactly the combination of upper- and lowercase characters that you specify.

With FCASE LOWER, KEDIT displays all filenames in lowercase in DIR.DIR files and on the ID line, and in uppercase on the title bar. New files are created with lowercase names, regardless of the case in which you enter the name.

SET FCASE is not available in the 16-bit version of KEDIT for Windows, which always behaves as if FCASE LOWER were in effect.

SET FORMAT

[Set] FORMAT Justify|NOJustify BLANK|EXTENded SIngle|DOuble
KEDIT Default: NOJUSTIFY BLANK DOUBLE

With FORMAT EXTENDED, lines that start with blanks, tab characters, periods, or colons are recognized as starting a new paragraph. KEDIT for Windows adds less than (``<'') characters to this list, to facilitate working with HTML files, and greater than (``>'') characters, to facilitate working with quoted text within e-mail messages.

SET IDLINE

[Set] IDline ON|OFF
KEDIT default: OFF

The default has changed from IDLINE ON in text mode KEDIT to IDLINE OFF in KEDIT for Windows.

The ID line is not needed in KEDIT for Windows because the document window's title bar displays the name of the file that you are editing, and all the rest of the ID line's information is included on the status line.

SET MACROPATH

[Set] MACROPath ON|OFF|envvar|dirlist
KEDIT Default: PATH

SET MACROPATH ON, SET MACROPATH OFF, and SET MACROPATH envvar work the same as in text mode KEDIT.

SET MACROPATH dirlist
Dirlist is a string with a list of semi-colon-delimited directories. It can also contain entries that begin with an asterisk, to indicate an indirect reference to an environment variable. An equal sign (``='') is also allowed, meaning search the directory of the current file. For example,
SET MACROPATH C:\TEMP;E:\SOURCE;*INCLUDE;=
means search the C:\TEMP and E:\SOURCE directories, then the directories listed in the INCLUDE environment variable, and then the directory of the current file. (The current working directory is still searched first, and after the directories specified by SET MACROPATH have been searched, KEDIT for Windows also searches the directory KEDIT was loaded from and its USER and SAMPLES subdirectories.)

SET MONITOR

[Set] MONitor WINDOWS|COLOR|MONO
KEDIT default: WINDOWS

As discussed in Section 3.5, ``Colors'', when the default of MONITOR WINDOWS is in effect, colors are handled differently in KEDIT for Windows than they are in text mode KEDIT. For example, KEDIT for Windows' default color scheme uses black text on a white background, while text mode KEDIT's default color scheme uses white text on a blue background. And KEDIT for Windows does not use different colors to highlight the current line, as text mode KEDIT does, but instead highlights the current line by drawing a box around it.

For compatibility with text mode KEDIT, MONITOR COLOR and MONITOR MONO are also available, although their use is not recommended. They make SET COLOR work much as it did in text mode KEDIT on a color monitor or on the original IBM monochrome monitor.

SET MOUSEBEEP

[Set] MOUSEBEEP ON|OFF
KEDIT default: ON

The frequency and duration operands supported in text mode KEDIT are not available in KEDIT for Windows, and if you specify them they are ignored. KEDIT now calls a standard routine within Windows whenever it needs to beep and does not access the speaker directly.

SET MSGLINE

[Set] MSGLine ON line [n] [Overlay]
KEDIT default: ON 1 5 OVERLAY

In KEDIT for Windows, error messages, responses to QUERY commands, etc. normally show up in the first line of a document window. Messages displayed by text mode KEDIT normally show up in the second line of a window (that is, the default in text mode KEDIT is MSGLINE ON 2 5 OVERLAY).

The difference comes about because in text mode KEDIT the first line of a window is normally occupied by the ID line, and it is useful to have both the ID line and any messages visible at the same time, so messages appear on the second line of a window. In KEDIT for Windows, the ID line is normally not displayed, since the information involved is displayed in the document window title bar and on the status line, and the first line of the window is therefore available for messages.

SET PATH

[Set] PATH ON|OFF|envvar|dirlist
KEDIT Default: *PATH;*INCLUDE;=

See SET MACROPATH, above, for a description of the path searching enhancements in this version of KEDIT.

The default value for the PATH setting has changed in KEDIT for Windows to take advantage of these enhancements, and when searching for a file KEDIT now looks in the directories specified by the PATH environment variable, in the directories specified by the INCLUDE environment variable, and in the directory of the current file.

SET PRINTER

[Set] PRINTER WINdows|device CLOSE|NOCLOSE FORM|NOFORM
      CONVert|NOCONVert
KEDIT default: WINDOWS CLOSE FORM CONVERT

In text mode KEDIT, SET PRINTER required that you specify a particular device, such as LPT1:, for your printer output. In KEDIT for Windows, you can use SET PRINTER WINDOWS to specify that printer output should be handled by Windows; you can then use File Print Setup to select the specific Windows printer that you want to use.

SET PRINTER WINDOWS is the default, and is recommended in most situations. The main reason for using PRINTER LPT1, PRINTER LPT2, etc. to bypass the Windows print handling would be that you have files that contain device-dependent printer escape codes, which are not handled properly by the device-independent printer handling used when PRINTER WINDOWS is in effect.

Three new operands have been added to SET PRINTER:

  • CLOSE|NOCLOSE determines whether the printer is automatically closed after each use of the PRINT command. By default, KEDIT now closes the printer whenever you use the PRINT command. This is almost always desirable behavior; the exception comes when you want to use multiple PRINT commands for several smaller amounts of data that you would like to print together as a unit. This can be handled by putting SET PRINTER's NOCLOSE option into effect, issuing the PRINT commands for your data, and then issuing the PRINT CLOSE command when you are ready to close the printer.

  • The FORM|NOFORM option controls whether, when KEDIT is printing to a device (that is, when PRINTER LPT1, etc. is in effect), KEDIT automatically sends a formfeed character, forcing a page eject, whenever the printer is closed. With the default of FORM, KEDIT does send a formfeed character. With NOFORM, formfeed characters are not automatically sent; if you are using a spooler or network printer, your system may automatically eject the page anyway, or you may need to use the Eject or Form Feed button on your printer.

  • CONVERT|NOCONVERT affects conversions between the OEM and ANSI character sets. Files that you edit with KEDIT are normally displayed using either the ANSI or the OEM character set. Similarly, your printer is normally setup to print text in the ANSI character set or in the OEM character set. Incorrect output can be generated if the character set used by your file does not match the character set used by your printer. With SET PRINTER's CONVERT option, which is the default, KEDIT attempts to compensate for this by automatically converting the data that it sends to your printer from OEM to ANSI if you are using an OEM character set for your file and an ANSI character set for your printer. Similarly, KEDIT converts from ANSI to OEM during printing if you are using an ANSI font for your file and an OEM font for your printer, or if you are using an ANSI font for your file and PRINTER WINDOWS is not in effect (since in most cases the default fonts built into printers use the OEM character set). Use the NOCONVERT option to prevent this conversion from taking place.

SET SCREEN

[Set] SCReen n [Horizontal|Vertical]
[Set] SCReen m Split
SET SCREEN is provided mainly for compatibility with the text mode version of KEDIT, which only supports tiled windows. SET SCREEN works only when OFPW (``One File Per Window'') OFF is in effect, since OFPW OFF makes KEDIT for Windows use the same rules for placing files in document windows that text mode KEDIT does. One form of the SET SCREEN command, SET SCREEN SIZE, is no longer supported at all.

OFPW ON is the default, and is recommended for most KEDIT for Windows users because it makes KEDIT's window handling more consistent with that of other Windows MDI (Multiple Document Interface) applications. When OFPW ON is in effect, the SET SCREEN command is not available to you. The Window Tile and Window Cascade menu items, and the Window Arrange dialog box, provide useful alternative methods for arranging your document windows.

SET SCROLLBAR

[Set] SCROLLbar ON|OFF [Vertical|Horizontal|BOTH]
KEDIT default: ON BOTH

The default for SET SCROLLBAR has changed in KEDIT for Windows; scroll bars are off by default in text mode KEDIT but are on by default in KEDIT for Windows. Also, SET SCROLLBAR is at the Global level in text mode KEDIT, and affects all views of all files, while in KEDIT for Windows SET SCROLLBAR is at the view level, and affects only the current view of the current file.

SET STATUSLINE

[Set] STATUSLine ON|OFF
KEDIT default: ON

In KEDIT for Windows, the status line can only appear at the bottom of the frame window. In text mode KEDIT, SET STATUSLINE has a second operand that lets you specify whether the status line should appear at the top or the bottom of the screen; this operand is ignored in KEDIT for Windows.

SET TABS

[Set] TABs n1 n2 ...
[Set] TABs INCR n
[Set] TABs n1 n2 ... INCR n
KEDIT Default: INCR 8

The changes in KEDIT for Windows are:

SET TABS INCR n

This has been enhanced to set tabs extending through the current WIDTH setting. In the past, SET TABS INCR would set a maximum of 32 tab columns.

SET TABS n1 n2 ... INCR n

This is a new form of the SET TABS command. You can give a list of tab columns and then specify that tabs will be set every n columns thereafter.

SET Options Added

SET AUTOCOLOR

[Set] AUTOCOLOR .ext parser
Use SET AUTOCOLOR to determine the syntax coloring parser used for files with a specified extension.

When the default of COLORING ON AUTO is in effect for a file, KEDIT decides which parser to use for that file by examining the file's extension. If SET AUTOCOLOR has been used to specify a parser for that extension, KEDIT uses that parser to control syntax coloring for the file. The NULL parser, which does no syntax coloring, is used whenever a file has an extension for which no parser has been specified.

For example, the command

SET AUTOCOLOR .LNG LANG
tells KEDIT to use a parser called LANG for files with an extension of .LNG. Parsers referred to in SET AUTOCOLOR commands must already be defined, either by being built into KEDIT or via the SET PARSER command.

SET AUTOEXIT

[Set] AUTOEXIT ON|OFF
KEDIT Default: OFF

With the default of AUTOEXIT OFF, KEDIT keeps running even if there are no files in the ring and all of its document windows have been closed. You can then begin editing other files, or you can use File Exit to close KEDIT's frame window and end your editing session.

With AUTOEXIT ON, your editing session ends whenever the last file is removed from the ring. Some KEDIT users prefer this behavior, because it is more like the behavior of text mode KEDIT and because it saves the extra step of closing KEDIT's frame window to exit KEDIT after closing the last file in the ring.

SET AUTOINDENT

[Set] AUTOIndent ON|OFF
KEDIT default: OFF

SET AUTOINDENT controls where the default F2 and (if INTERFACE CUA is in effect) Enter key definitions position the cursor after adding a new line.

With the default of AUTOINDENT OFF, the cursor is positioned in the left margin column of the new line, as in text mode KEDIT.

With AUTOINDENT ON, the cursor is lined up with the first character of the line above the new line. This useful when working with programming languages like C, where you often want to indent a new line to the same level as the line above it.

SET BOUNDMARK

[Set] BOUNDMark Zone|TRunc|MARgins|TABs|Verify|WINMARgin
[Set] BOUNDMark OFF
KEDIT default: ZONE TRUNC

SET BOUNDMARK (``boundary mark'') controls whether vertical lines are drawn on your screen at the boundaries of your ZONE, TRUNC, MARGINS, TABS, and/or VERIFY columns, and at the right edge of the WINMARGIN area.

SET COLMARK

[Set] COLMark n1 [n2 n3 ...]
[Set] COLMARK OFF
KEDIT default: OFF

SET COLMARK (``column mark'') controls whether vertical lines are drawn to indicate specific column locations in your file.

For example, if you put COLMARK81 into effect, KEDIT will draw a vertical line to the left of column 81 of each line of your file. This can be very useful, since on many displays you can have document windows wider than 80 columns and you can mistakenly enter more text on a line than you intend to.

SET COLORING

[Set] COLORING ON|OFF AUTO|parser
KEDIT default: ON AUTO

Use SET COLORING to enable or disable KEDIT's syntax coloring facility and to determine which parser KEDIT will use to handle the syntax coloring for the current file.

With the default of COLORING ON AUTO, syntax coloring is enabled, and KEDIT uses the appropriate parser (determined by the SET AUTOCOLOR command) for the current file extension.

SET CURRBOX

[Set] CURRBox ON|OFF [ON|OFF]
KEDIT default: ON OFF

SET CURRBOX determines whether KEDIT draws a box around the current line to make that line stand out.

The first operand determines whether the box is drawn when the cursor is on the command line. The second operand determines whether the box is drawn when the cursor is in the file area. By default, the box is drawn when the cursor is on the command line but not when it is in the file area.

SET CURSORSIZE

[Set] CURSORSIze vovr vins hovr hins
KEDIT default: 10 25 15 30

SET CURSORSIZE controls the size of KEDIT's text cursor.

The first two operands control the size of the cursor when, as determined by SET CURSORTYPE, KEDIT is using a vertical cursor. The first operand controls the width of the Overtype Mode cursor and the second operand controls the width of the Insert Mode cursor; the values are expressed as a percentage of the width of a character in the current screen font.

The third and fourth operands control, respectively, the height of the Overtype Mode cursor and the height of the Insert Mode cursor when KEDIT is using a horizontal cursor. These values are expressed as a percentage of the height of a character in the current screen font.

SET CURSORTYPE

[Set] CURSORType Vertical|Horizontal|Interface
KEDIT default: INTERFACE

SET CURSORTYPE determines the shape of KEDIT's text cursor.

With CURSORTYPE VERTICAL, KEDIT uses a vertical cursor, displayed at the left of the current character.

With CURSORTYPE HORIZONTAL, KEDIT uses a horizontal cursor, displayed beneath the current character.

With the default of CURSORTYPE INTERFACE, the shape of KEDIT's cursor is dependent on the setting of the INTERFACE option. With INTERFACE CUA, KEDIT will use a vertical cursor; with INTERFACE CLASSIC, KEDIT will use a horizontal cursor.

SET DEFPROFILE

[Set] DEFPROFile fileid
KEDIT default: WINPROF.KEX

The new DEFPROFILE option lets you determine the name of the profile macro that KEDIT executes by default.

In text mode KEDIT, DEFPROFILE can only be specified as an initialization option at the start of a KEDIT session, and PROFILE.KEX is the default. In KEDIT for Windows, DEFPROFILE is also a SET option whose value can be changed during a KEDIT session, and the default is now WINPROF.KEX.

KEDIT runs your profile at the start of each editing session and, if REPROFILE ON is in effect, runs it again whenever a new file is added to the ring.

SET DOCSIZING

[Set] DOCSIZing Standard|EXTENded [n]
KEDIT default: EXTENDED 80

SET DOCSIZING determines the size of new document windows.

With DOCSIZING STANDARD, new non-maximized document windows, and windows resized by Window Cascade are given the same, relatively small, default size determined by Windows. With DOCSIZING EXTENDED, KEDIT tries to give all new or cascaded windows the same width (default is 80 columns) and makes them extend to the bottom of the frame window.

SET ECOLOR

[Set] ECOLOR a foreground [ON background]
[Set] ECOLOR a DEFAULT
SET ECOLOR (``emphasis color'') is a new option that controls the colors used by KEDIT's syntax coloring facility.

There are 35 different items, referred to by letters A through Z and the numbers 1 through 9, that you can control with SET ECOLOR. SET ECOLOR A determines the colors used to display comment lines, SET ECOLOR B determines the colors used to display quoted strings, etc. See the description of SET ECOLOR in the Reference Manual for a list of all 35 items. The colors involved are specified in the same way as they are for the SET COLOR command.

SET FILEOPEN

[Set] FILEOPEN SINGLE|MULTIPLE
KEDIT default: SINGLE

SET FILEOPEN determines whether the File Open dialog box lets you open a single file at a time or multiple files at a time. With FILEOPEN SINGLE, the File Open dialog box lets you open only a single file at a time. With FILEOPEN MULTIPLE, File Open lets you open several files at a time. FILEOPEN SINGLE is the default because FILEOPEN MULTIPLE is incompatible with some Windows add-ons, such as Norton Desktop for Windows' File Assist facility.

SET FILEOPEN is only useful with Windows 3.1 and Windows NT 3.51. With Windows 95/98/NT 4/2000/Me/XP, File Open always lets you open multiple files at a time.

SET INISAVE

[Set] INISAVE STATE|NOSTATE [HISTory|NOHISTory]
KEDIT default: STATE HISTORY

SET INISAVE controls which information KEDIT saves in its INI file, KEDITW.INI, at the end of a session. STATE|NOSTATE controls whether information about KEDIT's window sizes and positions, screen and printer fonts, etc. are saved. HISTORY|NOHISTORY controls whether KEDIT saves its lists of your recently-edited files, recent commands, recent search strings, etc.

SET INITIALDIR

[Set] INITIALDIR PRESERVE|RECALL [PRESERVE|RECALL|FIRSTFile]
KEDIT default: PRESERVE PRESERVE

SET INITIALDIR determines the current directory put into effect at the start of an editing session.

The first operand controls whether, when no fileid is specified at the start of a KEDIT session, KEDIT keeps the current directory established for it by Windows or switches to the current directory in effect at the end of the previous session. The second operand controls whether, when a fileid is specified at the start of a KEDIT session, KEDIT keeps the directory established by Windows, switches to the directory in effect at the end of the previous session, or switches to the directory of the first file added to the ring.

Changes to INITIALDIR are automatically saved in KEDIT's INI file and take effect the next time you run KEDIT.

SET
INITIALDOCSIZE

[Set] INITIALDOCsize MAXimized|NORMal|RECALL
KEDIT default: MAXIMIZED

SET INITIALDOCSIZE determines whether the initial document window created at the start of a KEDIT session is maximized, normal (i.e. non-maximized), or based on the state (maximized or non-maximized) of the last document window closed in the previous KEDIT session.

Changes to INITIALDOCSIZE are automatically saved in KEDIT's INI file and take effect the next time you run KEDIT.

SET
INITIALFRAMESIZE

[Set] INITIALFRAMEsize MAXimized|NORMal|RECALL
KEDIT default: RECALL

SET INITIALFRAMESIZE determines whether KEDIT's frame window is initially maximized, normal (i.e. non-maximized), or based on the state (maximized or non-maximized) in effect at the end of the previous KEDIT session.

Changes to INITIALFRAMESIZE are automatically saved in KEDIT's INI file and take effect the next time you run KEDIT.

SET
INITIALINSERT

[Set] INITIALINSert ON|OFF
KEDIT default: OFF

SET INITIALINSERT determines whether KEDIT starts out with Insert Mode in effect. With INITIALINSERT ON, KEDIT starts out in Insert Mode. With the default of INITIALINSERT OFF, KEDIT starts out in Overtype Mode.

Changes to INITIALINSERT are automatically saved in KEDIT's INI file and take effect the next time you run KEDIT.

SET INITIALWIDTH

[Set] INITIALWidth n
KEDIT default: 1024

SET INITIALWIDTH determines the WIDTH value put into effect at the start of a KEDIT session; it can be overridden by the WIDTH initialization option. The default is 1024 and the maximum is 4096.

Changes to INITIALWIDTH are automatically saved in KEDIT's INI file and take effect the next time you run KEDIT.

SET INSTANCE

[Set] INSTANCE SINGLE|MULTIPLE
KEDIT default: SINGLE

SET INSTANCE determines whether only a single instance of KEDIT for Windows can be active at a time, or if multiple instances can be active. With INSTANCE SINGLE, if KEDIT is already running when you try to re-invoke it, the existing instance becomes active, and any files involved (if, for example, KEDIT is re-invoked because you double-clicked in the File Manager on a file associated with KEDIT) are added to the ring. With INSTANCE MULTIPLE, a new instance of KEDIT begins execution.

Changes to INSTANCE are automatically saved in KEDIT's INI file and take effect the next time you try to run KEDIT.

SET INTERFACE

[Set] INTERFACE CUA|CLASSIC
KEDIT default: CUA

Use SET INTERFACE to control whether certain aspects of KEDIT for Windows' user interface work according to the CUA (``Common User Access'') conventions used by most other Windows applications, or whether they instead work according to the conventions used in the text mode version of KEDIT 5.0.

SET
INTERNATIONAL

[Set] INTERNATional CASE|NOCASE [SORT|NOSORT]
KEDIT default: NOCASE NOSORT

SET INTERNATIONAL controls some aspects of how KEDIT works with international characters:

  • INTERNATIONAL CASE|NOCASE affects how text in your files is handled by the UPPERCASE and LOWERCASE commands, and in case-insensitive target searches. When INTERNATIONAL NOCASE is in effect, only the 26 letters of the English alphabet are handled by the UPPERCASE and LOWERCASE commands, and given special handling in case-insensitive comparisons. When INTERNATIONAL CASE is in effect, KEDIT asks Windows which characters are alphabetic and how they are uppercased or lowercased, and handles the UPPERCASE and LOWERCASE commands and case-insensitive comparisons accordingly. This allows accented characters, etc. to be treated properly, according to rules determined by the Windows language drivers installed on your system.

  • With INTERNATIONAL NOSORT, the SORT command does no special handling of international characters. If SET CASE's first IGNORE|RESPECT operand is set to RESPECT, all characters are sorted according to the value of their character code. If it is set to IGNORE, the same is true except that the 26 uppercase alphabetic characters sort as if they were lowercase. With INTERNATIONAL SORT, the SORT command asks Windows for the sort order to use. If SET CASE's first IGNORE|RESPECT operand is set to RESPECT, text is sorted in the order determined by your Windows language drivers. If it is set to IGNORE, the same is true except that comparisons between uppercase and lowercase characters are case-insensitive.

SET KEYSTYLE

[Set] KEYSTYLE enter [home delete backspace alt]
KEDIT default: STANDARD STANDARD STANDARD STANDARD STANDARD

SET KEYSTYLE determines whether, when INTERFACE CUA is in effect, the Enter, Home, Delete, Backspace, and Alt keys, have their standard CUA behavior, or (if ADJUSTED is specified) behave more like they did in text mode KEDIT. SET KEYSTYLE is most often controlled by using the keyboard-related items in the Options Interface dialog box.

SET MARKSTYLE

[Set] MARKSTYLE line [box stream]
KEDIT default: SELECTION SELECTION SELECTION

SET MARKSTYLE determines whether, when INTERFACE CUA is in effect, Ctrl+Button 1 marks line selections or (if PERSISTENT is specified) persistent line blocks, whether Alt+Button 1 marks box selections or persistent box blocks, and whether Button 1 marks stream selections or persistent stream blocks. SET MARKSTYLE is most often controlled by using the mouse-related items in the Options Interface dialog box.

SET NOVALUE

[Set] NOVALUE ON|OFF
KEDIT default: OFF

SET NOVALUE, which is available in KEDIT 5.0 but is not documented in the KEDIT 5.0 Reference Manual, controls whether uninitialized variables used in KEXX programs cause an error. It is similar to the REXX language's SIGNAL ON NOVALUE instruction.

SET OFPW

[Set] OFPW ON|OFF
KEDIT default: ON

SET OFPW determines whether KEDIT operates in ``one-file-per-window'' mode. In ``one-file-per-window'' mode, which is the default and is recommended for most users, a new document window is opened for each new file that is added to the ring. With OFPW OFF, KEDIT for Windows behaves more like text mode KEDIT and adding a file to the ring does not create a new document window; new document windows are only created when you use the SET SCREEN command or the Window New menu item.

SET OPENFILTER

[Set] OPENFilter /text1/filter1/ ...
SET OPENFILTER controls the file filters displayed at the bottom of the File Open dialog box.

SET PARSER

[Set] PARSER parser fileid
The syntax coloring facility depends on language-specific parameter files, known as KLD (KEDIT Language Definition) files, to determine which text to display as comments, strings, keywords, etc. A number of syntax coloring parsers are built into KEDIT, but you can use the SET PARSER command to define your own parser and load its associated KLD file.

The parser operand specifies the name of the parser you want to define.

The fileid operand specifies a file, with a default extension of .KLD, containing your language definition. The format of these KEDIT Language Definition files is discussed in Reference Manual Chapter 8, ``KEDIT Language Definition Files''. KEDIT searches for the .KLD file in the same directories it uses when searching for macro files, as controlled by SET MACROPATH.

For example, if you were working with a hypothetical language called LANG and you had described the language in a KEDIT Language Definition file called LANGDEF.KLD, you could define a parser called LANG with the command

SET PARSER LANG LANGDEF.KLD
After issuing the SET PARSER command, you could then issue the command
SET COLORING ON LANG
to use this parser to control syntax coloring for the current file.

SET
PRINTPROFILE

[Set] PRINTPROFILE fileid
KEDIT Default: PRINTPROFILE

When KEDIT sees /P as its first parameter it takes this a signal to run the profile specified via the SET PRINTPROFILE option, instead of your normal profile. This special profile should contain commands to print your file and then exit from KEDIT. An appropriate default profile, PRINTPROFILE, is built into with KEDIT, so most KEDIT users will not need to change the value of the PRINTPROFILE option.

SET QUICKFIND

[Set] QUICKFIND Respect|Ignore Word|NOWord
      Regexp|NORegexp string
SET QUICKFIND is a specialized option, most often used from within macros, that sets the value of the search string in the Quick Find toolbar item.

SET RECENTFILES

[Set] RECENTFiles n
KEDIT default: 9

SET RECENTFILES determines the maximum number of files that can appear on the recently-edited-files list displayed at the bottom of the File menu. By default, up to 9 files will appear. RECENTFILES can have values in the range 0 to 16.

SET TOOLBAR

[Set] TOOLBAR ON|OFF Top|Bottom|BOTH
KEDIT default: ON TOP

SET TOOLBAR determines whether KEDIT displays toolbars, which are sets of buttons that you can select with the mouse to carry out common operations. The first operand determines whether toolbars are displayed at all. The second operand determines whether, when toolbars are displayed, they should be displayed at the TOP, the BOTTOM, or BOTH the top and bottom of the frame window.

SET TOOLBUTTON

[Set] TOOLButton name visual [COND ccc] /help1/[help2/]
Use SET TOOLBUTTON to define the buttons that can appear on a toolbar. For each button, you specify the name of that button, how it will look when it is displayed on a toolbar, any conditions under which the button should be disabled, and the help information displayed for the button.

Once a button has been defined, you can use the SET TOOLSET command to position the button on the top or bottom toolbar. You must also define a macro named TOOL_name, where name is the name given to the button via SET TOOLBUTTON. KEDIT will execute this macro whenever your button is clicked on by the mouse.

SET TOOLSET

[Set] TOOLSet [Top|Bottom|NOFiles] DEFAULT
[Set] TOOLSet [Top|Bottom|NOFiles] USER toolbuttons
[Set] TOOLSet [Top|Bottom|NOFiles] ADD toolbuttons
[Set] TOOLSet [Top|Bottom|NOFiles] DELete toolbuttons
KEDIT default: TOP|BOTTOM|NOFILES DEFAULT

Use SET TOOLSET to determine which buttons will appear on one of KEDIT's toolbars, and how the buttons will be arranged. You can specify that a default set of buttons be displayed, you can give a user-defined list of buttons that you want to display, or you can add to or delete from the current set of buttons.

All buttons used with the SET TOOLSET command must be previously defined via the SET TOOLBUTTON command or must be default buttons built into KEDIT.

SET TRANSLATEIN

[Set] TRANSLATEIn NONE|OEMTOANSI
KEDIT default: NONE

SET TRANSLATEIN controls whether KEDIT converts a file from OEM to ANSI as it reads the file in. With the default of TRANSLATEIN NONE, no translation is done. But with TRANSLATEIN OEMTOANSI in effect, KEDIT translates text from OEM to ANSI as it loads new files into the ring and when processing the GET command.

SET
TRANSLATEOUT

[Set] TRANSLATEOut NONE|ANSITOOEM
KEDIT default: NONE

SET TRANSLATEOUT controls whether KEDIT converts a file from ANSI to OEM as it writes the file to disk. With the default of TRANSLATEOUT NONE, no translation is done. But with TRANSLATEOUT ANSITOOEM in effect, KEDIT translates text from ANSI to OEM as it writes files to disk during File Save and related operations and when processing the PUT and PUTD commands.

SET WINMARGIN

[Set] WINMARgin ON|OFF [n]
KEDIT default: ON 6

Use SET WINMARGIN to control the display of a margin area that you can use to mark line blocks.

When WINMARGIN ON is in effect, a margin area -- normally 6 pixels wide -- is displayed to the left of the first column of each document window. You can use this margin area to mark line blocks by placing the mouse pointer in the margin (the mouse pointer will become an arrow pointing upward and to the right) and dragging with mouse button 1 down. With WINMARGIN OFF, this margin area is not displayed.

The second operand to SET WINMARGIN controls the width, in pixels, of the margin area.


New and Changed QUERY and EXTRACT Values

Here are the ``interesting'' changes to QUERY and EXTRACT. There are of course other new QUERY and EXTRACT operands corresponding to each of the new SET operands added in KEDIT for Windows.

BLOCK

EXTRACT /BLOCK/ now returns additional values in BLOCK.7 and BLOCK.8. BLOCK.7 indicates whether the block involved is PERSISTENT or is a SELECTION. BLOCK.8 is set equal to the contents of the currently marked one-line block, and is set to the null string if there is no marked block or the marked block occupies multiple lines.

If no block is defined, BLOCK.2 through BLOCK.8 are now returned as null strings; text mode KEDIT did not return these values at all when no block was defined.

CLICK

Query CLICK displays which mouse button was last pressed, the mouse pointer's line and column position within the document window when the button was pressed, MARGIN (if WINMARGIN ON is in effect and the mouse pointer was in the window margin when the button was pressed) or NOMARGIN, and the line and column of the file at which the cursor was located when the button was pressed.

EXTract /CLICK/ sets these variables:
click.0 6
click.1 Number of the mouse button pressed
click.2 Line number of mouse pointer within document window when the button was pressed
click.3 Column number of mouse pointer within document window when the button was pressed
click.4 MARGIN (if WINMARGIN ON in effect and mouse pointer was in window margin when button was pressed) or NOMARGIN
click.5 Line number within the file of cursor location when button was pressed (or -1 if the cursor is not on a line of the file)
click.6 Column number within the file of cursor location when button was pressed (or -1 if the cursor is not on some column of the file)

CLIPBOARD

Query CLIPboard displays information about the Windows clipboard.

EXTract /CLIPboard/ sets these variables:
clipboard.0 5
clipboard.1 LINE|BOX|STREAM|FOREIGN
clipboard.2 If CLIPBOARD.1 = BOX, width of the box block; otherwise, the null string
clipboard.3 Size of clipboard text, in characters
clipboard.4 Size of clipboard text, in lines
clipboard.5 Contents of the clipboard, if the length of the text is less than or equal to the WIDTH setting, and otherwise the null string. The text may contain multiple lines of data, with carriage return and linefeed characters marking the end of each line.

FIELD

FIELD.4 is new. It is set to COMMAND, TEXT, or PREFIX, depending on the type of field in which the cursor is located.

FILEID, FMODE, FPATH, FNAME, FEXT, FTYPE, EFILEID

For compatibility with previous releases of KEDIT, EXTRACT commands specifying these operands return as their first value the uppercase form of the fileid or fileid component involved.
They also all return a second value with the fileid or fileid component in the case in which it is stored internally by KEDIT. In the 16-bit version of KEDIT, or in the 32-bit version of KEDIT with FCASE LOWER in effect, this result will be in lowercase. In the 32-bit version of KEDIT with FCASE ASIS in effect, this result will be in mixed case.

For example, in the 32-bit version of KEDIT with FCASE ASIS in effect, if you are editing the file "C:\TeMp FiLeS\My.FiLe", the results will be

FILEID.0 = 2
FILEID.1 = C:\TEMP FILES\MY.FILE
FILEID.2 = C:\TeMp FiLeS\My.FiLe

FILESEARCH

When you use QUERY FILESEARCH fileid, KEDIT searches for fileid in the same way that it would if you issued a KEDIT command using that fileid. QUERY FILESEARCH returns information about the result of that search, but does not actually edit the specified file, as the KEDIT command would do.

QUERY FILESEARCH fileid returns ERROR if an error is encountered in searching for the file, RING if the specified file is already in the ring, DISK if the file is on disk and would be loaded into the ring by a KEDIT command, or NEW if the file does not already exist and would be edited as a new file.

When QUERY FILESEARCH returns DISK, RING, or NEW, it also returns the fully-qualified name of the fileid involved, which can be affected by the path search KEDIT carries out for the file, and by settings like FCASE and DEFEXT.

For example, if SAMPLE.FIL is found in the current directory, the current directory is C:\TEST, and SAMPLE.FIL is not currently in the ring,

QUERY FILESEARCH SAMPLE.FIL
would return
DISK C:\TEST\SAMPLE.FIL
EXTRACT /FILESEARCH fileid/ returns similar information.

FILESTATUS

FILESTATUS.3 is new. It gives information about the end-of-line sequence that KEDIT encountered when it read the file from disk.

FILESTATUS.3 can be set to CR, LF, or CRLF, depending on the end-of-line sequence found at the end of the first line of the file. FILESTATUS.3 is set to NONE if the file is a new file that does not exist on disk, the file contained no end-of-line sequences, or the file was read in with EOLIN NONE in effect.

LASTKEY

EXTRACT /LASTKEY/ no longer returns extended shift status information in LASTKEY.5; LASTKEY.4 is now the last variable that is set.

EXTRACT /LASTKEY/ reports 56 (the scan code of the Alt key) as the scan code for text entered via Alt key+Numeric pad; in text mode KEDIT the scan code is reported as 0.

LSCREEN

Query LScreen displays the height in lines and width in columns of the current window.

EXTract /LScreen/ sets these variables:
lscreen.0 4
lscreen.1 Height in lines of current document window
lscreen.2 Width in columns of current document window
lscreen.3 Serial number of current document window (same as UNIQUEID.3)
lscreen.4 Serial number of current document window (same as UNIQUEID.3)
with text mode KEDIT. In text mode KEDIT these give the line and column of the upper left corner of the window. This specific information is not relevant under Windows, but some macros use it only to uniquely identify a particular window. Returning the window's serial number in LSCREEN.3 and LSCREEN.4 lets these macros work without change in KEDIT for Windows.

NBWINDOW

Query NBWindow displays the number of document windows that currently exist.

EXTract /NBWindow/ sets these variables:
nbwindow.0 1
nbwindow.1 Number of document windows

TABS

TABS.1 now returns the tab setting in the way that you specified it. For example, with a setting of TABS INCR 4, previous versions of KEDIT returned TABS.1 as
1 5 9 13 17 21 25 29 33 37 ...
TABS.1 is now returned as
INCR 4
TABS.2 is new. It returns a list of the actual tab columns, which is what TABS.1 returned in earlier releases. For example, with TABS INCR 4 in effect, TABS.2 would be returned as
1 5 9 13 17 21 25 29 33 37 ...

TARGET

TARGET.5 is new. If EXTRACT /TARGET/ is issued immediately after you successfully use the LOCATE, CLOCATE, or TFIND commands to search for a string target, TARGET.5 is set equal to the matching text from your file.

UNIQUEID

Query UNIQueid displays the unique serial numbers corresponding to the current file, view, and window. EXTract /UNIQueid/ sets these variables:
uniqueid.0 3
uniqueid.1 Serial number of current file
uniqueid.2 Serial number of current view
uniqueid.3 Serial number of current window
that it creates, to each new view of a file that it creates, and to each new window that it creates. You can use this information to tell if a file, view, or window is the ``same'' one that you worked with at some earlier point, despite changes to the fileid involved, window position, etc.

VERSION

Query VERSION displays KEDIT's version string. The first word of the version string identifies the product (``KEDIT/Windows''). Next is the version number, in the form of a major version number, a decimal point, and a two digit minor version number (for example, 1.50). Finally, there is a two character revision level (for example, W1) and possible additional text.

EXTract /VERSION/ sets these variables:
version.0 3
version.1 ``KEDIT/WINDOWS'' (this is returned for KEDIT for Windows; the DOS and OS/2 text mode versions of KEDIT return ``KEDIT'').
version.2 Version number
version.3 Revision level and possible additional identifying text

If you want to test in a macro whether you are running under KEDIT for Windows, we recommend that you test for VERSION.1 equal to ``KEDIT/WINDOWS''.

Similar Windows-related changes have also been made to QUERY/EXTRACT OPMODE.


New and Changed Initialization Options

The following text mode initialization options are not used by KEDIT for Windows: DEVICE, ISA, NOEMS, NOMOUSE, NOSCREEN, NOXMS, PREXX20, and UMB. These options can still be specified on the KEDITW command line or through the KEDITW= environment variable, but will be ignored.

The following initialization options are new in KEDIT for Windows:

LINE option

The LINE option tells KEDIT that, as soon as the file is loaded, the specified line of the file should become the current line.

An example:

KEDITW32 SAMPLE.FIL (LINE 62
This tells KEDIT to begin editing SAMPLE.FIL, and to start with line 62 as the current line.

The LINE option does not affect the cursor position; the cursor is left on the command line and is not automatically moved to the current line. However, you can use the COLUMN option to move the cursor to a specified column of the current line.

The positioning done by the LINE and COLUMN options takes place before KEDIT processes any commands in your profile that operate on the contents of your file, and your profile is free to move elsewhere in the file. Note also that it was always true in the past that the cursor was positioned on the command line, with the Top-of-File line as the current line, when your profile began execution, but if the LINE or COLUMN options are used, this is no longer true.

COLUMN option

The COLUMN option tells KEDIT that, as soon as the file is loaded, the cursor should be moved into the file area to the specified column of the current line. The current line is initially set to the line specified via the LINE option, or to the Top-of-File line if the LINE option is not used.
KEDITW32 SAMPLE.FIL (LINE 62 COLUMN 12
This tells KEDIT to begin editing SAMPLE.FIL, and to start with line 62 as the current line, with the cursor positioned in column 12 of that line.

FRAMESIZE option

Lets you specify that KEDIT should start with a MINIMIZED frame window, a MAXIMIZED frame window, a NORMAL (non-minimized and non-maximized) frame window, or that KEDIT should RECALL the frame window size in effect at the end of the last editing session. If specified, the FRAMESIZE option overrides the value of the SET INITIALFRAMESIZE setting.

INSTANCE option

Specifies whether, if another instance of KEDIT for Windows is already running when you try to invoke a new instance, a new instance of KEDIT should be started (INSTANCE MULTIPLE) or the existing instance of KEDIT should be activated (INSTANCE SINGLE). If specified, the INSTANCE option overrides the value of the SET INSTANCE setting.

NOFILEMENU option

Use the NOFILEMENU option to prevent a file (for example, a file used temporarily by a KEDIT macro) from being added to the File menu's list of recently-edited files.

NOINI option

The NOINI option suppresses KEDIT's processing of its INI file, KEDITW.INI. KEDIT then uses built-in default values for all of its SET options, window positions, etc., and does not load information from the INI file about recently-edited files, etc. Your profile is still executed, unless the NOPROFILE option is also specified.

UNTITLED option

The UNTITLED option tells KEDIT that you want to edit a new, untitled file, whose file name and extension are of the form UNTITLED.n. If the UNTITLED option is used, the command line involved cannot specify a fileid, since KEDIT automatically generates the UNTITLED.n fileid for you.

New KEXX Boolean Functions

ALTKEY()

Returns 1 if, at the time of the last keystroke or mouse action processed by KEDIT, either Alt key was down.

CLASSIC()

Returns 1 if INTERFACE CLASSIC is in effect.

CLIPTEXT()

Returns 1 if any text is currently stored in the Windows clipboard for possible use in a Paste operation.

CMDSEL()

Returns 1 if any text on the command line is currently selected.

CUA()

Returns 1 if INTERFACE CUA is in effect.

DELSEL()

If INTERFACE CUA is in effect, returns 1 when a selection or command line selection is marked, and when a persistent block is marked and no cursor movement has taken place since it was marked. Always returns 0 when INTERFACE CLASSIC is in effect. The default Delete and Backspace definitions use DELSEL() to determine whether they should use SOS DELSEL to delete the current block or command line selection, or should instead delete only a single character. DELSEL() returns 1 under the same conditions that cause the block indication on the status line to be followed by an asterisk.

OEMFONT()

Returns 1 if the font currently being used in KEDIT's document windows is an OEM font.

SHOWPRINTDLG()

show the File Print dialog box, and should not print immediately. That is, SHOWPRINTDLG() returns 1 when the ``Display dialog when activated from toolbar'' box in the File Print dialog box is checked.

UNTITLED()

Returns 1 if the current file is an UNTITLED file. That is, UNTITLED() returns 1 if the UNTITLED option was used when editing of the current file began, and the file's initial UNTITLED.n fileid has not been changed.

Internal Limits

Several internal limits have been changed in KEDIT for Windows. Here are the current limits:

  • The maximum number of files in the ring is 40 in the 16-bit version of KEDIT for Windows, and 100 in the 32-bit version.

  • The maximum WIDTH value, which determines the longest line that you can edit, is 4096 in the 16-bit version of KEDIT for Windows and 32000 in the 32-bit version, with a default WIDTH of 1024 and a minimum WIDTH of 512.

  • The number of lines in a file is limited only by available virtual memory.

  • KEXX macros can be up to 4000 lines long, with a maximum of 250 characters per line.

  • The maximum number of lines that can be sorted is limited only by available virtual memory.

  • The maximum selection level that can be given to a line by the SET SELECT command is 255.

Additional Changes for KEDIT 4.0 Users

Most of this booklet has focused on the differences between KEDIT 5.0 and KEDIT for Windows. For users of KEDIT 4.0 who did not upgrade to KEDIT 5.0, here is a brief summary of some of the changes made in KEDIT 5.0 that are also included in KEDIT for Windows:

Undo facility

The undo facility lets you undo any number of changes to your file, limited only by available memory. It is discussed in User's Guide Section 3.13, ``The Undo Facility''.

File locking

The file locking facility lets you prevent users on other computers, or other programs running on your computer, from inadvertently modifying files that you are editing. Related to this is the timestamp checking facility, which lets you detect when an unlocked file that you have edited has been modified by another user or another program. Both of these are discussed in User's Guide Chapter 12, ``File Processing''.

Macro language enhancements

Significant enhancements were made to the KEXX macro language. The PARSE, DO WHILE, DO UNTIL, SAY, TRACE, and INTERPRET instructions are supported. Many additional built-in functions, including all of the REXX character manipulation functions, are supported. Compound variables are fully supported. An interactive KEXX debugger, controlled by SET DEBUGGING and by the DEBUG command, is available. Single-line REXX-style (/*...*/) comments are supported. See Reference Manual Chapter 6, ``Macro Reference'', for full information about the KEXX language.

Highlighting facility

The highlighting facility lets you highlight lines of a file that are of particular interest to you. For example, you can tell KEDIT to highlight all lines of a file that you have made changes to, or all lines of a file that contain a particular word. See User's Guide Chapter 8, ``Selective Line Editing and Highlighting'', for a discussion of the highlighting facility.

Target highlighting

When you use the LOCATE or CLOCATE commands, or the Edit Find or Edit Replace dialog boxes, to look for a string target, KEDIT now highlights the target string on the screen.

Word targets

Word targets are new types of string targets that only match strings occurring on word boundaries. For example,
locate word /the/
would match ``the'', but not ``these'' or ``others''. In addition to WORD targets, which must match an entire word, you can also use PREFIX or SUFFIX targets to indicate that the specified string must appear at the start or at the end of a word. See User's Guide Chapter 6, ``Targets'', for more about word targets.

Line class targets

In addition to BLANK targets, which match blank lines, you can now also locate lines according to several new criteria. ALTERED targets look for lines of your file that have been added or changed during the current editing session, NEW targets look for lines that have been added, CHANGED targets look for lines that have been changed, SELECT targets look for lines with a specified selection level, and TAGGED targets look for lines whose tag bit is set. For example,
ALL ALTERED
will select all lines that have been altered during the current editing session. See User's Guide Chapter 6, ``Targets'', for more about line class targets.

DIALOG command

The DIALOG command lets you use simple pop-up dialog boxes to display information to users of your macros and to allow input of data to your macros.

MORE and LESS commands

After using the ALL command to select a subset of your file for display, you can use the MORE command to select additional lines (all lines that match a specified target) for display and you can use the LESS command to remove matching lines from display.

Trailing blanks

Previously, KEDIT did not have support for trailing blanks at the end of a line; trailing blanks were removed from each line of a file as the file was read in and after any changes made to a line while editing the file. By using the SET TRAILING command, you can now tell KEDIT to preserve trailing blanks in the files that you work with.

SET EOFIN
SET EOFOUT

SET EOFCHAR, which controlled the handling of end-of-file characters (character code 26) during both file input and output, has been replaced by SET EOFIN, which controls end-of-file character handling during file input, and SET EOFOUT, which controls end-of-file character handling during file input. KEDIT 4.0 normally stopped processing an input file when an end-of-file character was encountered, and added an end-of-file character to the end of each file that it wrote out. By default, KEDIT now allows end-of-file characters in files that you read in and does not add an end-of-file character to files that you write out.

Other changes

  • IMPMACRO ON, rather than IMPMACRO OFF, is now the default.

  • Due to changes in the RESET command, the RESET ALL operand no longer made sense and was dropped. RESET ALL was equivalent to RESET PREFIX plus RESET BLOCK.

  • To avoid confusion with the new undo facility, the much more limited SOS UNDO command was renamed to RESET FIELD.

  • EXTRACT /RANGE/, which returns the line numbers of the first and last lines in the range, previously preceded both of the line numbers returned with a colon. The line numbers are now returned without a preceding colon.

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.