Rex Swain's KEDIT/KEXX Summary (original) (raw)
(KEDIT for Windows, Version 1.5, Service Level 3)
Originally posted 16 September 1998 ~ Last updated 29 July 2020
Contents
- KEDIT:
- KEXX:
- Notes:
Utilities
- PARSET.KEX: Parses a KEDIT target from the beginning of a string
- SORTSTEM.KEX: Algorithms and techniques for sorting stemmed "arrays"
- SOUNDEX.KEX: Knuth's algorithm for encoding names
See Also
- Mansfield Software's KEDIT site
- Rex Swain's XEDIT Summary and REXX Summary
Other Summaries and Demos
- See my home page for other summaries and demos: APL, REXX, XEDIT, Perl, HTML, RGB Colors, HTTP Cookies, Email Forms, CGI Environment Variables, Server Side Includes, etc...
Invoking KEDIT
KEDIT [fileid ...] [(options [)] [extra]] KEDIT DIR [filespec ...] [(options [)] [extra]]
(Note: the actual name of the KEDIT executable file is probably KEDITW32.EXE)
Initialization Options
COLumn m : Cursor to column m in file area DEFPROFile fileid : Specify alternate to WINPROF.KEX profile FRAMEsize MINimized|MAXimized|NORMal|RECALL : Startup window state INSTANCE SINGLE|MULTIPLE : How many instances of KEDIT if invoked again LINE n : Make line n the current line LOCK : Lock file during editing MACROPath ON|OFF|envvar|dirlist : Where should KEDIT look for macros NEW : Edit new file even if it already exists NODEFEXT : No default extension; act as if DEFEXT OFF in effect NOFILEMENU : Don't add file to recently-edited list NOINI : Don't process KEDITW.INI; use all built-in defaults NOLOCK : Don't lock file (override LOCKING ON) NOMsg : Sets MSGMODE OFF for file being added to ring NOPROFile : Don't process WINPROF.KEX PATH ON|OFF|envvar|dirlist : Where should KEDIT look for files PROFDEBUG : Runs DEBUG WINPROF.KEX rather than MACRO WINPROF.KEX PROFile fileid : Specify alternate to WINPROF.KEX profile for just this file UNTITLED : Edit a new, untitled file (UNTITLED.n) Width n : Longest line that KEDITW handles (512 to 32000); see SET INITIALWIDTH
Commands
**/str[/] Special case of LOCATE when delimiter is slash ***** LOCATE * (go to EOF line) - LOCATE - (go to TOF line) **&*cmd Execute cmd, then redisplay it (so just Enter to repeat) ? Display last command (F6); ?? for 2 cmds ago, etc. ?+ Like ? but cycle forward = Re-execute previous command (F9); == to do twice, etc. **=*cmd Execute cmd, then execute previous command Add [n] Add n lines below current line; default=1 (F2) ALERT parms Display simple dialog box; see also DIALOG ALL [t] Display all lines matching target; omit t to restore ALter c1 c2 [t [n [m]]] : Change one character to another; see CHANGE syntax ANSITOOEM [t] Convert text from ANSI to OEM character set BAckward [n||HALF|m Lines] : Scroll up (PgUp) n screens; default=1 Bottom Make last file line the current line (Ctrl+End) CANCEL Like QUIT for all files in ring CAppend [txt] Append txt to end of focus line CDelete [ct] Delete columns from foccol thru ct; default ct=1 CEnter [t] Center text in target area between current MARGINs CFirst Set focus column to left ZONE column Change /s1/s2/ [t [n [m]]] : Change string1 to string2 CHDir [d:]path Change current [drive and] directory CHDRive d[:] Change current drive CInsert txt Insert text into focus line starting at focus column CLast Set focus column to right ZONE column CLIPboard parms Copy/cut/paste/clear clipboard CLocate ct Locate column target; moves focus column CMATCH [OUTER|INNER] : Find ({[< that matches character in focus column CMSG [txt] Place text on command line; default=clear command line COMMAND cmd Execute command without checking for synonym/macro COMPress [t] Compress blanks, replacing with tab characters COpy t1 t2 Copy lines specified by target1 to follow target2 COpy BLOCK Copy text from marked block (Alt+C and Alt+K) COUnt /str/ [t] Count number of times string occurs in target area COVerlay txt Overlay text in focline at foccol; blanks do not replace CReplace txt Replace text in focline at foccol CURsor parms Move cursor DEBUG [/tracesetting] macro [arg] : Run macro in debug mode DEBUG START macro Run in-memory macro (eg, Alt+A) in debug mode from now on DEBUG STOP macro Cancel effect of DEBUG START DEFine macro Query definition of named in-memory macro DEFine macro def Define named macro and assign specified definition DEFine fid Load macro definition(s) from specified .KML or .KEX file DELete [t] Delete target area; default=1 DIALOG parms Display simple dialog box DIR [filespec ...] Open DIR.DIR file listing files DIRAppend ["] Append to DIR.DIR DIRSORT [Date|Extension|Name|Path|Size ...] : Re-sort DIR.DIR file DMSG [text] Display text in debugging window (when DEBUGGING ON) DOS [cmd] Open DOS window [and run command]; see also WINEXEC DOSNowait [cmd] ", avoid "Press any key to continue" DOSQuiet [cmd] ", minimized DOS window Down [n|] Advance focus line; default=1; same as NEXT DUPlicat [n [t]] Make n copies of lines from focus line thru target; def=1 1 EDITV parms Manipulate global/file edit values EMSG [txt] Display error message; beep if BEEP ON ERASE fid Like DOS ERASE command, but no wildcards allowed EXPand [t] Expand tabs ('09'x) to blanks in target area EXTEND cmd Extend selection (eg, EXTEND SOS CRIGHT CRIGHT) EXTract /operand/ Extract internal KEDIT info /op1/op2/... FFile [fid] Unconditional FILE and quit FILE [fid] Save file and quit FILL [char] Fill box block with specified character (default=blank) FILLbox [char] Same as FILL Find txt Search forward for line starting w/ text (blank=any, _=blank) FINDUp txt Same as FIND but searches upward FUP txt Same as FINDUP FLOW [t] Wordwrap text in all paragraphs in target area FOward [n||HALF] Scroll down n windows; default=1 (PgDn) FOward [m Lines] Scroll down m lines GET Insert lines from prior PUT command below focus line GET fid [f [n]] Insert lines from file, from line f, for n lines Help [topic] Display help file (default=table of contents) HEXType Display focus line characters in both decimal and hex HIT macro ... Add in-memory macros to hit queue (keyb input next needed) IMMediate macdef Immediately execute specified macro definition INIUTIL parms Manage KEDITW.INI Input Enter input mode (see SET INPUTMODE) Input txt Insert line of text into file below focus line Join Join line below focus line to focus line at focus column Join ALigned Join, ignoring matching leading spaces Kedit Add file(s) to ring; see Invoking KEDIT KHELP [topic] Same as HELP LEft [n|HALF] Scroll view of columns to left; default=1; 0 to restore LEFTAdjust [t] Left-adjust text in target area: 1st non-blank to left margin LESS [TAG] t Remove matching lines from ALL display, or un-TAG lines Locate t [cmd] Locate target [then do optional command] LOCK Lock current file (open disk copy and keep open) LOWercas [t] Change uppercase letters to lowercase; default=1 LPrefix txt Place text into prefix area of focus line, then SOS DOPREFIX MACRO name [arg] Execute macro (not command) with optional argument MACROS [ALL] Add MACROS.KML to ring, showing all in-memory macro defs MACROS CHANGED Like MACROS, showing all non-default in-memory macro defs MACROS m1 [m2...] Like MACROS, showing specified in-memory macro definitions MARK parms Mark boundaries of a line, box, or stream block MErge t1 t2 [c] Merge two sets of lines: overlay 2nd on 1st starting at col MODify setoption Display SET option's current value on cmdline (so can edit) MODify MACRO name Display in-memory macro's definition on cmdline (so can edit) MORE [TAG] t Add matching lines to ALL display, or TAG more lines MOve t1 t2 Move text from target area 1 (line block only) to follow t2 MOve BLOCK Move from marked block (other file?) to follow current focus MSG [txt] Display message on the message line (like kexx SAY) Next [n|*] Move focus line down n lines; default n=1; same as DOWN NFind txt Search forward for line not start w/ txt (blank=any, _=blank) NFINDUp txt Search backward for line not starting with text NFUp txt Alternate name for NFINDUP NOMSG cmd Execute command with MSGMODE OFF in effect OEMTOANSI [t] Translate text in target area from OEM to ANSI character set Overlay txt Replace chars in focline with non-blank chars in text OVERLAYBox Replace chars starting at focline/foccol with chars in block POPUP parms Display pop-up menu PREServe Save most SET options (until RESTORE) PRINT parms Send data to printer PURge m1 [m2 ...] Purge in-memory macros from memory (undo DEFINE) PUT [t [fid]] Put text in target area into temp or specified file; see GET PUT LINE fid [txt] Append specified line of text into file PUTD [t [fid]] Like PUT but also deletes from file being edited Query option Query option setting QUIT Quit file being edited; prompt if unsaved changes (F3) QQuit Unprotected (quick) quit; no prompt READV parms Get text or keystroke from user RECover [n|] Recover n (<=25) lines deleted or changed (Alt+R) REDO REDO previous UNDO commands (Alt+Bksp, Ctrl+Y) REFRESH Update display while macro is running REName fid1 fid2 Like DOS RENAME command, but no wildcards allowed REPEat [t] Advance focline & do last cmd again [for each line thru targ] Replace [txt] Replace focus line with specified text RESet option Reset various aspects of KEDIT's status RESTore Restore all KEDIT settings saved by PRESERVE RGTLEFT [n] Toggle columns viewed n cols right/left RIght [n|HALF] Scroll view of columns to right; default=1; 0 to restore RIGHTAdjust [t] Right-justify text in target area to right MARGIN column SAVE [fid] Save file being edited [into specified fileid] SSAVE [fid] Save file being edited; no prompt if overwrite SCHange /s1/s2/ [t [n [m]]] : Selectively change string1 to string2 Set option value Change various KEDIT settings SHift Left|Right [c [t]] : Shift text left/right c columns in target area SHOWDLG option Display and process a KEDIT built-in dialog box SORT t [[A|D] c1 c2|] ... : Sort target area, asc/descending, column range SOS option ... Screen operation simulation for macros SPlit [ALigned] Split focus line at focus column [duplicate leading spaces] SPLTJOIN Split line or join lines depending on cursor position (PF11) STATus Display SET settings (Options/Status) SYNEX cmd Execute command from macro with synonym processing TAG [t] Highlight all lines that match target; no operand to clear TEXT txt Simulate typing of text from a macro TFind [t] Like LOCATE, but string target must begin in left zone column TOP Make top-of-file line the focus line (Ctrl+Home) UNDO Undo one level of changes (Ctrl+Z) UNLOCK Unlock disk copy of current file Up [n|] Move focus line up n lines; default=1 UPPercas [t] Change lowercase letters to uppercase in target area; def=1 WINdow parms Size/position KEDIT frame/document windows WINEXEC parms Run external Windows program WINHELP fid [top] Invoke Windows Help program; optional topic WMSG cmd Do command; if error, display message in Windows message box Xedit Same as KEDIT
ALERT /prompt/ [options] DIALOG /prompt/ [options] /prompt/ Up to 10 lines; word wrapped and/or split at LFs ('0A'x) EDITfield [/initialcontents/] TITLE /title/ OK|OKCANCEL|YESNO|YESNOCANCEL Default: OK but if EDITFIELD present, default (and only valid choice) is OKCANCEL DEFButton n 1 means leftmost button ICONExclamation|ICONInformation|ICONQuestion|ICONStop ALERT default: ICONSTOP DIALOG default: ICONQUESTION if YESNO or YESNOCANCEL, else no icon FIXEDfont PASSWORD ALERT only: Speaker beeps (unless BEEP OFF in effect) alert.1/dialog.1 set to contents of edit field alert.2/dialog.2 set to name of button selected (upper-case)
CLIPBOARD ... APPEND COPY Append current selection to clipboard APPEND CUT Cut current selection, appending to clipboard APPEND PUT txt Append specified text to clipboard CLEAR Empty the clipboard COPY Copy current selection to clipboard CUT Cut current selection to clipboard PASTE Paste from clipboard to current selection PUT txt Put specified text into clipboard
CURSOR ... CMdline [c] Place cursor on command line at column c; default=1 Column Move cursor to column pointer on focus line [Escreen] l [c] Place cursor at line/column on window; line 0 is command line; line 1 first visible line of file [Escreen] UDLR Move cursor one row/col, possibly causing scrolling Home Toggle cursor from cmd line to last file area posn (PF12) File l [c] Place cursor at line/column in file; default c=1 REVERT Return cursor and undo scrolling (rarely used) Screen l [c] Place cursor at line/column on window Screen UDLR Move cursor one row/col, possibly causing wrapping UDLR: subtitute UP|DOWN|LEFT|RIGHT
EDITV ... Manipulate global edit values across KEDIT session: GET var1 [var2 ...] Retrieve values into KEX vars LIST [var1 ...] List values; default=all non-null PUT var1 [var2 ...] Set values from KEX vars SET var1 val [var2 val ...] Set values SETL var val Set value (can contain blanks) Manipulate file edit values (local to each file in ring): GETF var1 [var2 ...] Retrieve values into KEX vars LISTF [var1 ...] List values; default=all non-null PUTF var1 [var2 ...] Set values from KEX vars SETF var1 val [var2 val ...] Set values SETLF var val Set value (can contain blanks) SETFL var val Same as SETLF
INIUTIL ... SAVE|CLEAR STATE Frame window position/state, printer/screen fonts, etc. SAVE|CLEAR HISTory Recent commands, files, find strings, etc. SAVE|CLEAR SETTINGS Save (like Options, Save Settings) or clear all SAVE SET option Save individual SET option into KEDITW.INI CONVERT SETTINGS Add file INISET.KEX to ring with SET commands
MARK ... Line|Box|Stream [PERSISTent|SELection] [Anchor|Word] [RESET] Mark one edge of Line|Box|Stream block (default=persistent, unanchored) PERSISTent (default) blocks remain marked until explicitly unmarked SELection (non-persistent) blocks are unmarked as soon as cursor is moved Anchor causes block to extend from focus line/col to fixed anchor position Unanchored blocks extend to most distant existing block boundary Persistent blocks unanchored by default; selections are always anchored Word causes blocks to be marked or extended on a per-word basis Valid only with stream blocks; also triggers Anchor behavior RESET causes new block to be marked (like after RESET BLOCK command) CMDline [SELection] Anchor|Word [RESET] Mark a command line selection SELection optional but has no effect (no such thing as persistent) Line [PERSISTent|SELection] [Anchor] Mark focus line as line block, or convert existing block to a line block and extend to focus line PERSISTent is the default Line [PERSISTent|SELection] ALL Mark entire file as a line block REANCHOR l [c] Extend block to line [and column, for box/stream] and anchor block there PERSISTent Change selection into persistent block
POPUP [MOUSE|TEXT|CENTER] /item1/[item2/...] MOUSE (default) position upper-left corner of menu at mouse pointer TEXT position upper-left corner of menu at text cursor CENTER position upper-left corner of menu at center of frame Begin item with ~ to grey out choice Use just - as item to insert separator line Use & in item to underline following character (for keyboard shortcut) Sets popup.1 to item selected (as specified), or empty if cancelled (Esc)
PRINT ... [t [n]] Print target area (new page after every n lines) LINE [txt] Print text followed by CR,LF STRING txt Print text (without CR,LF) FORMfeed Page eject CLOSE Explicitly close printer (see SET PRINTER NOCLOSE)
READV ... Cmdline [txt] Get line of input from the command line; optional: initialize with text readv.1 contains response EDITfield [txt] Get line of input from dialog box edit field (w/mem of recent responses) readv.1 contains response KEY [Ignoremouse|NOIgnoremouse] Get keystroke readv.1 contains key name (e.g., 'S-5' means Shift+5) readv.2 contains character value (e.g., '%') readv.3 contains scan code in decimal (e.g., 6) readv.4 contains shift status (e.g., 10000011)
RESET ... Block Unmark any marked block CMDSEL Unmark any marked command line selection FIELD Reset contents of cursor field Prefix Blank out prefix area THIGHlight Display highlighted target in its normal color UNDO Start new UNDO level while a macro is running Without argument: like RESET BLOCK and RESET PREFIX
SHOWDLG ... ABOUTKEDITFORWINDOWS ARRANGE BOOKMARK DIRECTORY FILL FIND GOTO INTERFACE OPEN PRINT PRINTSETUP REPLACE SAVE SAVEAS SAVESETTINGS SCREENFONT SELECTIVEEDITING SETCOMMAND SORT STATUS
WINDOW ... MINimize|MAXimize|RESTORE [DOCument|FRAME] Resize document window or KEDIT frame; default=DOC CASCADE Cascade document windows TILE [Horizontally|Vertically] Tile document windows; default=H CLOSE [DOCument|FRAME|FILE] Close document window, KEDIT frame, or current file; default=DOC NEWwindow Create new document window (additional view of current file) NEXTwindow|PREVwindow Make next/previous window become current document window ([Shift+]Ctrl+F6) ARRANGEicons Rearrange minimized document windows MENUmode [File|Edit|Actions|Options|Window|Help|DOCument|FRAME] Activate KEDIT menu bar
WINEXEC [WAIT|NOWAIT] [NORMal|MAXimize|MINimize] command [args] WAIT KEDIT inactive until command completes (default) NORMal Start program in normal window (default)
Prefix Commands
An or nA Add n new lines below this line; default=1; same as I command Cn or nC Copy n lines; default=1; use F or P for destination; C* means rest CC Copy block of lines; use F or P for destination Dn or nD Delete n lines; default=1; D* means rest of file DD Delete block of lines F Follow: target for C and M commands In or nI Insert n new lines below this line; default=1; same as A command Ln or nL Lowercase n lines; default=1 LL Lowercase block of lines Mn or nM Move n lines; default=1; use F or P for destination; M* means rest MM Move block of lines; use F or P for destination P Preceding: target for C and M commands Sn or nS Show: in shadow line, show first n lines excluded; S* means all S-n Show: in shadow line, show last n lines excluded SCALE Display scale line here (like SET SCALE ON n) TABL Display tab line here (like SET TABLINE ON n) Un or nU Uppercase n lines; default=1 UU Uppercase block of lines Xn or nX Exclude n lines from display; default=1; X* means rest XX Exclude block of lines from display "n or n" Duplicate this line n times; default=1 ""n or n"" Duplicate block of lines n times; default=1 / Make this line the current line **.**name Assign symbolic name to this line (like SET POINT) <**c or c**<** Shift left by c columns on this line; default=1 **<<**c or c**<<** Shift left by c columns on block of lines; default=1 **>c or c> Shift right by c columns on this line; default=1 >>c or c>> Shift right by c columns on block of lines; default=1
SET Options
(The command word SET is optional except for the SET = and SET ALT commands.)
Set = txt : Put string in the = buffer Set ALT n [p] : Change number of AUTOSAVE/SAVE alterations ARBchar OFF|ON [c1 [c2]] : Enable/define group/single arbitrary chars [OFF $ ?] ARRow ON|OFF : Display/hide ====> at beginning of command line AUTOCOLOR .ext parser : Set syntax coloring parser for .ext files AUTOEXIT ON|OFF : Exit KEDIT when last file in ring is closed AUTOINDENT ON|OFF : Indent cursor like line above when adding lines with F2 AUtosave OFF|n : Autosave every n alterations into =.AUS AUTOSCroll n|HALF|OFF : Columns to scroll horizontally BACKup OFF|TEMP|KEEP : Create =.BAK when file SAVEd or FILEd BEEP OFF|ON : Beep when error messages are displayed BOUNDMark parms : Controls vertical lines indicating important column locations CASE Mixed|Upper [Respect|Ignore] [R|I] : Ignore/respect case in target strings CLOCK OFF|ON : Display time-of-day clock on status line CMDline On|OFF|Top|Bottom : Last line, off, first line, last line COLMark OFF|c1 c2 ... : Draw vertical lines to left of specified columns COLOR parms : Control display colors COLORING ON|OFF AUTO|parser : Syntax coloring for current file CURLine n|+n|-n|M|M+n|M-n : Where to place current line on screen (M=middle) CURRBox ON|OFF ON|OFF : Box around current line when on cmdline, in filearea CURSORSIze vovr vins hovr hins : Control size of text cursor CURSORType Vertical|Horizontal|Interface : Control shape of text cursor DEBUGGing ON|OFF height tracing : Control KEXX debugging window DEFEXT ON|OFF : Default file extension: use same .ext as current fileid DEFPROFile fid : Default profile file (default=WINPROF.KEX) DEFSORT OFF | Date|Extension|Name|Path|Size ... : Default sort for DIR display DIRFORMat fname fext year : Set width of DIR fields DISPlay n1 [n2|] : Display scope (see SET SELECT, SCOPE, SHADOW); default=0 0 DOCSIZing Standard|EXTENded [n] : Control size of non-maximized windows DRAG parms : Control effect of dragging mouse ECOLOR parms : Control emphasis colors (for syntax coloring) EOFIN ALLOW|PREVENT : Handle end-of-file char (026 dec, 1A hex) during load, GET EOFOUT EOL|EOLEOF|EOF|NONE : Set chars after last line for FILE, SAVE, PUT EOLIN CRORLF|LF|CR|NONE : Set end-of-line treatment during load, GET EOLOUT CRLF|LF|CR|NONE : Set end-of-line treatment during FILE, SAVE, PUT FCASE ASIS|LOWER : Show file names as is or always in lower-case FILEId d:path\name.ext : Change fileid of file being edited FMode d[:] : Change drive of file being edited FPath path : Change path of file being edited FName name : Change name of file being edited FExt ext : Change extension of file being edited FType ext : Change extension of file being edited FILEOPEN SINGLE|MULTIPLE : Allow multiple files in File Open dialog box FORMAT parms : Control formatting during FLOW command HEX ON|OFF : Allow hex/dec codes in strings and targets: LOCATE/x'FF'/ HEXDISPlay ON|OFF : Display info about cursor char on status line: 'e'=65/101 HIGHlight OFF|ALTered|TAGged|SELect n [m] : Highlight specified file lines IDline ON|OFF : Display file id line at top of file area IMPMACro ON|OFF : Implied macro: look for macro if command not recognized INISAVE STATE|NOSTATE [HISTory|NOHISTory] : What should be saved in KEDITW.INI INITIALDIR PRESERVE|RECALL [PRESERVE|RECALL|FIRSTFile] : Control startup dir INITIALDOCsize MAXimized|NORMal|RECALL : Control startup document window state INITIALFRAMEsize MAXimized|NORMal|RECALL : Control startup KEDIT frame window INITIALINSert ON|OFF : Start with insert mode (on) or overtype mode (off) INITIALWidth n : Control WIDTH setting at startup (default=1024) INPUTMode OFF|FUll|LIne : Control effect of INPUT command with no operands INSERTmode ON|OFF|TOGGLE : Change insert (vs. overtype) mode INSTANCE SINGLE|MULTIPLE : Allow one or more than one instance of KEDIT INTERFACE CUA|CLASSIC : Use "common user access" (Windows) conventions, or text INTERNATional CASE|NOCASE [SORT|NOSORT] : Handle international (accented) chars KEYSTYLE parms : Special treatment of keys: Enter Home Delete Backspace Alt LASTOP cmd text : Set contents of operand memory for specified command LINEFLAG CHAnge|NOCHAnge NEW|NONEW TAG|NOTAG [t] : Change file line flag bits LINENd ON|OFF [c] : Recognize/specify command line-end char (default=OFF #) LOCKING ON|OFF : Lock files as added to ring (see LOCK, UNLOCK, SET SHARING) LRecl n|* : Set logical record length (see SET RECFM) (default==WIDTH) MACROPath ON|OFF|envvar|dirlist : Where to look for macros (default=PATH) MARgins left right [[+|-]parindent] : Set margin columns (see FLOW, etc.) MARKSTYLE line [box stream] : Up to 3 PERSISTent|SELection operands MONitor WINDOWS|COLOR|MONO : Control coloring (default=WINDOWS) MOUSEBEEP ON|OFF : Beep when improper mouse clicks MSGLine ON n|+n|-n|M|M+n|M-n [p] [Overlay] : Place message line; up to p lines MSGMode ON|OFF : Show messages? (when off, use QUERY/EXTRACT LASTMSG) NEWLines SAMELine|BELOW|BELOWCurr : Where should new lines be inserted NOVALUE ON|OFF : Like using SIGNAL ON NOVALUE in all KEXX macros NUMber ON|OFF : Show file line numbers prefix area OFPW ON|OFF : One-file-per-window mode (MDI/multiple document interface) OPENFilter /txt/filter/ ... : File filters shown in File Open dialog box PARSER lang fileid.KLD : Define language parser for syntax coloring PATH ON|OFF|envvar|dirlist : Where to look for files when not in current dir Point .name [OFF] : Define or delete name for focus line PREfix ON|OFF|Nulls [Left|Right] : Enable prefix area; Nulls allows insert PREfix Synonym new old : Create synonym for prefix command (see prefix commands) PRINTER WINdows|device CLOSE|NOCLOSE FORM|NOFORM CONVert|NOCONVert : See manual PRINTPROFile fid : Set alternate profile for printing via Windows Explorer QUICKFIND Respect|Ignore Word|NOWord Regexp|NORegexp str : Set QF toolbar item RANge t1 t2 : Set line range; a bit like ALL for range of consecutive of lines RECENTFiles n : How many at bottom of File menu (0 to 16) RECFm Fixed|Varying : Record format when saving file (see SET LRECL) REPROFile ON|OFF : Re-execute profile for each file added to ring RESERved M[+n|-n] [color] text|OFF : Reserve a line on screen RIGHTCTRL ON|OFF : Make right Ctrl key act like Enter key (on numeric keypad) SCALe ON|OFF M[+n|-n] : Place/remove scale line (default=OFF M+1) SCOPE Display|All : Act on lines within SET DISPLAY scope; or all SCReen n [Horizontal|Vertical] : Split screen evenly into n logical screens SCReen n Split : Get n horizontal windows, each split in half SCROLLbar ON|OFF [Vertical|Horizontal|BOTH] : Control display of scroll bars SELect [+|-]n [t] : Set/raise/lower selection level of lines SHADow ON|OFF : Show shadow lines when excluded by ALL/SELECT/DISPLAY SHARING DENYWRITE|DENYNONE [DENYWRITE|DENYREADWRITE] : File sharing/locking STATUSLine ON|OFF : Display status line at bottom of frame window STAY OFF|ON : OFF=go to EOF if target not found; ON=stay put STReam ON|OFF : Search OFF=focline or ON=entire file for column targets SYNonym ON|OFF : Controls whether KEDIT does synonym processing at all SYNonym [LINEND c] syn [n] def : Assign synonym; c=linend char, n=minimum abbrev TABLine ON|OFF M[+n|-n] : Place/remove tab ruler line TABs [c1 [... cn]] [INCR n] : Set logical tabs stops TABSIn ON|OFF|TABQUOTE [n] : Expand tabs when reading file (until first ' or ") TABSOut ON|OFF [n] : Compress blanks to tabs when writing file THIGHlight ON|OFF : Highlight strings found by LOCATE/CLOCATE/TFIND TIMECHECK ON|OFF : Check for changed file timestamp before writing file TOFEOF ON|OFF : Show top-of-file and end-of-file notice lines TOOLBAR ON|OFF Top|Bottom|BOTH : Control display of toolbars TOOLButton name visual [COND ccc] /help1/[help2/] : Define button on toolbar TOOLSet [Top|Bottom|NOFiles] DEFAULT|USER|ADD|Delete toolbuttons : Which buttons TRAILING ON|OFF|SINGLE|EMPTY : Control treatment of trailing blanks TRANSLATEIn NONE|OEMTOANSI : Convert chars from OEM to ANSI when reading file TRANSLATEOut NONE|ANSITOOEM : Convert chars from ANSI to OEM when writing file TRunc n| : Define truncation column UNDOING ON|OFF [n [k]] : Control undo facility; n levels, k bytes per file VARblank ON|OFF : Make target like /a b/ match text like "a b" Verify [Hex] s1 e1 [[Hex] s2 e2 ...] : Columns (start/end pairs) to display WINMARgin ON|OFF [n] : Pixels on left edge of doc windows to mark line blocks WORD NONBlank|ALPHAnum : What is a "word" (for SOS .WORD. and MARK STREAM WORD) WORDWrap ON|OFF : Add new line if text entered beyond right margin WRap ON|OFF : Wrap around past EOF when LOCATE/FIND/etc. Zone c1 c2|* : Define columns to search for targets
A few suggested non-default settings for your WINPROF.KEX profile:
'SET BEEP ON' /* Beep on error / 'SET INITIALWIDTH 32000' / As wide as possible / 'SET MSGLINE ON -1 10 OVERLAY' / Many lines for messages / 'SET NUMBER ON' / Number lines in prefix area / 'SET PREFIX NULLS LEFT' / Prefix left fill with nulls / 'SET SHADOW OFF' / Don't display shadow lines / 'SET WRAP ON' / Wrap from bot to top (LOCATE) */
QUERY and EXTRACT Operands
Most operands are related to the corresponding SET operand command
In all cases, variable operand.0 is set to number of variables returned
= : What's in the equal (=) buffer (last executed command or macro) equalsign.1 = String in the equal buffer ALT : Number of alterations to file since last save alt.1 = Number of changes since last AUTOSAVE or SAVE alt.2 = Number of changes since last SAVE ARBchar : Status of arbitrary character arbchar.1 = ON|OFF arbchar.2 = First arbitrary character (any group of zero or more chars) arbchar.3 = Second arbitrary character (any single char) ARRow : Display/hide ====> at beginning of command line arrow.1 = ON|OFF ATTRibutes : Deprecated; use COLOR instead attributes.0 = 30 (see manual) AUTOCOLOR ext : Name of parser associated with extension autocolor.1 = Extension (with leading period) autocolor.2 = Name of associated parser, or NULL AUTOCOLOR [*] : List of all extensions with associated parsers autocolor.i = ith extension and parser AUTOEXIT : Exit KEDIT when last file in ring is closed autoexit.1 = ON|OFF AUTOIndent : Indent cursor like line above when adding lines with F2 autoindent.1 = ON|OFF AUtosave : Is file being automatically saved; after how many alterations autosave.1 = OFF|n AUTOSCroll : Columns to scroll horizontally autoscroll.1 = HALF|OFF|n BACKup : Create =.BAK when file SAVEd or FILEd backup.1 = OFF|TEMP|KEEP BEEP : Beep when error messages are displayed beep.1 = ON|OFF BLOCK : Block currently defined block.1 = LINE|BOX|STREAM|NONE block.2 = Line number of start of block block.3 = Column number of start of block block.4 = Line number of end of block block.5 = Column number of end of block block.6 = Fileid of file containing marked block block.7 = PERSISTENT|SELECTION block.8 = Contents of the currently marked one-line block BOUNDMark : Vertical lines indicating important column locations boundmark.1 = OFF or some of: ZONE TRUNC MARGINS TABS VERIFY WINMARGIN CASE : Treatment of upper/lower case letters case.1 = MIXED|UPPER (for input) case.2 = RESPECT|IGNORE (for LOCATE) case.3 = RESPECT|IGNORE (for CHANGE) CLICK : Mouse button last pressed click.1 = Number of the mouse button pressed click.2 = Line number of mouse pointer within document window click.3 = Column number of mouse pointer within document window click.4 = MARGIN|NOMARGIN click.5 = Line number within the file of cursor location (or -1) click.6 = Column number within the file of cursor location (or -1) CLIPboard : Contents of Windows clipboard clipboard.1 = LINE|BOX|STREAM|FOREIGN|NONE clipboard.2 = Width of the BOX block (or null) , clipboard.3 = Size of clipboard text in characters clipboard.4 = Size of clipboard text in lines clipboard.5 = Contents of the clipboard (if length <= WIDTH) CLOCK : Display time-of-day clock on status line clock.1 = ON|OFF CMDline : Where is command line cmdline.1 = ON|OFF|TOP|BOTTOM cmdline.2 = Line number within window cmdline.3 = Contents of command line (mixed case) COLMark : Draw vertical lines to left of specified columns colmark.1 = OFF or list of column numbers COLOR field : Display color color.1 = Field name followed by field's color COLOR [*] : All display colors color.i = Field name followed by field's color COLORING : Syntax coloring for current file coloring.1 = ON|OFF coloring.2 = AUTO|parser coloring.3 = parser (same as coloring.2 unless AUTO) COLumn : Column number of the focus column column.1 = Column number of the focus column CURLine : Information about the current line and focus line curline.1 = M[+|-]n | [-]n (position of current line; M=middle) curline.2 = Line number within window of current line curline.3 = Contents of focus line curline.4 = ON if focus line changed or inserted in session; else OFF curline.5 = NEW CHANGED or OLD CHANGED or OLD curline.6 = Selection level of focus line (more efficient than select.1) CURRBox : Box around current line currbox.1 = ON|OFF (when cursor on command line) currbox.2 = ON|OFF (when cursor in file area) CURSor : Where is the cursor; where was cursor when last SOS EXECUTE began cursor.1 = Line number of cursor in window cursor.2 = Column number of cursor in window cursor.3 = Line number of cursor in file (or -1) cursor.4 = Column line number of cursor in file (or -1) cursor.5 = Previous line number of cursor in window cursor.6 = Previous column number of cursor in window cursor.7 = Previous line number of cursor in file (or -1) cursor.8 = Previous column line number of cursor in file (or -1) CURSORSIze : Size of text cursor (as % of width of characters in current font) cursorsize.1 = Width of vertical cursor in Overtype mode cursorsize.2 = Width of vertical cursor in Insert mode cursorsize.3 = Height of horizontal cursor in Overtype mode cursorsize.4 = Height of horizontal cursor in Insert mode CURSORType : Shape of text cursor cursortype.1 = VERTICAL|HORIZONTAL|INTERFACE DEBUGGing : KEXX debugging window debugging.1 = ON|OFF debugging.2 = Height of the debugging window in lines debugging.3 = Initial trace setting in effect for macros run with DEBUG DEFEXT : Default file extension defext.1 = ON|OFF DEFPROFile : Default profile file defprofile.1 = fileid DEFSORT : Default sort for DIR display defsort.1 = OFF or some of: DATE EXTENSION NAME PATH SIZE DIRectory [d:] : Current directory (of current drive unless d: specified) directory.1 = Current directory (upper case) e.g. "C:\MY DOCUMENTS" directory.2 = Current directory (mixed case) e.g. "C:\My Documents" DIRFileid : Info about file displayed in focus line of current DIR file dirfileid.1 = Full fileid d:\dir\sub\name.ext dirfileid.2 = Drive d: dirfileid.3 = Directory \dir\sub dirfileid.4 = File name name dirfileid.5 = File extension ext DIRFORMat : Width of DIR fields dirformat.1 = Columns for file name dirformat.2 = Columns for file extension (or 0) dirformat.3 = Columns for year DISPlay : Range of selection levels included in display display.1 = Minimum displayable selection level display.2 = Maximum displayable selection level DOCSIZing : Size of non-maximized windows docsizing.1 = STANDARD|EXTENDED docsizing.2 = Column width for windows sized by EXTENDED rules DRAG : Effect of dragging mouse drag.1 = BOX|LINE|STREAM|CMDLINE|DRAGDROP|NONE drag.2 = PERSISTENT|SELECTION drag.3 = ANCHOR|WORD drag.4 = RESET or null ECOLOR c : Emphasis color (for syntax coloring) ecolor.1 = Letter or number specified, followed by corresponding color ECOLOR [*] : Emphasis colors (for syntax coloring) ecolor.i = ith character/number, followed by corresponding color EFILEId : Fileid that current file had when it was added to ring efileid.1 = Fileid in uppercase efileid.2 = Fileid in case according to FCASE ASIS|LOWER EOF : Is focus line on or off the end-of-file (or end-of-range) line eof.1 = ON|OFF [see also EOF()] EOFIN : Handling of end-of-file char (026 dec, 1A hex) during load, GET eofin.1 = ALLOW|PREVENT EOFOUT : Chars after last line for FILE, SAVE, PUT eofout.1 = EOL|EOLEOF|EOF|NONE EOL : Is focus column at end-of-line column (1+zone.2) eol.1 = ON|OFF EOLIN : Handling of end-of-line during load, GET eolin.1 = CR|CRORLF|LF|NONE EOLOUT : End-of-line treatment during FILE, SAVE, PUT eolout.1 = CR|CRLF|LF|NONE FCASE : Showing file names as is or always in lower-case fcase.1 = ASIS|LOWER FEXT : Extension of current fileid fext.1 = Extension in uppercase fext.2 = Extension in case according to FCASE ASIS|LOWER FIELD : Cursor field info field.1 = Contents of cursor field field.2 = Character at cursor location field.3 = Location of cursor within data of current field field.4 = COMMAND|TEXT|PREFIX FIELDWORD : Cursor field word info fieldword.1 = Field word (see help) fieldword.2 = Field word (group of non-blank characters) FILEId : Fileid of current file fileid.1 = Fileid in uppercase fileid.2 = Fileid in case according to FCASE ASIS|LOWER FILEOPEN : Can open one or multiple files from File/Open dialog box fileopen.1 = SINGLE|MULTIPLE FILESEARCH fileid : Where would KEDIT find specified file? filesearch.1 = DISK|RING|NEW|ERROR filesearch.2 = Fully qualified fileid (case according to FCASE) FILESTATUS : Status of current file filestatus.1 = DENYWRITE|DENYREADWRITE|NONE (lock mode) filestatus.2 = READONLY|READWRITE (type of access KEDIT has) filestatus.3 = CR|LF|CRLF|NONE (EOL sequence found at end of 1st line) FLscreen : File lines visible in window flscreen.1 = line number of first line of file displayed in window flscreen.2 = line number of last line of file displayed in window FMode : Drive specifier of current file fmode.1 = Drive in uppercase (eg, 'C:'), or null if UNC name fmode.2 = Drive in case according to FCASE ASIS|LOWER FName : Name of current file fname.1 = Name in uppercase (eg, 'FOO'), or null if UNC name fname.2 = Name in case according to FCASE ASIS|LOWER FOCUSWORD : Word on focus line nearest cursor focusword.1 = Focus word (see help) focusword.2 = Focus word (group of non-blank characters) FORMAT : Formatting during FLOW command format.1 = JUSTIFY|NOJUSTIFY format.2 = BLANK|EXTENDED format.3 = DOUBLE|SINGLE FPath : Directory path of current file fpath.1 = Directory path in uppercase (eg, '\DIR\SUBDIR') fpath.2 = Directory path in case according to FCASE ASIS|LOWER FType : Extension of current fileid (same as FEXT) ftype.1 = Extension in uppercase ftype.2 = Extension in case according to FCASE ASIS|LOWER HEX : Allow hexadecimal in strings and targets (LOCATE/x'FF'/) hex.1 = ON|OFF HEXDISPlay : Show cursor character ('e'=65/101) on status line hexdisplay.1 = ON|OFF HIGHlight : Highlight specified file lines highlight.1 = OFF|ALTERED|SELECT|TAGGED highlight.2 = If SELECT, lowest selection level highlighted highlight.3 = If SELECT, highest selection level highlighted IDline : Display file id line at top of file area idline.1 = ON|OFF IMPMACro : Implied macro: look for macro if command not recognized impmacro.1 = ON|OFF INISAVE : What should be saved in KEDITW.INI inisave.1 = STATE|NOSTATE inisave.2 = HISTORY|NOHISTORY INITIALDIR : Control startup dir initialdir.1 = PRESERVE|RECALL (when no initial fileid) initialdir.2 = PRESERVE|RECALL|FIRSTFILE (with fileid) INITIALDOCsize : Control startup document window state initialdocsize.1 = MAXIMIZED|NORMAL|RECALL INITIALFRAMEsize : Control startup KEDIT frame window initialframesize.1 = MAXIMIZED|NORMAL|RECALL INITIALINSert : Start with insert mode (on) or overtype mode (off) initialinsert.1 = ON|OFF INITIALWidth : WIDTH setting at startup (default=1024) initialwidth.1 = n (512 to 32000) INPUTMode : Effect of INPUT command with no operands inputmode.1 = OFF|FULL|LINE INSERTmode : Insert mode (on) or overtype mode (off) insertmode.1 = ON|OFF INSTANCE : Allow one or more than one instance of KEDIT instance.1 = SINGLE|MULTIPLE INTERFACE : Use "common user access" (Windows) conventions, or text interface.1 = CUE|CLASSIC INTERNATional : Handle international (accented) chars international.1 = CASE|NOCASE international.2 = SORT|NOSORT KEYSTYLE : Special treatment of keys (when INTERFACE CUA in effect) keystyle.1 = STANDARD|ADJUSTED (Enter) keystyle.2 = STANDARD|ADJUSTED (Home) keystyle.3 = STANDARD|ADJUSTED (Delete) keystyle.4 = STANDARD|ADJUSTED (Backspace) keystyle.5 = STANDARD|ADJUSTED (Alt) LASTKEY [n] : Info on last (or nth most recently (1-8)) read key lastkey.1 = Key name lastkey.2 = Character (or null) lastkey.3 = Scan code lastkey.4 = Shift status (e.g., 10000011) LASTmsg : Last message generated for current window lastmsg.1 = Text of last message (up to 160 chars) LASTOP cmd : Operand used when command last issued from command line (cmd = ALter|Change|CLocate|COUnt|Find|Locate|SCHange|TFind) lastop.1 = Name of command and its last operand (mixed case) LASTOP [*] : Operands used when commands last issued from command line lastop.1 = ALTER and its last operand (mixed case) lastop.2 = CHANGE and its last operand (mixed case) lastop.3 = CLOCATE and its last operand (mixed case) lastop.4 = COUNT and its last operand (mixed case) lastop.5 = FIND and its last operand (mixed case) lastop.6 = LOCATE and its last operand (mixed case) lastop.7 = SCHANGE and its last operand (mixed case) lastop.8 = TFIND and its last operand (mixed case) LASTRC : Return code from last command issued from command line lastrc.1 = Return code [same as special variable rc] LENgth : Length of focus line length.1 = length, excluding trailing blanks; 0 if TOF or EOF LIne : Line number in file of focus line line.1 = line number in file; 0 if at TOF; 1+lines if at EOF LINEFLAG : Flags associated with focus line lineflag.1 = NEW|NONEW lineflag.2 = CHANGE|NOCHANGE lineflag.3 = TAG|NOTAG LINENd : Line end character status linend.1 = ON|OFF (allow multiple commands on command line) linend.2 = linend character LOCKING : Lock files as added to ring locking.1 = ON|OFF LRecl : Logical record length of file being edited lrecl.1 = lrecl LScreen : Logical screen size and location lscreen.1 = number of lines of current document window lscreen.2 = number of columns of current document window lscreen.3 = serial number of current document window (UNIQUEID.3) lscreen.4 = serial number of current document window (UNIQUEID.3) MACRO name : Definition of in-memory macro (QUERY works, but EXTRACT not currently supported) MACROPath : Where to look for macros macropath.1 = ON|OFF|envvar|dirlist MACROSEARCH fileid [defaultextension] : Where would KEDIT find specified macro? macrosearch.1 = Fully qualified fileid (case according to FCASE) MARgins : Margin columns margins.1 = Left margin column number margins.2 = Right margin column number margins.3 = Paragraph indent value MARKSTYLE : Blocks marked with mouse marked as persistent blocks or selections markstyle.1 = SELECTION|PERSISTENT (line blocks) markstyle.2 = SELECTION|PERSISTENT (box blocks) markstyle.3 = SELECTION|PERSISTENT (stream blocks) MEMory : KEDIT's memory usage (K bytes) memory.1 = 0 memory.2 = 0 memory.3 = Unused ISA memory (Internal Storage Area) memory.4 = Total FSA memory (File Storage Area) memory.5 = 0 memory.6 = 0 memory.7 = Memory holding UNDO info (total for all files in ring) MONitor : Coloring monitor.1 = WINDOWS|COLOR|MONO MOUSEBEEP : Beep when improper mouse clicks mousebeep.1 = ON|OFF MSGLine : Message line status and location msgline.1 = ON|OFF (currently, always ON) msgline.2 = M[+|-]n | [-]n (position; M=middle of screen) msgline.3 = maximum number of lines that msgline can expand to msgline.4 = OVERLAY|null MSGMode : Message mode status msgmode.1 = ON|OFF NBFile : Number of files currently being edited nbfile.1 = number of files in ring nbfile.2 = maximum number of files allowed in ring NBScope : Number of lines in file within current scope nbscope.1 = number of lines within the current scope nbscope.2 = position of the focus line within the scope NBWindow : Number of document windows that currently exist nbwindow.1 = Number of document windows NEWLines : Where do new lines get inserted newlines.1 = SAMELINE|BELOW|BELOWCURR NOVALUE : Like using SIGNAL ON NOVALUE in all KEXX macros novalue.1 = ON|OFF NUMber : Number file lines in prefix area number.1 = ON|OFF OFPW : One-file-per-window mode (MDI/multiple document interface) ofpw.1 = ON|OFF OPENFilter : File filters shown in File Open dialog box openfilter.1 = /txt/filter/ ... OPMODE : Mode in which KEDIT is running (see also version.1) opmode.1 = GUI (Windows) | FULLSCREEN|TEXTWINDOW|DETACHED (OS/2) | REAL (DOS) | WINDOWS (DOS under Windows) | UNKNOWN And, if KEDIT for Windows: opmode.2 = WINDOWS opmode.3 = Windows version number (eg '3.10', or '4.00' for Windows 95) opmode.4 = Additional identifying text, or null OPSYS : Operating system opsys.1 = Operating system name (eg 'DOS', 'Windows 95', 'Windows NT') opsys.2 = Version number of operating system opsys.3 = Additional identifying text, or null PARSER [*] : All language parsers for syntax coloring parser.0 = Number of parsers defined parser.i = lang fileid.KLD PARSER parser : Language parser for syntax coloring parser.1 = Parser name parser.2 = Fileid of .KLD file PATH : Where to look for files when not in current directory path.1 = ON|OFF|envvar|dirlist Point : Symbolic names assigned to the focus line point.0 = 1; or 0 if no names assigned point.1 = line number and names assigned to it **Point *** : All lines with symbolic names defined point.i = line number and all names assigned to it PREfix : State of prefix area prefix.1 = ON|OFF|NULLS prefix.2 = LEFT|RIGHT PREfix Synonym : All prefix synonyms prefix.i = newname oldname PRINTER : Printer options printer.1 = WINDOWS|LPT1:|LPT2:|LPT3:|COM1:|COM2: printer.2 = CLOSE|NOCLOSE printer.3 = FORM|NOFORM printer.4 = CONVERT|NOCONVERT PRINTPROFile : Alternate profile for printing via Windows Explorer printprofile.1 = Fileid of printer profile macro PRINTSIZE : Printer page size, based on current printer/font/margins printsize.1 = Lines per page printsize.2 = Columns per page QUICKFIND : Quick Find toolbar search string quickfind.1 = RESPECT|IGNORE quickfind.2 = WORD|NOWORD quickfind.3 = REGEXP|NOREGEXP quickfind.4 = Search string RANge : Line numbers of the top and bottom of the range range.1 = line number of the first line in range range.2 = line number of the last line in range (RANGE.1-1 if no lines) RECENTFiles : How many files shown at bottom of File menu recentfiles.1 = n (0 to 16) RECFm : Record format of current file recfm.1 = FIXED|VARYING REPROFile : Re-execute profile for each file added to ring? reprofile.1 = ON|OFF RESERved : Line numbers of screen lines currently reserved reserved.0 = 1 (or 0 when no lines are reserved) reserved.1 = list of reserved line numbers RIGHTCTRL : Make right Ctrl key act like Enter key (on numeric keypad) rightctrl.1 = ON|OFF RING : Number of files you are editing and file identification of each ring.0 = number of files in ring ring.i = Fileid, current line, current column, size, alteration count SCALe : State of scale display and position of scale line on screen scale.1 = ON|OFF scale.2 = M[+|-]n | [-]n (position; M=middle of screen) scale.3 = line number within window (only set if SCALE.1=ON) SCOPE : Display scope (see also DISPLAY) scope.1 = ALL|DISPLAY SCROLLbar : Display of scroll bars scrollbar.1 = ON|OFF scrollbar.2 = VERTICAL|HORIZONTAL|BOTH SELect : Selection level of current line and max level for file select.1 = selection level of focus line (curline.6 more efficient) select.2 = maximum selection level of all lines in current range SHADow : Are shadow lines displayed shadow.1 = ON|OFF SHARING : File sharing/locking sharing.1 = DENYWRITE|DENYNONE sharing.2 = DENYWRITE|DENYREADWRITE SIZe : Size of file being edited size.1 = number of lines in current file STARTUP : How KEDIT was invoked startup.1 = Fileid of KEDIT module that is executing startup.2 = Command line arguments passed to KEDIT startup.3 = Value of KEDITW environment string startup.4 = Fileid of initial profile STATUSLine : Displaying status line at bottom of frame window? statusline.1 = ON|OFF statusline.2 = BOTTOM STAY : Stay put (as opposed to EOF) if target not found stay.1 = ON|OFF STReam : Search entire file for column target (as opposed to just curline) stream.1 = ON|OFF SYNonym : Is KEDIT doing synonym processing at all? synonym.1 = ON|OFF *SYNonym *** : Definitions of all defined synonyms synonym.i = newname abbreviation definition TABLine : Status of tab line tabline.1 = ON|OFF tabline.2 = M[+|-]n | [-]n (position; M=middle of screen) tabline.3 = line number within window (only set if TABLINE.1=ON) TABS : Tab column numbers tabs.1 = Tab setting (list or 'INCR n' or both) tabs.2 = List of tab column numbers TABSIn : Expand tabs when reading file (until first ' or ") tabsin.1 = ON|OFF|TABQUOTE tabsin.2 = Tab increment TABSOut : Compress blanks to tabs when writing file tabsout.1 = ON|OFF tabsout.2 = Tab increment TARGet : Info about target that matched last LOCATE/CLOCATE/TFIND target.1 = Line number of start of target target.2 = Column number of start of target target.3 = Line number of end of target target.4 = Column number of end of target target.5 = Text of string target THIGHlight : Highlight strings found by LOCATE/CLOCATE/TFIND thighlight.1 = ON|OFF TIME : Current time and date time.1 = Date in country-dependent format time.2 = Time in hh:mm format time.3 = Date in mm-dd-yy format time.4 = Time in hh:mm:ss.hh format time.5 = Date in yyyy-mm-dd format TIMECHECK : Check for changed file timestamp before writing file timecheck.1 = ON|OFF TOF : Is focus line at top-of-file (or top-of-range) line? tof.1 = ON|OFF TOFEOF : Are TOF and EOF pseudo-lines being displayed? tofeof.1 = ON|OFF TOL : Is focus column at top-of-line (reached zone1-1)? tofeof.1 = ON|OFF TOOLBAR : Display of toolbars toolbar.1 = ON|OFF toolbar.2 = TOP|BOTTOM|BOTH TOOLButton name : Definition of toolbar button toolbutton.1 = Button name toolbutton.2 = Built-in or on-disk bitmap file, or delimited text toolbutton.3 = COND ccc (or null) toolbutton.4 = Delimited text of tooltip and status line help *TOOLButton _[]_* : Definitions of all toolbar buttons toolbutton.i = Name, bitmap/text, conditions, tip/status TOOLSet [TOP|BOTTOM] : Contents of toolset (default=TOP) toolset.1 = TOP|BOTTOM toolset.2 = DEFAULT|USER toolset.3 = Contents of default or user-defined toolset TRAILING : Treatment of trailing blanks trailing.1 = ON|OFF|SINGLE|EMPTY TRANSLATEIn : Convert chars from OEM to ANSI when reading file translatein.1 = NONE|OEMTOANSI TRANSLATEOut : Convert chars from ANSI to OEM when writing file translateout.1 = NONE|ANSITOOEM TRunc : Truncation column number trunc.1 = truncation column number UNDO : Undoing info for current file undo.1 = Levels of undoable changes undo.2 = Levels of redoable changes undo.3 = Memory holding undo info (K bytes) UNDOING : Undoing facility info undoing.1 = ON|OFF undoing.2 = Maximum levels that KEDIT will try to keep in memory undoing.3 = Maximum memory that KEDIT will use to hold undo info (K) UNIQueid : Unique serial number identifier associated with file, view, window uniqueid.1 = Serial number of current file uniqueid.2 = Serial number of current view uniqueid.3 = Serial number of current window VARblank : Will target like /a b/ match text like "a b"? varblank.1 = ON|OFF Verify : Information about verification columns verify.1 = Column number pairs (possibly including H prefix) VERShift : Relative position of screen over file (see LEFT and RIGHT) vershift.1 = [-]n VERSION : KEDIT version info version.1 = KEDIT (DOS or OS/2 text mode) | KEDIT/WINDOWS (Windows) version.2 = Version number version.3 = Revision level and possible additional identifying text version.4 = Date of this version (MMM dd yyyy) Width : Value of WIDTH setting (longest line) width.1 = n (512 to 32000) WINDIR : Fully-qualified names of Windows and Windows system directories windir.1 = e.g., 'C:\WINDOWS' windir.2 = e.g., 'C:\WINDOWS\SYSTEM' WINMARgin : Pixels on left edge of document windows to mark line blocks winmargin.1 = ON|OFF winmargin.2 = n WORD : What is a "word" (for SOS .WORD. and MARK STREAM WORD) word.1 = NONBLANK|ALPHANUM WORDWrap : Add new line if text entered beyond right margin? wordwrap.1 = ON|OFF WRap : Will LOCATE wrap around from end of file wrap.1 = ON|OFF Zone : Left and right zone column numbers zone.1 = Left zone column number zone.2 = Right zone column number
SOS Operands
ADDline Add a blank line below the focus line Alarm Make speaker beep BEEP Same as ALARM BLANKDown Locate next blank line below focus line BLANKUp Locate next blank line above focus line BLOCKEnd (from cmdline) Make curline last/first line of marked block BLOCKStart /(else) Move cursor to last/first line of marked block BOTTOMEdge Move cursor to bottom line of file area (or EOF line) CDn Move cursor one character down (see CURSOR ESCREEN) CLeft Move cursor one character left (see CURSOR ESCREEN) CRight Move cursor one character right (see CURSOR ESCREEN) CUp Move cursor one character up (see CURSOR ESCREEN) CHECK Display checksum of chars in cursor line CURRent Move cursor to current line CURSORAdj Shift cursor line text so left adjusted at cursor column DELBAck Move cursor one character left and delete char there DELBEGin Delete all chars to left of cursor, shift remaining text left DELChar Delete character at cursor position DELEnd Delete all characters from cursor position thru end of line DELLine Delete focus line DELSEL Delete just-marked block or selection DELWord Delete "word" at or to right of cursor DOPREfix Execute any pending prefix commands for current file ENDChar Move cursor to end of cursor line ENDWord Move cursor to last character of current (or next) "word" ERRORBEEP Beep speaker (if SET BEEP ON) EXecute Move cursor to command line, execute command line FIRSTCHar Move cursor to first non-blank character on cursor line FIRSTCOl MOve cursor to first column on cursor line INSTAB Insert blanks from cursor position to next tab position LEFTEdge Move cursor to leftmost column of file area or command line LINEAdd Add a line below focus line (same as SOS ADDLINE) LINEDel Delete the focus line (same as SOS DELLINE) MAKECURR Make cursor line the current line MARGINL Move cursor to left margin column of cursor line MARGINR Move cursor to right margin column of cursor line MOUSEBEEP Beep speaker (if SET MOUSEBEEP ON) PARINDent Move cursor to paragraph indent column of cursor line PREfix Move to first column of prefix area of cursor line QCmnd Move cursor to first column of command line, clear command line QUICKFINDACT Activate the Quick Find toolbar item QUICKFINDB Search backward for the currently displayed Quick Find string QUICKFINDf Search forward for the currently displayed Quick Find string RESTORE Restore cursor to position saved by SOS SAVE RESTORECol Restore cursor to column position saved by SOS SAVECOL RESTORELine Restore cursor to line position saved by SOS SAVELINE RETRIEVEb Cycle backward through command line history RETRIEVEF Cycle forward through command line history RIGHTEdge Move cursor to rightmost column of file area or command line SAVE Save cursor line and column position for SOS RESTORE SAVECol Save cursor column position for SOS RESTORE SAVELine Save cursor line position for SOS RESTORE SETCOLPtr Set column pointer to cursor column SETLeftm Set left margin column to cursor column setrightm No such operand; use: 'set margins' margins.1() column.1() SETTAB Add cursor column to list of tab columns STARTWord Move cursor to first character of current (or preceding) "word" TABB Move cursor backward (left) to nearest tab position TABCmd Move cursor to first column of command line TABCMDB Switch windows backward (previous), move cursor to command line TABCMDF Switch windows forward (next), move cursor to command line TABf Move cursor forward (right) to nearest tab position TABFIELDB Move cursor to first character of current (or previous) field TABFIELDf Move cursor to first character of next field TABWORDB Move cursor backward to first char of "word" to left of cursor TABWORDf Move cursor forward to first char of "word" to right of cursor TOPEdge Move cursor to topmost line of file area (or TOF line)
Targets
Absolute line number targets:
**:**n Absolute file line number
Relative line number targets:
n Relative displacement from focus line (down)
**+**n Relative displacement from focus line (down)
**-n Relative displacement from focus line (up)
***** End of file
+* End of file
**-* Top of file
Named line targets:
**.**name Named line (see SET POINT and prefix command .)
String targets:
// Advance line pointer by one line
**/**str[/] Next line containing occurrence of string
**+/**str[/] Next line containing occurrence of string
**-/**str[/] Previous line containing occurrence of string
**/**str[/] Next line not containing occurrence of string
**+/str[/] Next line not containing occurrence of string
-~/str[/] Previous line not containing occurrence of string
/s1/&/s2/ Next line containing occurrences of both strings
/s1/|**/s2/ Next line containing occurrence of either string
**-/**x'cc'/ Previous line containing hex character (only if SET HEX ON)
Word /str/ Next line containing word
Prefix /str/ Next line starting with string on word boundary
Suffix /str/ Next line ending with string on word boundary
Regexp /str/ Next line containing string matching regular expression
Line class targets (may be prefixed with ~):
BLAnk Blank
SELect n [m] Selection level
NEW New
CHAnged Changed
TAGged Tagged
ALTered Altered
Group targets:
ALL All lines
BLOCK Currently marked block
PARAgraph All lines in focus paragraph
Column targets are similar, except: No named (.) columns
- means right, - means left
- means EOL, -* means TOL
SET operands affecting targets: ARBCHAR, CASE, HEX, STAY, VARBLANK, WRAP
Precedence (highest to lowest): ~ & |
Regular Expressions
? Wildcard character - matches any single character ^ Matches the beginning of a line $ Matches the end of a line (X) Parenthetical expressions - groups expressions for other operations X***** Minimal closure - matches shortest possible string of >= 0 occurrences of X X**@** Maximal closure - matches longest possible string of >= 0 occurrences of X X**+** Minimal plus - matches shortest possible string of >= 1 occurrences of X X**#** Maximal plus - matches longest possible string of >= 1 occurrences of X X^n Power function - matches exactly n occurrences of X **~**X Not function - succeeds only if X isn't matched \c Set cursor position/current column after Edit Find or CLOCATE {X} Tagged expression - when X is matched, value is saved for later reference **&**n Reference to value of nth tagged expression
****x Escape sequence, for \ ( ) [ ] { } ? ~ ^ $ * @ # | : & + \Xnn hex ****nnn octal \b Backspace \f Formfeed \r Carriage return \n Linefeed \t Tab
(X1|X2|...) Alternation - matches X1 or, if X1 doesn't match, matches X2, etc. [class] Definition of a character class - matches any character in class [~class] Definition of a character unclass - matches characters not in class **:**letter Predefined expression
:a [a-zA-Z0-9] Alphanumeric character :b ([\t\x20]#) White space (a group of blanks and tabs) :c [a-zA-Z] Alphabetic character :d [0-9] Digit :z ([0-9]#) Integers (one or more digits) :w ([a-zA-Z]#) String of alphabetic characters
:h (((0x)|)[0-9a-fA-F]#) Hexadecimal numbers
:i ([a-zA-Z_$][a-zA-Z0-9_$]@) C-language identifiers
:n (([0-9]@.[0-9]#)|([0-9]#)) Numbers (possibly including a decimal point)
:q (("["]@")|('[']@')) Quoted string (in 's or "s)
KEXX Operators
Operators are grouped by precedence shown below (highest to lowest).
Operators of equal precedence are evaluated from left to right.
\ Logical NOT (prefix)
Numeric (prefix); same as 0+num
Negate (prefix); same as 0-num
** Exponentiation (whole powers only)
Multiply
/ Divide % Integer divide (divide and return integer part) // Remainder (divide and return remainder; result may be negative)
Add
Subtract
(abuttal) || Concatenate without blank (blank) Concatenate with blank
== Strictly equal (identical) == Not strictly equal
Strictly greater than
<< Strictly less than = << Strictly greater than or equal to (not less than) <<= >> Strictly less than or equal to (not greater than)
= Equal (numerically or when padded, etc.) = >< <> Not equal (greater than or less than)
Greater than
< Less than = < Greater than or equal to (not less than) <= > Less than or equal to (not greater than)
& AND
| Inclusive OR (either, or both) && Exclusive OR (either, but not both)
KEXX Functions
bit = ABBREV(longstring,shortstring[,minlength]) : Abbreviation match num = ABS(number) : Absolute value str = ANSILOWER(string) : Like LOWER() but also handles accented letters str = ANSITOOEM(string) : Convert ANSI to OEM character set str = ANSIUPPER(string) : Like UPPER() but also handles accented letters num = ARG() : Number of arguments bit = ARG(n,E|O) : Nth argument E=exists or O=omitted val = ARG(n) : Nth argument value nul = BEEP() : Beep speaker str = BITAND(string1[,string2[,pad]]) : Logical ANDing of bits str = BITOR(string1[,string2[,pad]]) : Logical ORing of bits str = BITXOR(string1[,string2[,pad]]) : Logical XORing of bits hex = B2X(binary-string) : Binary to hexadecimal str = CENTER(string,length[,pad]) : Center str = CENTRE(string,length[,pad]) : Center for Brits str = CHANGESTR(needle,haystack,newneedle) : Change all occurrences str = CHARIN(fileid[,[start][,length]]) : Read chars from file bit = CHAROUT(fileid,[string][,start]) : Write chars to file bit = CHAROUT(fileid) : Close file num = CHARS(fileid) : Chars remaining to be read from file pos = COMPARE(string1,string2[,pad]) : Position of first mismatched char str = CONDITION(I|C|D|S) : Information about currently trapped condition str = COPIES(string,n) : N copies of string concatenated together num = COUNTSTR(needle,haystack) : Number of occurrences num = C2D(string) : Character to decimal hex = C2X(string) : Character to hexadecimal str = DATATYPE(string) : Returns NUM if valid number, else CHAR bit = DATATYPE(string,A|B|L|M|N|S|U|W|X) : Test for specified datatype A=alphanumeric AZaz09 B=binary 01 L=lowercase az M=mixed case AZaz N=numeric 2.1e6 S=symbol foo.1 U=uppercase AZ W=whole -2 X=hexadecimal 09AFaf str = DATE(B|D|E|J|M|N|O|S|U|W) : Today in specified format (default=Normal) B=base 729637 D=days 249 E=european 06/09/98 J=julian 98249 M=month September N=normal 6 Sep 1998 O=ordered 98/09/06 S=standard 19980906 U=usa 09/06/98 W=weekday Sunday str = DATECONV(date,input,[output]) : Convert date format (see formats above) str = DELIMIT(string1[,string2]) : Wrap delimiter ( /1/ or /1/2/ ) str = DELSTR(string,n[,length]) : Delete chars starting at position n str = DELWORD(string,n[,length]) : Delete words starting at nth word num = DIGITS() : Current NUMERIC DIGITS setting (default=9) str = DOSDIR(filespec[,[output][,search]]) : Info about DOS file(s) output: N=name S=size D=date T=time A=attrs(R|H|S|D|A|-) (default=all) search: D=directories S=system H=hidden (default=none) str = DOSDIR(,[output][,search]) : Next matching file (or null) str = DOSENV(envvar) : Value of DOS environment variable str = D2C(whole-number) : Decimal to character hex = D2X(whole-number) : Decimal to hexadecimal str = ERRORTEXT(n) : Text of KEXX error message number n str = FORMAT(number[,[bef][,[aft]]]) : Format number (digits bef/aft decimal) num = FUZZ() : Current NUMERIC FUZZ setting (default=0) str = INSERT(new,target[,[n][,[length][,pad]]]) : Insert new into target string pos = LASTPOS(needle,haystack[,end]) : Rightmost position str = LEFT(string,length[,pad]) : Leftmost characters from string num = LENGTH(string) : Length of string str = LINEIN(fileid[,[line][,count]]) : Read line from file bit = LINEOUT(fileid,[string]) : Write line to file bit = LINEOUT(fileid) : Close file bit = LINES(fileid) : Any lines remaining to be read from file? str = LONGNAME(fileid) : Windows 95/NT long file name of fileid str = LOWER(string) : Lowercase num = MAX(n1[,n2...n10]) : Maximum number num = MIN(n1[,n2...n10]) : Minimum number str = OEMTOANSI(string) : Convert OEM to ANSI character set str = OVERLAY(new,target[,[n][,[length][,pad]]]) : Overlay new string on target pos = POS(needle,haystack,[start]) : Leftmost position int = RANDOM([max]) : Random number between 0 and max (default=999) int = RANDOM([min][,[max][,seed]]) : Random number between min and max str = REVERSE(string) : Reverse characters (abcd => dcba) str = RIGHT(string,length[,pad]) : Rightmost characters str = SHORTNAME(fileid) : Convert Windows 95/NT long file name to DOS 8.3 name int = SIGN(number) : Sign of number; returns -1, 0, or 1 num = SOURCELINE() : Number of lines in currently-executing macro str = SOURCELINE(n) : Text of nth line in currently-executing macro str = SPACE(string[,[n][,pad]]) : Replace inter-word blanks (default=1,' ') str = STRIP(string[,[L|T|B][,char]]) : Strip leading/trailing/both chars (B,' ') str = SUBSTR(string,start[,[length][,pad]]) : Substring characters str = SUBWORD(string,n[,length]) : Substring words str = SYMBOL(name) : Returns BAD, VAR, or else LIT str = TIME([option]) : Current time (default=N) C=civil 1:00pm H=hours 13 L=long 13:00:00.000000 M=minutes 780 N=normal 13:00:00 S=seconds 46800 str = TRACE() : Query current trace setting str = TRACE([?]A|C|E|F|I|L|N|O|R) : Change trace setting All Command Error Failure Intermediates Labels Negative Off Results str = TRANSLATE(string[,[tableo][,[tablei][,pad]]]) : Translate characters num = TRUNC(number[,n]) : Truncate to integer plus n (default=0) decimal places str = UPPER(string) : Translate lowercase letters to uppercase val = VALUE(name[,newvalue]) : Value of specified symbol [also assign new value] pos = VERIFY(string,reference[,[N|M][,start]]) : Find first Nomatch/Match str = WORD(string,n) : Nth blank-delimited word from string pos = WORDINDEX(string,n) : Character position of beginning of nth word int = WORDLENGTH(string,n) : Length of nth word pos = WORDPOS(phrase,string[,wordstart]) : Word number of phrase in string int = WORDS(string) : Number of words in string str = XRANGE([start][,end]) : Generate string of chars from start to end str = X2B(hex-string) : Convert hexadecimal to binary str = X2C(hex-string) : Convert hexadecimal to character str = X2D(hex-string) : Convert hexadecimal to decimal
Boolean Functions:
bit = AFTER() : Cursor positioned after last non-blank char of cursor field? bit = ALT() : Current file altered since last SAVE? bit = ALTKEY() : Alt key pressed during last keystroke or mouse action? bit = BEFORE() : Cursor positioned before first non-blank char of cursor field? bit = BLANK() : Cursor field completely blank? bit = BLOCK() : Block marked in the current file? bit = BOTTOMEDGE() : Cursor in bottommost line of file area? bit = BUTTON1() : Mouse button 1 is down? bit = BUTTON2() : Mouse button 2 is down? bit = CLASSIC() : INTERFACE CLASSIC in effect? bit = CLIPTEXT() : Any text in Windows clipboard (for possible Paste)? bit = CMDSEL() : Any text on the command line currently selected? bit = COMMAND() : Cursor on the command line? bit = CTRL() : Ctrl key pressed during last keystroke or mouse action? bit = CUA() : INTERFACE CUA in effect? bit = CURRENT() : Cursor on current line? bit = DELSEL() : Selection or command line selection marked? bit = DIR() : Current file a .DIR file? bit = END() : Cursor on last non-blank character of cursor field? bit = EOF() : Cursor on end-of-file line? bit = FILELINE() : Cursor not on command line? bit = FIRST() : Cursor positioned in column 1 of cursor field? bit = FOCUSEOF() : Focus line is end-of-file line? bit = FOCUSTOF() : Focus line is top-of-file line? bit = FULLINP() : Input mode with INPUTMODE FULL in effect? bit = INBLOCK() : Cursor in a marked block? bit = INITIAL() : Profile for first file in ring is running? bit = INPREFIX() : Cursor in the prefix area? bit = INSERTMODE() : Insert mode in effect? bit = INTRUNC() : Cursor not to right of truncation column? bit = LEFTEDGE() : Cursor in leftmost column of file area? bit = LINEINP() : Input mode with INPUTMODE LINE in effect? bit = MODIFIABLE() : Cursor in area of file that can be modified? bit = MOUSEPOSMODIFIABLE() : Mouse in typeable place in file area at last click? bit = MOUSEPOSVALID() : Mouse in cursorable place at last click? bit = MULTWINDOW() : More than one document window exists? bit = NOQUEUE() : No keystrokes queued within Windows waiting to be processed? bit = OEMFONT() : OEM font being used in document windows? bit = PENDING() : Any pending prefix commands? bit = PREFIX() : PREFIX ON or PREFIX NULLS in effect? bit = PREFIXLEFT() : Prefix area displayed on left of window? bit = PROFILE() : Profile for a file being added to ring is executing? bit = RIGHTEDGE() : Cursor in rightmost column of file area? bit = SCROLLLOCK() : ScrollLock in effect? bit = SHADOW() : Cursor on shadow line? bit = SHIFT() : Shift key pressed during last keystroke or mouse action? bit = SHOWPRINTDLG() : Print File toolbar button should show dialog? bit = SPACECHAR() : Character at cursor position is blank? bit = TAB() : Cursor on one of the tab columns? bit = TOF() : Cursor on top-of-file line? bit = TOPEDGE() : Cursor in topmost line of file area? bit = UNTITLED() : Current file an UNTITLED file? bit = VERONE() : Column 1 of current file displayed in column 1 of file area?
KEXX Instructions
ARG [template] Same as PARSE UPPER ARG [template] CALL name [expression [,expression ...]] If name in quotes, only built-in or external function called Optional result returned in special variable RESULT CALL ON condition [NAME trapname] Call on specified condition; variable SIGL contains line number See SIGNAL ON below for conditions CALL OFF condition Cancel CALL ON trap DO [repetitor] [conditional] ; clauses ; END Execute a set of clauses repeatedly DO expr Do so many times DO var = initexpr [TO expr] [BY expr] [FOR maxtimes] Do while value of var is iterated DO FOREVER Do indefinitely (until terminated by LEAVE EXIT RETURN) DO WHILE expr Do while leading evaluation of expr is true DO UNTIL expr Do until trailing evaluation of expr is true DROP name|(namelist) [name|(namelist) ...] Unassign named variables and/or list of vars contained in variable EXIT [expression] Unconditionally leave; optionally return data IF expr THEN clause [ELSE clause] Conditional execution INTERPRET expression Execute expression as though it were a line in macro ITERATE [name] Steps current or named do loop LEAVE [name] Ends current or named do loop NOP Dummy instruction ("no operation") NUMERIC DIGITS [expression] Number of significant digits (default=9; must be <= 50) NUMERIC FUZZ expression Digits, at full precision, to ignore during comparisons (default=0) PARSE [UPPER] origin [template] Assign portions of strings to variables ARG Program/subroutine/function parameters LINEIN Read a line from command line PULL Read a line from command line (unlike REXX; no queue) SOURCE Source of macro being executed (e.g. 'Windows COMMAND foo') VALUE [expr] WITH Parse result of expression VAR name Parse named variable VERSION Query KEXX version (e.g. 'KEXX 5.52 6 Jan 1998') PROCEDURE [EXPOSE name|(namelist) [name|(namelist) ...]] Protect (localize) variables in internal function or subroutine PULL [template] Same as PARSE UPPER PULL RETURN [expression] Return control; like EXIT if no internal routine active Returns result from function; sets RESULT variable from subroutine SAY [expression] Displays a line SELECT ; WHEN expr THEN clause ; ... ; OTHERWISE clause ; END Case-conditional execution; only the first matching case is executed SIGNAL label Pass control to label SIGNAL ON condition [NAME trapname] Trap certain conditions (variable SIGL contains line number) ERROR Command returns positive rc (or negative if FAILURE not enabled) FAILURE Command returns negative return code HALT Attempt to interrupt (Ctrl+Break) NOVALUE Uninitialized variable used SYNTAX Interpretation syntax error SIGNAL OFF condition Cancel SIGNAL ON trap TRACE [+|-|?] [A|C|E|I|L|N|O|R] Control trace output (must SET DEBUGGING ON first)
- = Turn on interactive tracing
- = Turn off interactive tracing ? = Toggle interactive tracing A = All: all clauses and commands traced (displayed) before execution C = Commands: all commands traced, non-zero rc's displayed E = Error: commands with non-zero rc traced after execution F = Failure: commands with negative rc traced after execution I = Intermediates: All + intermediate results L = Labels: display labels as encountered during execution N = Normal=Negative: commands with negative rc traced after execution O = Off, or no argument: nothing traced; prefix actions off R = Results: All + final (not intermediate) results TRACE [number] n = skip next n interactive debug pauses -n = skip next n tracing displays (and interactive pauses)
KEXX vs. REXX
The KEXX language is pretty much like REXX (see my REXX Summary). Following are just a few notes on differences.
KEXX string functions not in Rexx370:
- changestr(needle,haystack,newneedle)
- compare(string1,string2[,pad])
- countstr(needle,haystack)
- delimit(string1[,string2])
- delstr(string,n[,length])
- insert(new,target[,[n][,[length][,pad]]])
- overlay(new,target[,[n][,[length][,pad]]])
KEXX functions not in Cowlishaw's book The Rexx Language (1990):
- ansilower(string)
- ansitooem(string)
- ansiupper(string)
- beep()
- changestr(needle,haystack,newneedle)
- countstr(needle,haystack)
- dateconv(date,inputformat,[outputformat])
- delimit(string1[,string2])
- dosdir([fileid][,[output][,search]])
- dosenv(envvar)
- lower(string)
- oemtoansi(string)
- upper(string)
Comments:
- * ... can be used for whole-line comments
- /* ... */ comments cannot span file lines or be nested
Implied EXTRACTs:
- In REXX, you must code something like:
EXTRACT /LINE/ ; whereami = line.1
In KEXX, you may code this in one step:
whereami = line.1()
Miscellaneous:
- NUMERIC DIGITS is limited to 50
KEDIT vs. XEDIT
KEDIT is a lot like XEDIT (see my XEDIT Summary). Following are just a few notes on key differences.
KEDIT target enhancements:
- Regular expression targets: REGEXP
- Word targets: WORD PREFIX SUFFIX
- Group targets: ALL BLOCK PARAGRAPH
- Line class targets: BLANK NEW CHANGED TAGGED ALTERED SELECT
XEDIT features not supported by KEDIT:
- SET commands: MASK PF SERIAL SPAN SPILL
- Prefix macros
Focus Line vs. Current Line:
- Beware of the difference between the KEDIT "focus" line and "current" line (particularly when writing macros). Use the command SOS MAKECURR to make the focus line the current line.
You are visitorsince 16 September 1998
Copyright © 1998 Rex Swain
E-mail rex@rexswain.com, Web www.rexswain.com
Permission granted to distribute unmodified copies