home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
LPEX.ZIP
/
LPEX.INF
(
.txt
)
next >
Wrap
OS/2 Help File
|
1992-03-30
|
196KB
|
7,865 lines
ΓòÉΓòÉΓòÉ 1. Overview of LPEX. ΓòÉΓòÉΓòÉ
To be added.
ΓòÉΓòÉΓòÉ 2. Help for the Window List window ΓòÉΓòÉΓòÉ
The window list window maintains a list of LPEX windows, and a log of LPEX
messages.
ΓòÉΓòÉΓòÉ 2.1. Help for File ΓòÉΓòÉΓòÉ
Open document or Exit LPEX.
Use the File pull-down to open a new document, to open a document or to Exit
from the LPEX session. document.
ΓòÉΓòÉΓòÉ 2.1.1. Help for "File Operations" ΓòÉΓòÉΓòÉ
The File operations dialog is invoked Open file..., Get a file... and Save
as... menu options.
This dialog can be used to select file(s) from any one directory on any
available FAT or HPFS or NFS drive, or to select a new file on any of these
drives.
Disk Drive
Search Pattern
Directories
Files
Multiple File Select
System Profile
User Profile
Load Macro
Linebreak mode
New button
The next two options apply only for the Save as mode only.
Set Docname
As Displayed
ΓòÉΓòÉΓòÉ <hidden> Help for Disk Drive ΓòÉΓòÉΓòÉ
Drives are selected by using the cursor up and down keys, or by engaging the
pull-down list box to the right. When a different drive is selected, the
left-hand list box is refreshed and the right-hand list box is cleared.
ΓòÉΓòÉΓòÉ <hidden> Help for Search Pattern ΓòÉΓòÉΓòÉ
The search pattern determines which files are listed in the right-hand list
box. To effect a new search pattern, press Enter on the keyboard. Case is
ignored.
The "*" wild card character can be used anywhere to represent an arbitrary
combination of characters. The "?" wild card character can be used anywhere to
represent an arbitrary character. The "." character, if used only at the end
of the search pattern, will limit the list of files to those which do not
contain that character.
Although the combo box is normally used to change drives, you may change the
drive here by typing in the letter followed by a colon (:). Although the
left-hand list box is normally used to change directories, you may change
directories here by typing in the directory name followed by a back-slash (\).
You may enter a specific file name here and press Open, as an alternative to
selecting it in the right-hand list box.
ΓòÉΓòÉΓòÉ <hidden> Help for Directories ΓòÉΓòÉΓòÉ
Directories below the current directory are listed in the left-hand list box.
Above them there may be (from the top):
o The root directory (highlighted if current).
o Directories between the root and the current directory.
o The current directory (highlighted).
A new current directory can be chosen either by selecting an item from the
list with the keyboard and pressing Enter, or by double-clicking on the
required item. Both left-hand and right-hand list boxes will be refreshed.
ΓòÉΓòÉΓòÉ <hidden> Help for Files ΓòÉΓòÉΓòÉ
Files matching the search pattern are listed in the right-hand list box. The
list of files will not be displayed initially unless OPENLIST is ON.
The search for a file can be concluded either by selecting one or more items
and pressing Enter, or by double-clicking on the required item (single
selection mode only).
ΓòÉΓòÉΓòÉ <hidden> Help for Multiple File Select ΓòÉΓòÉΓòÉ
Multiple is an optional checkbox. If the checkbox is not present, then only
single selection is available. When present and checked, more than one item
can be selected from the right-hand listbox.
Note: Multiple Select is only valid for the Open usage of the Files Dialog.
ΓòÉΓòÉΓòÉ <hidden> Help for New button ΓòÉΓòÉΓòÉ
New is an optional pushbutton. If the pushbutton is not present, then only
existing files may be opened. When present, a non-existent file can be
selected by typing the required file name into the search pattern and pressing
New.
ΓòÉΓòÉΓòÉ <hidden> Help for System Profile ΓòÉΓòÉΓòÉ
Select Run system profile to set defaults such as key settings and command
synonyms. This is checked initially, so click on it if you do not wish to set
these defaults when the file is opened.
ΓòÉΓòÉΓòÉ <hidden> Help for User Profile ΓòÉΓòÉΓòÉ
Select Run user profile to personally customize any settings. This is checked
initially, so click on it if you do not wish to personally customize any
settings.
ΓòÉΓòÉΓòÉ <hidden> Help for Load Macro ΓòÉΓòÉΓòÉ
Select Run load macro for to select the parser to be used on the file. This is
checked initially, so click on it if you do not wish to select a parser to be
used on the file.
The parser is determined by the extension of the file opened. You can override
this by entering a value in the DOCTYPE entry field to the right. Thus to treat
a .REX file like a .LX file you would enter LX in the entry field.
ΓòÉΓòÉΓòÉ <hidden> Linebreak Mode ΓòÉΓòÉΓòÉ
Select DOS or CRLF to load files which have been generated on a DOS or OS/2
system. This will require the file to contain the sequence CRLF to delimit
lines of text in the file.
Select UNIX or LF to load files which have been generated on a UNIX or othe
Open System. This will require the file to contain only the character LF to
delimit lines of text in the file.
Note: Normally this will be left unselected to achieve the default of DOS mode
files
ΓòÉΓòÉΓòÉ <hidden> Help for Set Docname ΓòÉΓòÉΓòÉ
Select Set Docname to change the current documnet name to the new name as
entered. If not selected the document name remains the same as it was before
the save is performed.
ΓòÉΓòÉΓòÉ <hidden> Help for As displayed ΓòÉΓòÉΓòÉ
Select As Displayed to save the file in the format it is displayed (formatter,
Style etc). If not selected the file is saved under control of the doctype.LXS
save macro. For example, if your document is in GALLEY mode on the screen, it
will be saved in GALLEY form if you select As displayed.
ΓòÉΓòÉΓòÉ 2.1.2. Help for "Open..." ΓòÉΓòÉΓòÉ
The Open menu item invokes the File Operations dialog. Refer to this section
for further information.
ΓòÉΓòÉΓòÉ 2.1.3. Help for "Exit" ΓòÉΓòÉΓòÉ
All LPEX frame windows are closed. All documents are closed, and the LPEX
session terminated.
ΓòÉΓòÉΓòÉ 2.2. Help for Messages ΓòÉΓòÉΓòÉ
The Messages pull-down enables you to control and manipulate the list of
messages.
ΓòÉΓòÉΓòÉ 2.2.1. Help for "Enabled" ΓòÉΓòÉΓòÉ
When Enabled is checked, any messages generated are displayed in the list of
messages. If the check mark is not present, messages will not be added to the
list. Check and uncheck by clicking on the choice.
ΓòÉΓòÉΓòÉ 2.2.2. Help for "Immediately" ΓòÉΓòÉΓòÉ
When & Immediate is checked, any messages generated are displayed immediately
in the list of messages. If the check mark is not present, messages will be
added to the list when the current document window is updated. Check and
uncheck by clicking on the choice.
ΓòÉΓòÉΓòÉ 2.2.3. Help for "Clear" ΓòÉΓòÉΓòÉ
Clear the list of messages.
ΓòÉΓòÉΓòÉ 2.2.4. Help for "Copy to document" ΓòÉΓòÉΓòÉ
Allows a permanent copy of the list of messages to be made by writing them into
the current document at the cursor position.
ΓòÉΓòÉΓòÉ 2.3. Help for Command ΓòÉΓòÉΓòÉ
Execute LPEX commands and synonyms.
Use the Command pull-down to execute LPEX commands, to set or change synonyms
for commands, to set or change action keys or alter the command recall options.
ΓòÉΓòÉΓòÉ 2.3.1. Help for "Issue command ..." ΓòÉΓòÉΓòÉ
Display LPEX command pop-up.
This dialog displays recently used LPEX commands (if any). Type the command you
require into the lower box and click on Enter to execute that command.
Alternatively type in a command word or no words and press F1 for more
specific help.
To select a previously issued command, press F4 or click on the downarrow at
the right then click on the required command from the list in the box. This
command then appears in the entry field. Click on Enter to execute the command.
You may position at the top or bottom of the list using the PageUp and PageDown
keys respectively. You can also traverse the list using the Up and Down cursor
keys.
The most recently issued command appears at the head of the list of commands.
However, when the next command is issued, the command at the head of the list
is transferred to the bottom of the list; the command box must be scrolled to
bring it back into view.
By default, Shift-F9 will bring up this dialog from a document window.
It is possible to take an exit before the command is executed to a function you
provide to check that a particular command can be executed at this time. This
is done by issuing the SET COMMANDCHECK.
ΓòÉΓòÉΓòÉ 2.3.2. Help for "Set recall options ..." ΓòÉΓòÉΓòÉ
Set Recall Options lets you set the maximum number of recallable commands, and
which commands are recallable. You can ask LPEX to remember commands issued
through the command line, or through pull-downs or through pressing action keys
(or any combination of these). If an identical command already exists in the
buffer only one copy is retained.
By default, only commands issued through the command line are remembered and up
to the last 12 unique commands may be available at any one time.
ΓòÉΓòÉΓòÉ 2.4. Help for Options ΓòÉΓòÉΓòÉ
Change fonts, tabs and other settings. The Options pull-down allows you to
change the current settings of the fonts, tabs, global variables and all other
options which may be SET.
Also use the Options pull-down to customize your use of the window list window.
ΓòÉΓòÉΓòÉ 2.4.1. Help for "Global variables ..." ΓòÉΓòÉΓòÉ
Global variables shows all currently set global variables. Each name is listed
together with its current value.
To change a variable, click first on the name that you wish to alter. Then
click on Change. A second pop-up appears. Enter the required new value for the
variable and then click on Enter.
To set a new variable, click on Add. A second pop-up appears. Enter the
required name and value and then click on Enter.
ΓòÉΓòÉΓòÉ 2.4.2. Help for "Other settings ..." ΓòÉΓòÉΓòÉ
Query and set commands.
Other settings is used to query or set commands. All the commands which can be
queried or set are listed in the upper box of the pop-up window.
To query a command setting, click on the command in the list. The selected
command and its current setting are displayed.
To change a command setting, click on Change. A further pop-up window appears,
prompting for the new setting. Replace the existing setting with the new
setting. Then click on Enter.
For help on a specific command, click on the command in the list, then click on
the Help button rather than using F1.
ΓòÉΓòÉΓòÉ 2.4.3. Help for "Minimize on use" ΓòÉΓòÉΓòÉ
When this pull-down item is checked, then the activation of the message window,
or of any document or view window, will cause the window list window to be
minimized.
ΓòÉΓòÉΓòÉ 2.5. Help for Window ΓòÉΓòÉΓòÉ
Use Window to perform actions on the selected entries (windows) in the list of
windows, and to customize the list of windows to your preferrence.
ΓòÉΓòÉΓòÉ 2.5.1. Help for "Show" ΓòÉΓòÉΓòÉ
The selected windows are restored and made visible. The first such window is
also activated.
ΓòÉΓòÉΓòÉ 2.5.2. Help for "Hide" ΓòÉΓòÉΓòÉ
The selected windows are hidden.
ΓòÉΓòÉΓòÉ 2.5.3. Help for "Minimize" ΓòÉΓòÉΓòÉ
The selected windows are minimized.
ΓòÉΓòÉΓòÉ 2.5.4. Help for "Close" ΓòÉΓòÉΓòÉ
The selected windows are closed. If the message window entry is selected, then
the LPEX session will be terminated.
ΓòÉΓòÉΓòÉ 2.5.5. Help for "Minimize all LPEX" ΓòÉΓòÉΓòÉ
All LPEX frame windows are minimized as one. The window list window is also
minimized.
ΓòÉΓòÉΓòÉ 2.5.6. Help for "Select all" ΓòÉΓòÉΓòÉ
All entries (windows) in the list of windows are selected. If there is more
than one entry, then multiple selection will be enforced, and you may need to
reselect single selection mode later if that choice was previously active.
ΓòÉΓòÉΓòÉ 2.5.7. Help for "Deselect all" ΓòÉΓòÉΓòÉ
All entries (windows) in the list of windows are deselected.
ΓòÉΓòÉΓòÉ 2.5.8. Help for "Multiple selection" ΓòÉΓòÉΓòÉ
When this pull-down item is checked, each entry (window) in the list of windows
is selected or deselected independently of all other entries. This allows more
than one entry to be selected for subsequent action.
When not checked, any selection of an entry causes all other entries to be
automatically deselected, such that only one entry at most is ever selected.
The status of this item may be affected by selection.
ΓòÉΓòÉΓòÉ 2.5.9. Help for "Sort by order opened" ΓòÉΓòÉΓòÉ
The entries in the list of windows are sorted according to the order in which
document windows were opened. All views for a given document are listed
together. The message window is always at the top of the list.
Each document or view window is listed as the document number, the view number,
the view name and finally the fully qualified document name. If the document
number is between 1 and 9, then you may scroll directly to that entry by typing
the number.
ΓòÉΓòÉΓòÉ 2.5.10. Help for "Sort by window name" ΓòÉΓòÉΓòÉ
The entries in the list of windows are sorted according to the document and
view names. All views for a given document are listed together. The message
window is always at the top of the list.
Each document or view window is listed as the file name part of the document
name, followed by the view name, followed by the rest of the path (if any) from
the document name.
ΓòÉΓòÉΓòÉ <hidden> The "Window List" Window ΓòÉΓòÉΓòÉ
The window list window is an independent frame window which lists all other
current LPEX frame windows: that is the message window, and all document and
view windows.
From the window list window, various window-related actions may be performed on
the listed windows.
The window list window appears in the Presentation Manager task list, and may
be minimized or closed at any time without loss of any data. LPEX will
automatically remember the last position and size used for the window list
window, and your preferred pull-down settings.
ΓòÉΓòÉΓòÉ <hidden> Help for the List of Windows ΓòÉΓòÉΓòÉ
Entries in the list of LPEX windows may be selected (highlighted) and
deselected by using:
o mouse button 1, or
o the cursor keys and the space bar, or
o the Edit pull-down.
Actions may be performed on selected windows by using the Actions pull-down.
The list may be viewed in different ways by using the View pull-down. The
information listed depends on how the list is sorted.
One of the following symbols may appear after a window name, to indicate the
window status. If there is no symbol, then the window is restored and visible.
Maximized
Minimized
Hidden
Use of the window list window may be customized by using the Options
pull-down.
ΓòÉΓòÉΓòÉ <hidden> Help for the Log of Messages ΓòÉΓòÉΓòÉ
A number of messages is retained and listed in this window. The Messages
pull-down manipulates this list.
ΓòÉΓòÉΓòÉ 3. Help for Document and View Windows ΓòÉΓòÉΓòÉ
The document window displays a view of a document. Although you may have many
document windows on screen at once, only one will be the active window. You may
switch between document windows by clicking on any visible part of the window
you wish to make active. Alternatively, you may select the document you require
by choosing Go to Document/view selector and then selecting the document.
Below the menu bar is a status line, and at the bottom of the window is a
message line for dynamic information.
ΓòÉΓòÉΓòÉ 3.1. Help for File ΓòÉΓòÉΓòÉ
Open, print, save and exit documents.
Use the File pull-down to open a new or existing document, print, save and exit
documents, include a document within another document and move between views
and documents.
ΓòÉΓòÉΓòÉ 3.1.1. Help for "File Operations" ΓòÉΓòÉΓòÉ
The File operations dialog is invoked Open file..., Get a file... and Save
as... menu options.
This dialog can be used to select file(s) from any one directory on any
available FAT or HPFS or NFS drive, or to select a new file on any of these
drives.
Disk Drive
Search Pattern
Directories
Files
Multiple File Select
System Profile
User Profile
Load Macro
Linebreak mode
New button
The next two options apply only for the Save as mode only.
Set Docname
As Displayed
ΓòÉΓòÉΓòÉ <hidden> Help for Disk Drive ΓòÉΓòÉΓòÉ
Drives are selected by using the cursor up and down keys, or by engaging the
pull-down list box to the right. When a different drive is selected, the
left-hand list box is refreshed and the right-hand list box is cleared.
ΓòÉΓòÉΓòÉ <hidden> Help for Search Pattern ΓòÉΓòÉΓòÉ
The search pattern determines which files are listed in the right-hand list
box. To effect a new search pattern, press Enter on the keyboard. Case is
ignored.
The "*" wild card character can be used anywhere to represent an arbitrary
combination of characters. The "?" wild card character can be used anywhere to
represent an arbitrary character. The "." character, if used only at the end
of the search pattern, will limit the list of files to those which do not
contain that character.
Although the combo box is normally used to change drives, you may change the
drive here by typing in the letter followed by a colon (:). Although the
left-hand list box is normally used to change directories, you may change
directories here by typing in the directory name followed by a back-slash (\).
You may enter a specific file name here and press Open, as an alternative to
selecting it in the right-hand list box.
ΓòÉΓòÉΓòÉ <hidden> Help for Directories ΓòÉΓòÉΓòÉ
Directories below the current directory are listed in the left-hand list box.
Above them there may be (from the top):
o The root directory (highlighted if current).
o Directories between the root and the current directory.
o The current directory (highlighted).
A new current directory can be chosen either by selecting an item from the
list with the keyboard and pressing Enter, or by double-clicking on the
required item. Both left-hand and right-hand list boxes will be refreshed.
ΓòÉΓòÉΓòÉ <hidden> Help for Files ΓòÉΓòÉΓòÉ
Files matching the search pattern are listed in the right-hand list box. The
list of files will not be displayed initially unless OPENLIST is ON.
The search for a file can be concluded either by selecting one or more items
and pressing Enter, or by double-clicking on the required item (single
selection mode only).
ΓòÉΓòÉΓòÉ <hidden> Help for Multiple File Select ΓòÉΓòÉΓòÉ
Multiple is an optional checkbox. If the checkbox is not present, then only
single selection is available. When present and checked, more than one item
can be selected from the right-hand listbox.
Note: Multiple Select is only valid for the Open usage of the Files Dialog.
ΓòÉΓòÉΓòÉ <hidden> Help for New button ΓòÉΓòÉΓòÉ
New is an optional pushbutton. If the pushbutton is not present, then only
existing files may be opened. When present, a non-existent file can be
selected by typing the required file name into the search pattern and pressing
New.
ΓòÉΓòÉΓòÉ <hidden> Help for System Profile ΓòÉΓòÉΓòÉ
Select Run system profile to set defaults such as key settings and command
synonyms. This is checked initially, so click on it if you do not wish to set
these defaults when the file is opened.
ΓòÉΓòÉΓòÉ <hidden> Help for User Profile ΓòÉΓòÉΓòÉ
Select Run user profile to personally customize any settings. This is checked
initially, so click on it if you do not wish to personally customize any
settings.
ΓòÉΓòÉΓòÉ <hidden> Help for Load Macro ΓòÉΓòÉΓòÉ
Select Run load macro for to select the parser to be used on the file. This is
checked initially, so click on it if you do not wish to select a parser to be
used on the file.
The parser is determined by the extension of the file opened. You can override
this by entering a value in the DOCTYPE entry field to the right. Thus to treat
a .REX file like a .LX file you would enter LX in the entry field.
ΓòÉΓòÉΓòÉ <hidden> Linebreak Mode ΓòÉΓòÉΓòÉ
Select DOS or CRLF to load files which have been generated on a DOS or OS/2
system. This will require the file to contain the sequence CRLF to delimit
lines of text in the file.
Select UNIX or LF to load files which have been generated on a UNIX or othe
Open System. This will require the file to contain only the character LF to
delimit lines of text in the file.
Note: Normally this will be left unselected to achieve the default of DOS mode
files
ΓòÉΓòÉΓòÉ <hidden> Help for Set Docname ΓòÉΓòÉΓòÉ
Select Set Docname to change the current documnet name to the new name as
entered. If not selected the document name remains the same as it was before
the save is performed.
ΓòÉΓòÉΓòÉ <hidden> Help for As displayed ΓòÉΓòÉΓòÉ
Select As Displayed to save the file in the format it is displayed (formatter,
Style etc). If not selected the file is saved under control of the doctype.LXS
save macro. For example, if your document is in GALLEY mode on the screen, it
will be saved in GALLEY form if you select As displayed.
ΓòÉΓòÉΓòÉ 3.1.2. Help for "Open..." ΓòÉΓòÉΓòÉ
The Open menu item invokes the File Operations dialog. Refer to this section
for further information.
ΓòÉΓòÉΓòÉ 3.1.3. Help for "Save" ΓòÉΓòÉΓòÉ
Save a document.
Save saves the current document with its current name and path. The document
remains displayed on the screen.
ΓòÉΓòÉΓòÉ 3.1.4. Help for "Save as ..." ΓòÉΓòÉΓòÉ
Save document using new name.
Save as saves a copy of the current document with a different name. The File
Operations dialog is used to allow you to enter a filename or select, from the
file, list and existing file.
The As displayed option and Set Docname option may be used as required.
ΓòÉΓòÉΓòÉ 3.1.5. Help for "Get ..." ΓòÉΓòÉΓòÉ
Insert document within current document.
Get includes a document within the current document at the position of the text
cursor, without overwriting the existing data. The File Operations dialog is
used to allow you to enter a filename or select, from the file, list and
existing file.
ΓòÉΓòÉΓòÉ 3.1.6. Help for "Print" ΓòÉΓòÉΓòÉ
Print document.
Print prints the active document in the same format as is normally held on
disk.
ΓòÉΓòÉΓòÉ 3.1.7. Help for "Print as shown" ΓòÉΓòÉΓòÉ
Print the active document in the same format as currently displayed.
Print as shown prints the active document, in the same format as displayed in
the window for the current view. For example, if your document is shown in the
window in GALLEY mode, the GALLEY version (that is without the tags document)
will be printed.
ΓòÉΓòÉΓòÉ 3.1.8. Help for "File -Save&Quit" ΓòÉΓòÉΓòÉ
Save&Quit issues a SAVE command followed by a QQUIT command. This sequence
ensures that the file is saved and exited without any prompting from the user.
ΓòÉΓòÉΓòÉ 3.1.9. Help for "Open new view" ΓòÉΓòÉΓòÉ
Create new view.
Open new view creates a new view for the current document.
ΓòÉΓòÉΓòÉ 3.1.10. Help for "Close this view" ΓòÉΓòÉΓòÉ
Close view of active document.
Close this view closes the active view of a document. If there are other views
of the document, the next view in the sequence becomes the active view. If
there are no other views for the current document, you will be asked if you
wish to close the document. If so, the last-used view of the next opened
document in the sequence of opened documents becomes the active view.
If there are no other views or opened documents, the LPEX window becomes
active.
If an attempt is made to close the only open view of a document to which
changes have been made, a pop-up window offers the chance to save the changes
before closing.
ΓòÉΓòÉΓòÉ 3.1.11. Help for "Exit from document" ΓòÉΓòÉΓòÉ
Leave document.
Exit from document exits the document and closes the document window if no
changes have been made. If any alterations have occurred, a pop-up window gives
the option to either save the changes before closing the document window,
abandon the changes and close the document window or return to the document
window by cancelling the exit command.
ΓòÉΓòÉΓòÉ 3.2. Help for Edit ΓòÉΓòÉΓòÉ
Act upon block of text.
Use the Edit pull-down to carry out actions on blocks of text. You can copy,
move or delete a marked block of text, convert a block into upper or lowercase
and perform clipboard operations such as copy, cut and paste.
ΓòÉΓòÉΓòÉ 3.2.1. Help for "Find and Change Text..." ΓòÉΓòÉΓòÉ
FIND CHANGE TEXTlocates a string of text and/or changes it to another string.
This dialog is modeless and as such may remain throughout the LPEX session.
The function of this dialog is split into three parts.
FIND This is the basic "search" method. The string is entered in the
first entryfield and either the FIND or FIND ALL buttons are used to
process the request.
CHANGE This is the basic "search and replace" method. The "search" is
entered as for FIND and the replacement string is entered into the
second entryfield. THe FIND button can be used to locate the first
occurrence of the search string The CHANGE or CHANGE ALL buttons are
used to replace the first only or all occurrences respectively.
CHANGE then FIND This method of "search and replace" provides the greatest
degree of flexibility.
The arguments are entered as for CHANGE but the first button pressed
must be the "CHANGE then FIND" button. This will search for the
first occurrence of the search string, and the dialog set to CHANGE
then FIND mode. Further button pressing are as follows
CHANGE then FIND the found text is replaced and the next occurrence of the
search string is located.
FIND the found text is NOT replaced and the next occurrence of the
search string is located.
CANCEL The CHANGE then FIND porcess is terminated immediately and the
dialog is reset to the normal mode.
Whilst in this mode of operation any other LPEX function is
possible - even the changing of documents. - but these functions
should be used with great care. The idea of this flexibility is
to allow minor editing functions on the text in the neighbourhood
of the found text before replacing it or skipping to the next
occurrence.
If no documents are open then then dialog is hidden. You may set the
following options for FIND or CHANGE.
Case:
Ignore the first occurrence of the string will be found, regardless of
whether it is in uppercase, lowercase or a mixture of both.
Respect the string searched for is exactly as it is entered in the pop-up
window.
Visible only the string will only be found if it is in data which is
displayed.
Mark found text the string will be character BLOCK marked.
Direction
Forward the data will be searched from the current position forwards
towards the end of the document. If the function is FIND and the
string is not found before the end of the document, the search
recommences at the beginning of the document up to the current
position.
Backward the data will be searched backwards for the first occurrence of
the string. The search starts immediately before the position of
the text cursor and works backwards toward the beginning of the
document. If necessary the search will continue from the end of
the document.
This option is not valid for CHANGE functions.
Function options.
Find search for the next occurence.
Find all find all occurences and display only those lines.
Change Change all occurences in the Change range selected.
Change then find Change the current occurence then find the next occurence.
When this function has been selected the title of the dialog is
changed to that of the button. Certain of the other buttons are
disabled. The Cancel button is used to restore the dialog to
normal mode.
Cancel This button normally dismisses the dialog except when the dialog
is in Change then Find mode.
ΓòÉΓòÉΓòÉ 3.2.2. Help for Undo ΓòÉΓòÉΓòÉ
Undo changes made in document.
Use the Undo pull-down to undo changes made to a document, take checkpoints,
and set undo options.
ΓòÉΓòÉΓòÉ 3.2.3. Help for "Undo last set of changes" ΓòÉΓòÉΓòÉ
Undo last set of changes.
Undo last set of changes returns the document to the state it was in before the
last set of alterations was made. A checkpoint is taken and a copy of the
document is saved. The number of sets of changes which can be undone is
determined by the UNDO command options.
When no more changes can be undone (that is, when the number specified in the
UNDO command is reached), a further call to "undo last set of changes" will
undo the previous undo. Thereafter, further calls to "undo last set of
changes" will eventually return the document to its state before the first undo
occurred.
ΓòÉΓòÉΓòÉ 3.2.4. Help for "Take a checkpoint" ΓòÉΓòÉΓòÉ
Record changes since last save.
Take a checkpoint records the changes made to a document since it was last
saved. This is the point to which "undo last set of changes" is able to undo
changes.
ΓòÉΓòÉΓòÉ 3.2.5. Help for "Set undo options ..." ΓòÉΓòÉΓòÉ
Number of undoable checkpoints.
Set undo options specifies how may checkpoints (up to 25) can be undone. To
enable automatic checkpointing, select Automatic checkpoint. To take manual
checkpoints, select Manual checkpoint.
ΓòÉΓòÉΓòÉ 3.2.6. Help for Clipboard ΓòÉΓòÉΓòÉ
(No help exists.)
ΓòÉΓòÉΓòÉ 3.2.7. Help for "Copy to clipboard" ΓòÉΓòÉΓòÉ
Copy marked block into clipboard.
Copy to clipboard copies the current marked block into the clipboard. Once in
the clipboard text may be pasted (copied) into any PM application or into a
dialog box).
Note that LPEX will not allow rectangular blocks to be copied to the clipboard
- only character and element blocks.
PROFSYS.LX sets up the Ctrl-Ins key to perform this function.
ΓòÉΓòÉΓòÉ 3.2.8. Help for "Cut to clipboard" ΓòÉΓòÉΓòÉ
Cut (move) marked block to clipboard.
Cut to clipboard works just like Copy to clipboard except that the marked block
is then deleted from the document.
Note that LPEX will not allow rectangular blocks to be copied to the clipboard
- only character and element blocks.
PROFSYS.LX sets up the Shift-Del key to perform this function.
ΓòÉΓòÉΓòÉ 3.2.9. Help for "Paste from clipboard" ΓòÉΓòÉΓòÉ
Copy clipboard contents into document.
Paste from clipboard copies the current clipboard contents into the current
document at the current position. Since the clipboard is global to all PM
applications this lets LPEX copy text from other applications into LPEX
documents.
If the clipboard is empty or does not contain text, LPEX will display an error
message.
PROFSYS.LX sets up the Shift-Ins key to perform this function.
ΓòÉΓòÉΓòÉ 3.2.10. Help for Block ΓòÉΓòÉΓòÉ
(No help exists.)
ΓòÉΓòÉΓòÉ 3.2.11. Help for "Copy block" ΓòÉΓòÉΓòÉ
Duplicate marked block.
Copy block duplicates a marked block at the position of the text cursor. To
copy a block within the current document, mark the block and move the text
cursor to the required destination for the copy before selecting Copy block
from the Edit pull-down.
To copy a block from the current document into a different document, mark the
desired block in the current document and then use the Go to document/view
selector choice on the File pull-down to transfer to the other document. Place
the text cursor at the block's required destination then choose Copy block from
the Edit pull-down.
Copying does not erase the original marked block from the document.
ΓòÉΓòÉΓòÉ 3.2.12. Help for "Move block" ΓòÉΓòÉΓòÉ
Move a marked block.
Move block moves a marked block from its original position to the position of
the text cursor. To move a block within the current document, mark the block
and move the text cursor to the required destination before selecting Move
block from the Edit pull-down.
To move a block from the current document into a different document, mark the
desired block in the current document and then use the Go to document/view
selector choice on the File pull-down to transfer to the other document. Place
the text cursor at the block's required destination, then choose Move block
from the Edir pull-down.
Moving erases the marked block from the original document.
ΓòÉΓòÉΓòÉ 3.2.13. Help for "Delete block" ΓòÉΓòÉΓòÉ
Erase marked block.
Delete a block erases a marked block from the current document. Any remaining
text moves up to fill the gap created.
ΓòÉΓòÉΓòÉ 3.2.14. Help for "Uppercase block" ΓòÉΓòÉΓòÉ
Convert characters to upper case.
Uppercase block converts all characters in a marked block into upper case.
ΓòÉΓòÉΓòÉ 3.2.15. Help for "Lowercase block" ΓòÉΓòÉΓòÉ
Convert characters to lower case.
Lowercase block converts all characters in a marked block into lower case.
ΓòÉΓòÉΓòÉ 3.2.16. Help for "Unmark block" ΓòÉΓòÉΓòÉ
Clears a previously marked block.
Unmark block clears any currently set block.
ΓòÉΓòÉΓòÉ 3.2.17. Help for "Name a mark ..." ΓòÉΓòÉΓòÉ
Place a mark in a document.
Name a mark allows a mark to be placed in a document at the position of the
text cursor. Type the mark name into the pop-up window and click on Enter.
Marks are not saved with documents. Mark names may not contain a space.
ΓòÉΓòÉΓòÉ 3.2.18. Help for Find ΓòÉΓòÉΓòÉ
Locate specified parts of the document.
Use the Find pull-down to locate a string of text or an element, find and
replace a string of text, find the beginning and end of a block and to set
marks within a document.
ΓòÉΓòÉΓòÉ 3.2.19. Help for "Start of block" ΓòÉΓòÉΓòÉ
Move cursor to marked block.
Start of block moves the text cursor to the first character of a marked block.
ΓòÉΓòÉΓòÉ 3.2.20. Help for "End of block" ΓòÉΓòÉΓòÉ
Move cursor to last character in block.
End of block moves the text cursor to the last character in a marked block.
ΓòÉΓòÉΓòÉ 3.2.21. Help for "Element number ..." ΓòÉΓòÉΓòÉ
Move cursor to specific element number.
Element number moves the text cursor to the beginning of the "nth" element in
the document. Type the element number you wish to find into the pop-up window.
ΓòÉΓòÉΓòÉ 3.2.22. Help for "Named mark ..." ΓòÉΓòÉΓòÉ
Move cursor to specified mark.
Named mark moves the text cursor to a mark previously placed in a document. All
marks currently set in the document are listed in the pop-up window. Select a
specific mark by clicking on it then clicking on Enter.
ΓòÉΓòÉΓòÉ 3.3. Help for Command ΓòÉΓòÉΓòÉ
Execute LPEX commands and synonyms.
Use the Command pull-down to execute LPEX commands, to set or change synonyms
for commands, to set or change action keys or alter the command recall options.
ΓòÉΓòÉΓòÉ 3.3.1. Help for "Issue command ..." ΓòÉΓòÉΓòÉ
Display LPEX command pop-up.
This dialog displays recently used LPEX commands (if any). Type the command you
require into the lower box and click on Enter to execute that command.
Alternatively type in a command word or no words and press F1 for more
specific help.
To select a previously issued command, press F4 or click on the downarrow at
the right then click on the required command from the list in the box. This
command then appears in the entry field. Click on Enter to execute the command.
You may position at the top or bottom of the list using the PageUp and PageDown
keys respectively. You can also traverse the list using the Up and Down cursor
keys.
The most recently issued command appears at the head of the list of commands.
However, when the next command is issued, the command at the head of the list
is transferred to the bottom of the list; the command box must be scrolled to
bring it back into view.
By default, Shift-F9 will bring up this dialog from a document window.
It is possible to take an exit before the command is executed to a function you
provide to check that a particular command can be executed at this time. This
is done by issuing the SET COMMANDCHECK.
ΓòÉΓòÉΓòÉ 3.3.2. Help for "Set synonyms ..." ΓòÉΓòÉΓòÉ
Display, set or change synonyms.
Set synonyms shows all currently set synonyms. Each synonym is listed together
with the minimum number of characters which must be entered and its LPEX
command.
To change a synonym, click first on the synonym that you wish to alter. Then
click on Change. A second pop-up appears. Enter the required new value for the
synonym and then click on Enter. You are returned to the document.
To set a new synonym, click on Add. A second pop-up appears. Enter the required
name and value and then click on Enter.
ΓòÉΓòÉΓòÉ 3.3.3. Help for "Set action keys ..." ΓòÉΓòÉΓòÉ
Display list of assigned action keys.
Set action keys displays a scrollable list of the actions assigned to keys,
combinations of keys and mouse buttons. Keys to which actions have been
assigned are Ctrl key combinations, Alt key combinations and Function keys.
The assigned actions are LPEX commands.
The assigned action defaults are determined by the profiles and load macro used
when a file is opened. The actions assigned for GML documents are different
from those assigned for C programs.
To change an assigned action, click on the required action then click on
Change. Type the new action in the secondary pop-up window and click on Enter.
To set a new action key, click on Add. A second pop-up appears. Enter the
required name and value and then click on Enter.
ΓòÉΓòÉΓòÉ 3.3.4. Help for "Set recall options ..." ΓòÉΓòÉΓòÉ
Set Recall Options lets you set the maximum number of recallable commands, and
which commands are recallable. You can ask LPEX to remember commands issued
through the command line, or through pull-downs or through pressing action keys
(or any combination of these). If an identical command already exists in the
buffer only one copy is retained.
By default, only commands issued through the command line are remembered and up
to the last 12 unique commands may be available at any one time.
ΓòÉΓòÉΓòÉ 3.4. Help for Options ΓòÉΓòÉΓòÉ
Change fonts, tabs and other settings. The Options pull-down allows you to
change the current settings of the fonts, tabs, global variables and all other
options which may be SET.
ΓòÉΓòÉΓòÉ 3.4.1. Help for "Fonts ..." ΓòÉΓòÉΓòÉ
Allows alteration of colors and typestyle.
Fonts allows both the background and foreground colors of certain items to be
set. The Fonts pop-up window displays the settable items in a box on the left,
and the fonts available for background and foreground in a box on the right.
First click on the item to be changed, then click on the required foreground
and/or background color.
The choice of type faces available appears in the Face box. These will vary
according to the category of document.
Choose Underline if you require all characters to be continuously underlined.
Choose Reverse if you wish to reverse the effect of your selection (such that
red/white is displayed white/red and so forth).
An example of the selected font shows the result of your selections before you
commit to them by choosing Change.
ΓòÉΓòÉΓòÉ 3.4.2. Help for "Fontsize ->" ΓòÉΓòÉΓòÉ
Select fontsize.
Fontsize allows the user to select a desired font size from the menu presented.
The list if fonts is determined dynamically when the option is first selected
and is the definitive list which that particular display and level of OS/2 AVIO
supports. The current fontsize is checked.
ΓòÉΓòÉΓòÉ 3.4.3. Help for "Tab settings ..." ΓòÉΓòÉΓòÉ
Set tab stops.
Tab settings allows tabulation stops to be set in a document. Type, into the
upper box of the pop-up window, the column numbers at which tab stops are
required. Use spaces to separate the column numbers.
To set tab stops at equal distances across a document, delete the existing
setting and then enter a number into the lower box in the pop-up window. If,
for example, the number five is entered, tab stops will be set every five
columns.
ΓòÉΓòÉΓòÉ 3.4.4. Help for "Global variables ..." ΓòÉΓòÉΓòÉ
Global variables shows all currently set global variables. Each name is listed
together with its current value.
To change a variable, click first on the name that you wish to alter. Then
click on Change. A second pop-up appears. Enter the required new value for the
variable and then click on Enter.
To set a new variable, click on Add. A second pop-up appears. Enter the
required name and value and then click on Enter.
ΓòÉΓòÉΓòÉ 3.4.5. Help for "Other settings ..." ΓòÉΓòÉΓòÉ
Query and set commands.
Other settings is used to query or set commands. All the commands which can be
queried or set are listed in the upper box of the pop-up window.
To query a command setting, click on the command in the list. The selected
command and its current setting are displayed.
To change a command setting, click on Change. A further pop-up window appears,
prompting for the new setting. Replace the existing setting with the new
setting. Then click on Enter.
For help on a specific command, click on the command in the list, then click on
the Help button rather than using F1.
ΓòÉΓòÉΓòÉ 3.4.6. Help for Status Line ΓòÉΓòÉΓòÉ
This toggle will show or hide the file Status line at the top of this window.
ΓòÉΓòÉΓòÉ 3.4.7. Help for Message Line ΓòÉΓòÉΓòÉ
This toggle will show or hide the Message line at the bottom of this window.
ΓòÉΓòÉΓòÉ 3.5. Help for Window ΓòÉΓòÉΓòÉ
Use the Window pull-down to show the window list window or to perform selected
actions on all LPEX windows.
ΓòÉΓòÉΓòÉ 3.5.1. Help for "Window list" ΓòÉΓòÉΓòÉ
Shows the window list window. From the window list window, various
window-related actions may be performed on the listed windows.
Selecting this option will restore the window list window regardless of its
current state.
ΓòÉΓòÉΓòÉ 3.5.2. Help for Next ΓòÉΓòÉΓòÉ
Show a different document, or a different view of a document.
ΓòÉΓòÉΓòÉ 3.5.3. Help for "Document" ΓòÉΓòÉΓòÉ
Show a different document.
Next Document shows the next in the sequence of open documents.
ΓòÉΓòÉΓòÉ 3.5.4. Help for "View" ΓòÉΓòÉΓòÉ
Show a different view of the current document.
Next View shows the next in the sequence of views of the current document.
ΓòÉΓòÉΓòÉ 3.5.5. Help for Previous ΓòÉΓòÉΓòÉ
Show a different document, or a different view of a document.
ΓòÉΓòÉΓòÉ 3.5.6. Help for "Document" ΓòÉΓòÉΓòÉ
Show a different document.
Previous Document shows the one before the current one in the sequence of open
documents.
ΓòÉΓòÉΓòÉ 3.5.7. Help for "View" ΓòÉΓòÉΓòÉ
Show a different view of the current document.
Previous View shows the one before the current one in the sequence of views of
the current document.
ΓòÉΓòÉΓòÉ <hidden> The "Window List" Window ΓòÉΓòÉΓòÉ
The window list window is an independent frame window which lists all other
current LPEX frame windows: that is the message window, and all document and
view windows.
From the window list window, various window-related actions may be performed on
the listed windows.
The window list window appears in the Presentation Manager task list, and may
be minimized or closed at any time without loss of any data. LPEX will
automatically remember the last position and size used for the window list
window, and your preferred pull-down settings.
ΓòÉΓòÉΓòÉ 4. Commands ΓòÉΓòÉΓòÉ
LPEX commands are used to create document windows and views; to close them; to
locate and/or change the contents of the document. LPEX commands fall into
three catagories-
Native commands These commands are built into the base LPEX product and are
listed in this section.
External Commands These commands are programs compiled as Dynamic Link Library
programs.
They interface with LPEX using the commands defined in the LPEX
application programming interface. Currently only the C program
interface is supported, although it is quite to write an interface
module to convert commands written in another language to C format
commands.
Macros These are REXX programs written to run under the REXX interpreter
within the LPEX environment. By default commands are interpreted as
LPEX commands which can themselves fall into any of the three
categories of LPEX command.
The natives commands follow-
ΓòÉΓòÉΓòÉ 4.1. ADD ΓòÉΓòÉΓòÉ
Add one or more blank lines.
ADD adds one or more lines of elements, after the current element (or sequence
of flowed elements). Each new element consists of a single blank.
To add an element at the top of the document (before the first element), move
to the first character in the document and then use SPLITJOIN to create a new
blank element.
Syntax: ADD [n]
Parameters: n - the number of elements to be added (default one)
Return codes:
-1 invalid number specified
5 document is read-only
ΓòÉΓòÉΓòÉ 4.2. ALARM ΓòÉΓòÉΓòÉ
Produce a tone on the speaker.
ALARM sounds a tone on the speaker. The default values are set by the SET
BEEPTONE and SET BEEPLENGTH commands.
Syntax: ALARM [tone duration]
Parameters:
tone the frequency of the desired beep in hertz, in the range 50
through 20,000 (default 440)
duration the length of sound in hundredths of a second, in the range zero
through 1000 (default 20)
ΓòÉΓòÉΓòÉ 4.3. ALL ΓòÉΓòÉΓòÉ
Show all (or specific) elements.
ALL shows all elements, beginning at the top of the document. If a parameter is
given, all the elements which would be shown if that command was issued
repeatedly are shown. For example,
ALL REPEAT 50 NEXT
will show every 50th element.
Syntax: ALL [command]
Parameters: command - specifies the elements to be shown
ΓòÉΓòÉΓòÉ 4.4. BEGIN ΓòÉΓòÉΓòÉ
Move to start of current element sequence.
BEGIN moves the current data position to the beginning of the current sequence
of elements.
Syntax: BEGIN
Return codes:
-1 invalid parameter (no parameters are permitted)
1 document is empty (no move possible)
ΓòÉΓòÉΓòÉ 4.5. BLOCK ΓòÉΓòÉΓòÉ
Execute block operations (COPY, FIND etc.).
BLOCK carries out block operations according to the specified parameter.
Syntax: BLOCK command
Parameters: command - any of the following:
CLEAR
Clears any currently set block.
COPY
Copies the block to the current position, leaving the original
block at its original position. The block definition moves with
the copied block, and the current position is moved to the start
of the copied block.
CLEAR may also be specified, to unmark the block once the
operation has been completed.
If a character string is being copied, the characters are copied
before the current position. If a list of elements is being
copied, the list is copied after the current element. If a
rectangle is being copied, then the remainder of each element at,
and following, the current position is moved to the right to make
room for the block.
BEFORE or AFTER may be specified after COPY, to indicate whether
the copying is done immediately before or after the current
position.
DELETE
Deletes the block. If the current position was within the block,
it will be set to the first character after the block.
FILL char
Fills the block with a character. The character may be specified
as a single non-blank character, or as three decimal digits or as
two hexadecimal digits preceded by x or X. CLEAR may be used to
cancel the block after FILL.
FIND
Moves the current position to the start of the block.
FIND END
Moves the current position to the end of the block.
LOWER
Converts the block to lower case. CLEAR may be used to cancel the
block after LOWER.
MOVE
Moves the block to the current position, deleting the block from
its original position and placing it into its new position. MOVE
AFTER or MOVE BEFORE may be used for precise positioning. CLEAR
may be used to cancel the block after MOVE.
OVERLAY
The current rectangular block of text is placed over the text at
the current position. Rectangular blocks cannot be used in
documents when FORMATTER is ON.
SET/MARK CHARACTER (or just SET or MARK):
Sets the beginning or end of a character block. On the first
call, a single character is marked. On the second, the block is
extended to include every character between the block and the
current position. On a third or subsequent call, the block will
be extended, reduced or cleared as follows:
1. current position before block - block will be extended.
2. current position after block - block will be extended.
3. current position on block start or block end - block will be cleared
if SET used.
4. current position within block - block will be reduced to include
characters between original start and current position.
SET/MARK ELEMENT
Sets the beginning or end of an element block. On the first
call, the current element will be marked. On a second call, all
elements between the start of the block and the current element
will be marked. On a third or subsequent call, the block will be
extended, reduced or cleared as follows:
1. current position before block - block will be extended.
2. current position after block - block will be extended.
3. current position on block start or block end - block will be cleared
if SET used.
4. current position within block - block will be reduced to include
elements between original start and current position.
SET/MARK GROUP
Marks the current subgroup of elements. The block is set up as
for SET/MARK ELEMENT, except that if the first set is on a
structured element, the block will extend to include all elements
until the next structured element at the same or higher level.
SET/MARK RECTANGLE
Sets the beginning or end of a rectangular block. On the first
call, the current character will be selected. On subsequent
calls, all of the characters within a rectangle between the
current position and the top left hand corner of the original
block will be marked, unless the current position is on the top
left or bottom right corner, in which case the block is cleared
if SET was used.
SET/MARK WORD
A WORD is a sequence of alphanumeric characters. An alphanumeric
character is one which is either a NUMERIC, or an ALPHABETIC
whose upper case form is not the same as the lower case form.
Mark the current word. If a block is already set it will be
cleared first. Then the whole word under the cursor is selected.
If the cursor is not under an alphanumeric character, a backward
scan will be done looking for one. If none is found a forward
scan will be tried. If neither is successful nothing is marked
and the return code set to -6.
Note MARK WORD and SET WORD are synonymous, and for all other
block functions a word block is the same as a character block.
SHIFT
Moves the marked block a given number of characters to the left
or right. When moving right, the element is padded with the
current PAD character and when moving left, the initial
characters are removed.
CLEAR may be specified, to remove the block after SHIFT.
UPPER
Converts the block into uppercase. CLEAR may be specified to
remove the block after UPPER.
Return codes:
-1 unrecognized parameter
-2 no block is currently set
-3 a block may not be copied into itself
-4 document is empty (cannot SET the BLOCK)
-5 document is read-only
-6 invalid state for that BLOCK operation
-7 BLOCK OVERLAY requires a marked rectangular block
-8 insufficient storage available
2 no block is currently set (cannot CLEAR)
ΓòÉΓòÉΓòÉ 4.6. BOTTOM ΓòÉΓòÉΓòÉ
Move to bottom of document.
BOTTOM moves the current position to the last character of the last element of
the document.
Syntax: BOTTOM
Return codes:
-9 parameter passed where none required
1 already exactly on last character of document
ΓòÉΓòÉΓòÉ 4.7. CHANGE ΓòÉΓòÉΓòÉ
Substitute one string for another.
CHANGE substitutes one or more occurrences of one string for another. By
default the changes apply only to the current element, or marked block. The
command parameter determines the scope for changes, overriding any marked
block. Strings are indicated using delimiters, for example:
CHANGE /string1/string2.
The delimiter can be any single non-blank character not used elsewhere in the
parameter string (the / is used here).
Syntax: CHANGE [VISIBLE] [ANY] [ASIS] /string1/string2[/command] [/count]
[/?]
Parameters:
VISIBLE restricts changes to visible elements
ANY find string1 regardless of case
ASIS find string1 exactly as entered
/string1/string2 string1 is the string to be searched for and string2 is
the string which replaces string1. The delimiter may be any
character not present in either string1 or string2. For example:
/colour/color
will replace every occurrence of the word colour with the word
color. If no other parameters are supplied, this modifies the
current element only.
command - any LPEX command. This is used to define the range of elements
over which any changes are to be applied. The range extends from
the current position in the current element to the element that
becomes the current element when command is executed. The
special case of an * means the same as BOTTOM that is do to end
of file
For example:
/colour/color/bottom
replaces colour with color from the current position to the end
of the document.
command expressed as an integer gives the number of elements over
which to apply the changes.
If the change is an iterative change and FINDHISTORY is non zero
then each found point is recorded up to the value of FINDHISTORY,
after that the oldest occurences are discarded in favour of the
latest occurence. Use the PREVIOUS or NEXT forms of the FIND
command to reposition the cursor to a previous found point.
PREVIOUS steps back one occurence and NEXT steps forward to the
later occurence. The history is cyclic and so when there is no
earlier (or later for NEXT) occurence the pointer is reset to the
other of the history.
count - is the maximum number of changes to apply to each element in
the range. If omitted the default is any number of changes
unless string1 is null when the default becomes one.
? - if appended, LPEX will ask for each change to be confirmed.
Return codes:
-1 marked block is not in current document
-2 document is empty
-3 negative return code from command
-4 count is not a positive integer
-5 document is read-only
-6 command would result in backwards search
1 string1 not found
ΓòÉΓòÉΓòÉ 4.8. CHECK ΓòÉΓòÉΓòÉ
Take a manual checkpoint.
CHECK takes a checkpoint of current changes. This is a point to which UNDO can
recover changes. The first time CHECK is specified for a document starts the
recording of undoable changes. CHECK may be called explicitly at any point or
automatically if AUTOCHECK is ON.
LIST displays a list of up to two changes in each level of the HISTORY, giving
an idea of the content of each state of the recorded history. The
interpretation of this data is not always obvious.
Syntax: CHECK [CLEAR/CLEAN/LIST]
Parameters:
CLEAR clears all recorded data
CLEAN cleans data below current HISTORY
LIST shows up to two changes in HISTORY levels
Return codes:
-1 invalid parameter
-2 HISTORY is zero - no checkpointing possible
1 recording was off and is now started
2 no changes have been recorded since the last call to CHECK
ΓòÉΓòÉΓòÉ 4.9. CLIP ΓòÉΓòÉΓòÉ
CLIP provides four clipboard functions for LPEX:
COPY copies the visible elements of current marked block into the
clipboard (leaving it still in the document)
CUT moves the visible elements current marked block into the clipboard
(removing entire block from in the document)
PASTE copies the current clipboard contents into the document at the
cursor position (provided the clipboard contents are available in
standard TEXT format)
QUERY displays a message indicating if the clipboard is empty or contains
some text
CLIP only supports element and character blocks - attempts to copy of cut a
rectangular block are diagnosed as errors.
PROFSYS.LX sets up the standard CUA keys, as follows:
Ctrl-Ins CLIP COPY
Shift-Del CLIP CUT
Shift-Ins CLIP PASTE
Syntax: CLIP option
Parameters: option - as described above
Return codes:
1 option not COPY, CUT, PASTE or QUERY
2 no marked block to copy or cut
3 current block is rectangular
4 clipboard is empty or is not in TEXT format
ΓòÉΓòÉΓòÉ 4.10. DELETE ΓòÉΓòÉΓòÉ
Delete one or more elements.
DELETE removes the current element, or a number of elements, from the document.
The element which followed the deleted element will become the current element.
If no element followed the deleted element, the previous element will become
the current element.
Syntax: DELETE [n]
Parameters: n - the repetition count (default one)
The special case of an * means delete to end of file
Return codes:
-1 invalid call (document is empty)
-5 document is read-only
1 element was last element in document
2 element was only element in document
ΓòÉΓòÉΓòÉ 4.11. DIALOG ΓòÉΓòÉΓòÉ
Invoke an LPEX dialog.
DIALOG causes LPEX to invoke the named dialog as though it had been done from
the pulldown off the action bar. A list of the available dialogs can be
obtained by issuing DIALOG ?
Syntax: DIALOG {name | ?}
Parameters:
name the name of the dialog
? generate a list of the dialogs
The following is the currently defined list.
OPEN ~Open...
SAVEAS Save ~as...
GETFILE ~Get...
FINDCHANGE Find and Change ~Text...
UNDO ~Set undo options...
MARKNAME ~Name a mark...
ELEMENT Element ~number...
FINDMARK Named ~mark...
COMMANDLINE ~Issue command...
SYNONYM Set ~synonyms...
ACTION Set ~action keys...
RECALL Set ~recall options...
FONTS ~Fonts...
TABS ~Tab settings...
GLOBALS ~Global variables...
OPTIONS ~Other settings...
WINLIST Window_~list...
ΓòÉΓòÉΓòÉ 4.12. DUMP ΓòÉΓòÉΓòÉ
Dump the elements of the current document.
DUMP displays information about each element in the current document to give an
abbreviated indication of content, fonts and formatting. The fixed display
order is: (spaces shown between the columns do not exist in output)
A B a P p B F f s S
Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé
Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé Solid
Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé spill
Γöé Γöé Γöé Γöé Γöé Γöé Γöé flow
Γöé Γöé Γöé Γöé Γöé Γöé Final
Γöé Γöé Γöé Γöé Γöé Break
Γöé Γöé Γöé Γöé postspace
Γöé Γöé Γöé Prespace
Γöé Γöé after
Γöé Before
Absolute
Syntax: DUMP [n]
Parameters: n - the number of records to dump (default 20)
Return codes:
-1 no current document
2 invalid number specified
ΓòÉΓòÉΓòÉ 4.13. DUP ΓòÉΓòÉΓòÉ
Duplicate the current element.
DUP duplicates the current element, copying all information including content,
fonts and structure.
The new element is placed after the current element. The first character of the
new element becomes the current position. If more than one new element is
created, the first character of the final new element is used. If no new
elements are created, the current position is not moved.
If the duplicate element is the last element in the current block, the block
extends to include the duplicate. By default the element is duplicated once. A
repetition count can be specified if desired.
Syntax: DUP [n]
Parameters: n - repetition count, zero or greater (default one)
Return codes:
-1 invalid call (document is empty or invalid count)
-5 document is read-only
-8 insufficient storage available
ΓòÉΓòÉΓòÉ 4.14. END ΓòÉΓòÉΓòÉ
Move to end of current element sequence.
END moves the current data position to the end of the current sequence of
elements. The current position is set to one beyond the end of the element
chosen.
Syntax: END
Return codes:
-1 invalid (non-blank) parameter string
1 document is empty (no move is possible)
ΓòÉΓòÉΓòÉ 4.15. EXTRACT ΓòÉΓòÉΓòÉ
Extract one or more state settings.
Syntax: EXTRACT option [ ]
Parameters:
option name of an option the value of which is to be assigned to the
variable of the same name as the option.
Further options the contents of which are to be EXTRACTed.
Where the item is a compound (stemmed) variable name containing
special characters, for example FONT.-, the resultant variable
must be accessed as demonstrated by the following code extract.
chars = '-'
fontcode = font.chars /* get contents of FONT.- */
Return codes:
-1 invalid item found
-2 REXX not available to set variables
ΓòÉΓòÉΓòÉ 4.16. FILE ΓòÉΓòÉΓòÉ
Save document, then quit.
FILE ends the editing of the current document by saving it to an OS/2 file and
then quits from the document. If the SAVE fails, the document is not QUIT. If
name is not specified, the name is taken from the document name.
Syntax: FILE [filename] [/ASSHOWN]
Parameters:
filename name of the file to be saved
/ASSHOWN file in the format as displayed (may be abbreviated to /AS)
Return codes:
-1 document is empty
-2 file already exists
-3 invalid option (not /ASSHOWN)
-4 uneven PRESERVE/RESTORE calls made during .LXS macro
-6 error writing file, or renaming temporary file
-7 document is protected by NOSAVE being set ON
10 command not found - an error in .LXS macro
1 one or more lines truncated
ΓòÉΓòÉΓòÉ 4.17. FIND ΓòÉΓòÉΓòÉ
Find a specific string or element.
FIND searches the current document for a specified string or element, and then
moves the current position to the string or element. If the found text is
visible in the window, the cursor will move to the found text. If the found
text is not visible, it will be displayed on FOCUS.row and the cursor will move
to it. If MARK is specified the found string or element is marked as a
character or element block. If VISIBLE is specified the FIND will be
successful only if the element is in a CLASS which is normally visible.
If called with no parameters, FIND will repeat the most recently issued FIND
command (with exactly the same arguments as the previous call in the current
document). The previous FIND string can be retrieved or changed using QUERY/SET
LASTFIND, which is saved by the PRESERVE command.
The maximum length of the FIND string is 250 characters.
If FINDHISTORY is non zero then each found point is recorded up to the value of
FINDHISTORY, after that the oldest occurences are discarded in favour of the
latest occurence. Use the PREVIOUS or NEXT forms of the FIND command to
reposition the cursor to a previous found point. PREVIOUS steps back one
occurence and NEXT steps forward to the later occurence.
The history is cyclic and so when there is no earlier (or later for NEXT)
occurence the pointer is reset to the other end of the history. The position of
this point is reset to the new last entry if a FIND or CHANGE is performed or
the size of the history chain is changed by a SET FINDHISTORY.
Syntax:
FIND [ [MARK] [VISIBLE] [UP] ELEMENT n/text ]
or
FIND [MARK] PREVIOUS | NEXT
Parameters:
MARK mark the found text as a character block, or the found element as
an element block.
Note: Use of MARK will clear any existing block mark whether or
not the FIND is successful.
PREVIOUS Reposition to the previous found item in the find history.
NEXT Reposition to the next found item in the find history.
VISIBLE restricts search to visible elements
UP specifies an upward search
ELEMENT n searches for the nth element
ANY find string, regardless of case
ASIS find string exactly as entered
text text string to be found, prefixed by ANY or ASIS
Return codes:
-1 invalid parameter (unknown search type or string too long)
-2 document is empty
-3 repeat FIND requested but no previous FIND
1 string not found (or not visible)
2 string found - only occurrence in document
3 string found but wrap to top/bottom of document was needed
ΓòÉΓòÉΓòÉ 4.18. FOCUS ΓòÉΓòÉΓòÉ
Moves the current position to focus line.
FOCUS displays the current cursor position within the document on the focus
line (if a focus line can be determined).
Syntax: FOCUS
Return codes:
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.19. GET ΓòÉΓòÉΓòÉ
Get and insert file after the current element.
GET gets a named file and places it after the current element in the current
document.
Syntax: GET filename [/LINEBREAK ttt]
Parameters: filename - the name of the file to be placed
/LB (or /LINEBREAK) - get file with line breaks according to line break mode
ttt.
Currently supported modes are listed in SET LINEBREAK
Return codes:
-2 no filename given
-5 document is read-only
-6 error reading file
-8 insufficient storage available
3 file not found
ΓòÉΓòÉΓòÉ 4.20. GML ΓòÉΓòÉΓòÉ
Special processes for GML (Script) files.
GML command carries out a number of special processes that are especially
useful for GML (Script) files. The command has one parameter, which may be
abbreviated to a single character.
Syntax: GML command
Parameters: command - one of the following:
CONTENTS or c
Displays the header elements in the current document. The header
elements are shown in table-of-contents format.
GALLEY or g
Returns settings to their defaults, and then sets up "galley"
style for proof-reading (only TEXT and tag representations are
displayed).
INVERSE or i
Toggles (switches) between the CONTENTS list and SELECTing by
section.
NEXT or n
Moves to the next (sub)section of the document.
PREVIOUS or p
Moves to the previous (sub)section of the document.
RESET or r
Returns settings to their defaults.
SELECT or s
If called when on a header element, SELECT expands the selected
subsection, and hides all the remaining sections. This is best
used in conjunction with GML CONTENTS, with both commands being
tied to action keys (or use GML INVERSE).
Return codes:
-1 invalid parameter specified
ΓòÉΓòÉΓòÉ 4.21. GODOC ΓòÉΓòÉΓòÉ
Edit or create specified document.
GODOC can switch between and create documents. The parameters allow specific
documents to be selected.
Syntax: GODOC [DOCNUM n/FIND name/NAME name/NEXT]
Parameters: If no parameters are specified, then the previous document in the
sequence is shown.
DOCNUM n
searches the sequence for document n; if not found then the
document is not created.
FIND name
searches the sequence for the named document; if not found then
the document is not created.
NAME name
searches the sequence for the named document; if not found then
the document is created.
NEXT
the next document in the sequence is shown.
name
The name of the document for NAME or FIND. IF the name contains
embedded blanks or start with a " then the name should be
enclosed in quotes as "name"
Return codes:
-1 invalid parameter
-2 invalid name or DOCNUM
-3 attempt to move to new document while trigger processing
-4 attempt to open more htan the maximum number of windows.
-8 insufficient storage to proceed
1 document not found (for FIND or DOCNUM)
2 new document created (for NAME)
3 already in this document
ΓòÉΓòÉΓòÉ 4.22. GOVIEW ΓòÉΓòÉΓòÉ
Edit or create specified view.
GOVIEW can switch between and create document view. The parameters allow
specific views to be selected.
Syntax: GOVIEW [FIND name/NAME name/NEXT/VIEWNUM n]
Parameters: If no parameters are specified, then the previous view in the
sequence is shown.
FIND name
searches the sequence for the named view; if not found then the
view is not created.
NAME name
searches the sequence for the named view; if not found then the
view is created.
NEXT
the previous view in the sequence is shown.
VIEWNUM n
searches the sequence for view n; if not found then the view is
not created.
Return codes:
-1 invalid keyword
-2 invalid name or VIEWNUM
-4 attempt to open more htan the maximum number of windows.
-8 insufficient storage to proceed
1 view not found (for FIND or VIEWNUM)
2 new view created (for NAME)
3 already in this view
ΓòÉΓòÉΓòÉ 4.23. HELP ΓòÉΓòÉΓòÉ
Display help information.
You can obtain help in one of three ways:
1. Press F1 at any time for help about
a. specific action bar pull-down or option (if one was currently selected)
b. help about the last command if it failed with a negative return code
(which indicates an error)
c. general help
2. Select a Help button in a dialog box. This gives you help about that
dialog.
3. Issue a HELP command using the command line dialog. The format of the
command can be:
HELP command gives help about that command
HELP QUERY option gives help about that query option
HELP SET option gives help about that set option
HELP INDEX x displays the x help index.
HELP x y gives help about y from the x index
The supplied indices are:
G (General information)
A (Action bar)
C (Commands)
S (Set options)
Q (Query)
If help about xxxx cannot be found in a help library, LPEX will look for a
file called xxxx.HLP and display this instead.
Once in the help window, you can display one of the indices using the Options
menu. Within an index, help can be obtained about the highlighted item either
by pressing Enter or double-clicking with mouse button 1.
Return codes:
-2 error reading library
-8 not enough memory to build index or store lines
1 no help for this command (or no such index)
2 error in library format
ΓòÉΓòÉΓòÉ 4.24. INSERT ΓòÉΓòÉΓòÉ
Insert a new element.
INSERT inserts new text after the current element. The new text becomes part of
the current element and has default font, formatting and class.
Syntax: INSERT string
Parameters: string - the text string forming the content of the element
Return codes:
-5 document is read-only
-8 insufficient storage available
ΓòÉΓòÉΓòÉ 4.25. KEYREAD ΓòÉΓòÉΓòÉ
Wait for key to be pressed.
KEYREAD waits for a key to be pressed. The value can then be queried or
extracted using QUERY LASTKEY.
Syntax: KEYREAD
ΓòÉΓòÉΓòÉ 4.26. LINEREAD ΓòÉΓòÉΓòÉ
Read line from screen.
LINEREAD allows the macro writer to request a line of input from the user. The
dialog box includes an input field and three push-buttons (Enter, Help and
Cancel). The input field displays the string (if any) contained in the text
parameter.
The text input by the user can be queried using QUERY LASTLINE, and the button
used to leave the dialog queried by QUERY LASTKEY, which will return either
ENTER or ESC. If ESC is used to exit LINEREAD, QUERY LASTLINE will contain the
initial text.
The title and prompt areas of the lineread dialog can be set using the SET
LINEREAD.TITLE and SET LINEREAD.PROMPT commands.
Note: These settings of the title or prompt are cancelled after the next use
of the LINEREAD command.
Syntax: LINEREAD length [text]
Parameters:
length maximum number of characters on line to be read
text initial text to display in box
Return codes:
-1 invalid parameters
-8 no memory available
ΓòÉΓòÉΓòÉ 4.27. LOAD ΓòÉΓòÉΓòÉ
Load a file into an empty document.
LOAD reads a specified file (no lines wider than 2500 characters) into an empty
LPEX document as a simple list of elements. Once the file has been read, a
number of customizing macros will be called, providing they are listed in the
PROFILES setting. All macros are passed the filename and extension.
PROFSYS.LX sets up installation defaults for LPEX.
xxx.LXL sets up the parser (which in turn sets class, structure and formatting
information as appropriate).
PROFILE.LX may be used for personal customization of the editor.
Syntax: LOAD filename
Parameters: filename - the name of the file (drive and path may be specified)
Return codes :
-1 document is not empty
-2 no filename given
-3 invalid filename
-6 error reading file
-7 file too wide (only a fixed buffer is available)
3 file not found (new file)
ΓòÉΓòÉΓòÉ 4.28. LOADFONTS ΓòÉΓòÉΓòÉ
Loads fonts available for the document.
LOADFONTS loads the specified font file. If no extension is given, an extension
of .DLL is assumed. If no path is given, LIBPATH is searched. If DIAG is ON, a
list of the fonts is displayed.
Syntax: LOADFONTS filename
Parameters: filename - the file containing the required fonts
Return codes:
-2 no filename given
-3 invalid filename (or not a fontfile)
-4 file contains no fonts
-6 error reading file
ΓòÉΓòÉΓòÉ 4.29. LX ΓòÉΓòÉΓòÉ
Edit named document or load new document.
LX loads a named document (unless it already exists), and then permits the
document to be edited.
Syntax: LX [filename] [options]
Parameters:
filename name of document to be edited
If the filename contains leading, embedded, or trailing blanks
then the filename must be enclosed by " characters.
options zero or more of the following:
/np (or /nopro) - do not run PROFILE.LX
/ns (or /nosys) - do not run PROFSYS.LX
/lb (or /linebreak) - load file with line breaks according to line break
mode ttt.
Currently supported modes are listed in SET LINEBREAK.
/as (or /asis) - do not run xxx.LXL (or xxx.LXS when a SAVE is issued).
/dt vvv (or /doctype vvv) - set DOCTYPE to vvv
Return codes:
-1 invalid filename (too long)
-2 no filename given
-3 file in use elsewhere
-6 error reading file
-7 file too wide (only a fixed buffer is available)
1 new document created, but no data loaded
2 new document created, and file loaded
3 already in this document
ΓòÉΓòÉΓòÉ 4.30. LXC ΓòÉΓòÉΓòÉ
Issue command as though from command line.
LXC issues a command as though from the command line.
Syntax: LXC command
Parameters: command - the command to be issued
Return codes:
-10 routine not found
-11 error loading routine
Other negative return codes as returned by the routine or macro. Positive
return codes as returned by the last invokedroutine or macro.
ΓòÉΓòÉΓòÉ 4.31. LXI ΓòÉΓòÉΓòÉ
Issue command as though invoked interactively.
LXI processes the command string as an interactive command. LXI will apply
synonym resolution to commands. LXI adds one to the CHANGES count if one or
more elements are altered during the execution of the command.
Syntax: LXI command
Parameters: command - command to be issued (or = to repeat last command)
Return codes:
-10 routine not found
-11 error loading routine
Other negative codes as returned by command or macro. Positive codes are
returned by last invoked command or macro.
ΓòÉΓòÉΓòÉ 4.32. LXN ΓòÉΓòÉΓòÉ
Issue a native command, with no macro search.
LXN issues a native command without a macro search, so that the command string
is processed in the simplest possible way. Only native LPEX commands will be
understood. The CHANGES count is not incremented.
Syntax: LXN command
Parameters: command- the command to be issued
Return codes:
-8 insufficient storage to continue
-10 routine not found
-11 error loading routine
Other messages as returned by the LXPM command.
ΓòÉΓòÉΓòÉ 4.33. LXR ΓòÉΓòÉΓòÉ
Issue one or more resolved command(s).
LXR processes the command as a possible macro or native call. It searches, in
order, for a native command, a SET or QUERY command, and a macro.
Syntax: LXR command
Parameters: command - the command to be issued
Return codes:
-10 routine not found
-11 error loading routine
Other negative codes as returned by the routine or macro positive codes as
returned by the last invoked routine or macro.
ΓòÉΓòÉΓòÉ 4.34. MACRO ΓòÉΓòÉΓòÉ
Execute LPEX commands in a file.
MACRO executes an LPEX macro which is written in REXX. Commands may be
surrounded with single or double quotes and separated by semicolons. The file
may also contain comments which begin with /* and end with */. The first line
of the file must start with a comment. Simple macros, which do not require a
REXX interpreter, can be written. They contain only comments and LPEX commands.
Syntax: MACRO filename [string]
Parameters:
filename name of macro to execute
string parameter string to be passed to the macro
Return codes:
-1 macro not found
-3 no name passed
-4 invalid first line (not a comment)
ΓòÉΓòÉΓòÉ 4.35. MACRODROP ΓòÉΓòÉΓòÉ
Remove a REXX macro previously loaded by MACROLOAD
Removes the named macro from internal storage. Any path specified will be
ignored. The extension must be appended if not LXeg DOC.LXL.
Syntax: MACRODROP macroname[.ext]
Parameters:
macroname.ext the macro to be removed.
ΓòÉΓòÉΓòÉ 4.36. MACROLOAD ΓòÉΓòÉΓòÉ
Preload an LPEX macro into the internal storage.
Preloading the macros into storage provides faster invocation of the macro - it
will not cause the macro to be executed any faster. If a path is specified the
selected path will be used to find the file otherwise the current LPATH is
used. This process therefore can be used to preempt the LPATH search as well
as for performance reasons. For optimal performance, invocations of the macro
should be made using the MACRO command to bypass the command search. The
extension must be appended if not .LX, for example DOC.LXL. If the macro was
previously preloaded, the preloaded copy is replaced by the macro in the file.
So you can edit a macro and the reload it into storage. But do note that this
must be done to make the change effective. It is recommended that the following
macros are preloaded. PROFSYS.LX PROFILE.LX (even if it is a dummy) and common
.LXL and .LXS files - the distributed PROFINIT.LX will do this for C and DOC
files.
Syntax: MACROLOAD [path\]macroname[.ext ]
Parameters:
path\ path to be used instead of LPATH.
macroname.ext the macro to be preloaded.
Return codes :
1 Not enough storage available.
-1 LPEX cannot find the file.
-4 Not an LPEX macro file or file greater than 64k bytes.
ΓòÉΓòÉΓòÉ 4.37. MARK ΓòÉΓòÉΓòÉ
Set up or find position mark.
MARK sets up a new position mark or finds an existing mark. Marks are not saved
with the document. A mark saves an element and position and is not tied to the
character occupying the position. If characters are subsequently deleted before
the marked position there is no change to the mark. SPLITJOIN and BLOCK may
affect the mark; in the case of SPLITJOIN SPLIT the mark will remain on the
first element after the split. If on a FIND the element is currently shorter
than the position of the original mark the cursor is placed immediately to the
right of the element (which may be on the first character of the next element).
Syntax: MARK [SET] [FIND] [CLEAR] name
Parameters:
SET assign a specified name to a mark
FIND to find a specified mark
CLEAR to clear a specified mark
name the name to be assigned to the mark
Return codes:
-1 document is empty - nothing to mark or find
-2 name not specified
-3 invalid parameter
-8 not enough storage
-9 too many parameters
1 mark not found (name is unknown)
2 name was already in use - now overridden
3 mark refers to an element that has been deleted
ΓòÉΓòÉΓòÉ 4.38. MSG ΓòÉΓòÉΓòÉ
Displays text in the message window.
MSG displays the text string supplied in the message window.
Syntax: MSG text
Parameters: text - the message to be displayed
Return codes:
-1 no message text supplied
ΓòÉΓòÉΓòÉ 4.39. MULT ΓòÉΓòÉΓòÉ
Issue a series of commands.
MULT issues series of commands, as delimited by the first non-blank character
of the parameter string. Processing will stop if a negative return code is
returned or if no documents are available. Each command is issued as a call to
LXI.
For example:
MULT ;QUERY ACTIONLIST; SET ACTIONS ON; SET DIAG ON
displays the list of assigned keys in the message window and then turns both
SET ACTIONS and SET DIAG ON.
Syntax: MULT command command [command] [command]
Parameters: command - a series of commands to be issued in sequence
Return codes:
-10 routine not found
-11 error loading routine
1 a command returned a positive code
Other negative codes as returned by the called routine or macro. Other
positive codes as returned by the last command or macro.
ΓòÉΓòÉΓòÉ 4.40. NEXT ΓòÉΓòÉΓòÉ
Move current position to next object.
NEXT moves the current position to the next element. Specification of
parameters allows selection of the type of element. VISIBLE, if specified, must
be the first parameter and will ensure that the element moved to will be
visible.
Syntax: NEXT [VISIBLE] [ELEMENT/SAME/ABOVE/BELOW /LEVEL n/CLASS c/WORD]
Parameters:
VISIBLE moves to the next visible element
and one of the following:
ELEMENT moves to the next structural element (default)
SAME moves to next element at same level (or above) or, if none is
found, to the next element at a lower level
ABOVE next element at level higher than current
BELOW next element at level below current (effectively next formatted
element not at same level as current)
LEVEL n next element of level n
CLASS c next element of class c
WORD next word
Return codes:
-1 invalid object specified
1 no matching next object found
ΓòÉΓòÉΓòÉ 4.41. OPENCLOSE ΓòÉΓòÉΓòÉ
Add or delete a blank element.
If the parameter OPEN is not specified, OPENCLOSE deletes the current element
if it is blank, and sets the current position to the first non-blank of the
following element. If the content of the current element is not blank, or OPEN
is specified, a new element consisting of a single blank is added, with the
current position set to the same as the first non-blank in the previous
element, or the current cursor position if blank. If the current element has
FLOW set, however, no attempt to follow indentation in this way is made, and
only a single blank is used for the content of the new element.
Syntax: OPENCLOSE [OPEN]
Parameters:
OPEN open a new element even if the current element is a blank
element.
Return codes:
-5 document is read-only
-8 insufficient storage available
ΓòÉΓòÉΓòÉ 4.42. PRC ΓòÉΓòÉΓòÉ
Emphasis parser for C (and C++) programs. PRC is an emphasis parser for C
programs. It is called by the C.LXL macro (when a file with a .C or extension
is reading into LPEX by LOAD). It is also called for live parsing when a C
program is being edited. The default for PRC is CURRENT.
Emphasis consists of setting the fonts used to display an element and the
classes associated with each element. No changes are made to the content or
formatting of data. Keywords, comments, quoted strings and other C tokens are
recognized and set to different fonts. It will also give each element a level,
so individual functions become subgroups.
Each specified element is assigned one or more of the following classes:
BRACE element contains a left or right brace
CODE element contains some C code
COMMENT element contains a comment
ERROR element contains a C error
FUNCTION element is the start of a C function
OPENCOMMENT element contains an unfinished comment
SEMICOLON element contains a semicolon
SPACE element consists entirely of blanks
Each character in the file is assigned a font character. The font characters
are as follows:
A alphanumeric - variable names
C comments
E errors
K C keywords
L literals - quoted strings
N numbers
P preprocessor keywords
S symbols
_ layout spaces
Syntax: PRC [ALL/CURRENT/REPARSE]
Parameters:
ALL parse entire document, doing necessary initialization such as
setting classes and fonts
REPARSE parse the entire document, without any initialization
CURRENT parse the current element only and any others that are affected
by the changes (default)
Return codes:
-1 invalid parameter
-5 document is read-only
-8 insufficient memory
ΓòÉΓòÉΓòÉ 4.43. PRESERVE ΓòÉΓòÉΓòÉ
Save document settings for later restore.
PRESERVE saves the document status until the next RESTORE command.
Syntax: PRESERVE
Return codes:
-1 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.44. PREV ΓòÉΓòÉΓòÉ
Move current position to previous object.
PREV moves the current position to the previous object. The default moves to
the previous element. Specification of parameters allows selection of the type
of element. VISIBLE, if specified, must be the first parameter and will ensure
that the element moved to will be visible.
Syntax: PREV [VISIBLE] [ELEMENT/SAME/ABOVE/BELOW /LEVEL n/CLASS c/WORD]
Parameters:
VISIBLE move to the previous visible element (optional)
and any one of the following:
ELEMENT moves to the previous element (default)
SAME moves to the previous element at same level (or above) or if none
to the previous element at a lower level
ABOVE moves to the previous element at a higher level
BELOW moves to the previous element at level below
LEVEL n moves to the previous element of level n
CLASS c moves to the previous element of class c
WORD moves to the previous word (delimited by specials)
Return codes:
-1 invalid object specified
1 no previous object that matches was found
ΓòÉΓòÉΓòÉ 4.45. PRGML ΓòÉΓòÉΓòÉ
Parser for GML marked documents.
PRGML invokes the GML parser to parse, reformat and classify part or all of the
current GML document. The classes set up by this routine on its first call are
ANNOTATE, COMMENT, HEADER, REPRESENT, SCRIPT, TEXT, and MARKUP, STARTMARKUP,
ENDMARKUP.
Additional user markup classes may be added to the markup table but these must
not be confused with any other classes the user adds to the CLASSES after the
initial parse. These classes cannot be used interchangeably. User markup
classes can only be used within the parsing process.
The font values are not set up by PRGML but by the appropriate load macro. The
fonts used are:
* symbol font 1
# symbol font 2
@ symbol font 3
% symbol font 4
< SGML font
A normal text
B bold
C comments
G char graphics
I italic
J bold italic
M markup
Q quoted string
R roman
S script
T annotations
X examples
The tables read on first call determine the meaning of tags, and the symbols
which are set.
Syntax: PRGML [ALL / LOCAL / ONE] [NOSUB] [NOSYM] [NOSTOPS] [NOREP] [PARA]
[SHORT x] [DELIMS x / SDEL] [MARKUP m] [SYMBOL s] [RIGID] [TEST]
[REFRESH m] [LIST] [TIME]
Parameters:
ALL parses the entire document
LOCAL parses local content from last structural element to the next
(default)
ONE processes only the current element
followed by none or more of options below:
NOSUB turns off shorthand substitution (implied by ALL)
NOSYM turns off symbol substitution and does not set standard symbols
on the first call
NOSTOPS causes the parser to bypass the checking for end of sentences,
thereby supressing the double blank insertion between sentences.
NOREP tag representations are excluded from the document during editing
PARA sentences within paragraphs are flowed together. The default is
to start sentences on a new line if entered such that the
sentence ends at the end of a line.
SHORT x specifies the escape character to be used for shorthand (default
"). Valid short-hand sequences are defined in the markup file.
Use NOSUB to turn off shorthand. The character following the
double-quote indicates the data to be inserted. This may be a
tag, a symbol, or a piece of text. If it is a tag, then it may
require an ending tag, in which case the next double-quote in the
element will be replaced by the appropriate end-tag.
Substitutions have a maximum length of 15 characters.
DELIMS x specifies the tag delimiters (left, right and end) to be used.
The string x must be 3 characters long. The default value is
:e (standard IBM GML). <>/ would specify the default SGML
delimiters (see SDEL option below).
SDEL is a short way of writing DELIMS <>/. It makes the parser use
SGML delimiters < > and / instead of the GML versions : and e.
For more details see the GML.LXL macro and the SIMDOC.MKP markup
table. SDEL will force the RIGID option defined below.
MARKUP m sets the tag file name to m.MKP
SYMBOL s sets the symbol file name to s.SYM
RIGID specifies that tags which are multiline tags are treated as such
regardless of content - the tag ending character must be used,
although a tag start character will be recognised as the start of
a new tag.
TEST requests messages about tags and is normally only useful for ALL
or LOCAL.
TIME requests timings taken for the parser to perform the following
functions
Finding the markup table.
Loading the markup table.
Finding the symbols table.
Loading the symbols table
The actual initial parse.
REFRESH m is a special service call which causes PRGML to discard an old
copy of markup table m and load a new one in its place. This
allows a table to be edited within LPEX and the new version used
without having to quit and re-enter LPEX.
LIST causes PRGML to list the names of the current loaded markup
tables.
Return codes:
-1 invalid parameter
-2 error in MARKUP table
-3 parsing stack overflow
-4 error in SYMBOL table
-5 document is read-only
-8 insufficient memory
ΓòÉΓòÉΓòÉ 4.45.1. Live Parsing Editor tag table for the PRGML parser. ΓòÉΓòÉΓòÉ
The format of the entries in this table is as follows. Note that the entries
MUST be sorted in ascending ASCII order. Blank lines and lines starting with
an asterisk are ignored. Column alignment is recommended but is not required.
Token
*---------------------< 8 >--------------------------------
*1 2 3 4 5 6 7 abcdefgh 9 10 11 12 13
*-------------------------------------------------------------
1. Name of the tag.
This is the generic identifier of the tag. Both start and end tags (if
allowed) should be included, the latter with an end-tag character (e.g.
"e" for IBM GML).
2. Tag type:
This describes the rules governing the tag and its content (if any. The
content is any text between it and its end-tag that not the content of
some other tag. One of the following types must be selected:
- Tag has content, which is not to be formatted (i.e., lines should
not be flowed together).
Y Tag has content, which should be formatted (i.e. lines may be
flowed together).
C Tag has content; it will be formatted (or not) in the same way as
the tag outside it.
N Tag with no content (an empty tag).
T Tag with Text On Same Line (TOSL tag. This is treated like tag
type "-", with an implicit end-tag at the end of the line.
M Modifier tag -- sets formatting (flowing) ON and may change the
font of following content.
X Modifier tag -- sets formatting (flowing) OFF and may change the
font of following content.
3. Font to be used for the tag itself.
4. Font of any content. Set to "-" if no content is expected, or to "?" to
inherit the font from previous tag content.
5. End-tag.
Set to "Y" if this is an end-tag,
6. Required end.
Set to "Y" if a matching end-tag is expected (required),
Set to "O" if a matching end-tag is expected (required),
Set to "-" if it is no end-tag associated.
An optional end tag is required only if text is found before a tag which
does not have a required end tag.
7. Inline tag. "Y" indicates that this is a tag (such as those used for
emphasis or quotation) which is used in the middle of text.
Inline tags have special GML rules for the adding of blanks at the ends of
input lines (for example, an inline end-tag at the end of a line gets a
blank added; an inline start-tag at the end of a line does not). Use "-"
for all other tags.
8. Formatting flags. These cause the corresponding SET FORMAT command to be
applied to the element for this tag (start tag or end-tag). ABSOLUTE,
BEFORE, and AFTER are selected by setting the appropriate flag and
providing the value in columns 9, 9, or 10 respectively.
These flags should all be either 0 or 1 (no blanks):
a ... Absolute
b ... Flow
c ... Before
d ... After
e ... Prespace
f ... Postspace
g ... Break
h ... Final
Note: FORMAT SPILL and SOLID are set by the parser as needed.
9. Formatting value (for Absolute or Before).
Only used if the ABSOLUTE or the BEFORE flag is set. Otherwise set to 0
10. Formatting value (for After).
Only used if the AFTER flag is set. Otherwise set to 0.
11. Tag representation. This is a maximum of 30 characters of data that will
be used for the representation of the tag. This will be added as an
element of class REPRESENT (before an end- tag or after all other tags).
Use "_" for any blanks needed, or just a single "_" if no representation
is required.
12. Heading flag. This determines if the tag (and possibly what follows) is to
be given the HEADER class:
Y tag is a heading. Following elements will also be classified as
heading if tag requires an end-tag (which will terminate the
heading) or if this is a TOSL (text-on-same-line) tag in which
case the text will also be class header
N tag and following elements inherit setting from previous element
("-" or " " has same effect)
13. Additional user CLASS names for markup.
A maximum of 30 characters can be used. Use "_" to separate the classes.
LPEX will convert to blanks.
Each class given MUST appear in the list #CLASSES entry.
For shorthand "tags" (e.g. start with "), tags are identified by Y or N for
token 2; those needing an end-tag have Y for token 5.
Actual data to be substituted (max 15 characters) is token 11.
User classes in addition to the standard parser list
This list must contain ALL classes given in column 13 and each class in the
list can be seperated from the next either by a blank or by an underscore.
LPEX will convert underscores to blanks.
Remove the * of #CLASSES and change userclasslist to your list.
Note: The #CLASSES must start in column 1 of the line.
ΓòÉΓòÉΓòÉ 4.46. PRIMITIVE ΓòÉΓòÉΓòÉ
Performs a primitive function on data.
PRIMITIVE provides a way of invoking a keyboard function on the data.
For example:
SET ACTION.ENTER ;TRIGGER;PRIMITIVE NEWLINE
will cause the Enter key to carry out a parse even when the cursor does not
move off the current element.
The list below shows the functions available and the key to which they are
assigned by default.
Syntax: PRIMITIVE function [n]
Parameters:
function one of the following:
Function Default Key Assignment -- description
BEGINELEMENT n/a -- first character position of element.
BEGINLINE Home -- first character position of line.
CHAR c n/a -- replace/insert char at current position.
CURSORDOWN CursorDown -- move cursor down one line.
CURSORLEFT CursorLeft -- move cursor left one character
position.
CURSORRIGHT CursorRight -- move cursor right one character
position.
CURSORUP CursorUp -- move cursor up one line.
DELETECHAR Delete -- delete current character.
ENDELEMENT n/a -- position after last character.
ENDLINE End -- position at end of line.
ESCAPEKEY Alt-x -- process next character as entered.
INSERTCHAR c n/a -- insert character before current character
NEWLINE Enter -- move cursor to beginning of next line.
NEXTTAB Tab -- move cursor to next tab position to the
right.
NULL n/a
PREVIOUSTAB Backtab -- move cursor to previous tab position
to the right.
REPLACECHAR c n/a -- replace current character with character.
RUBOUT Backspace -- move character left one character
and delete the character at this position.
SETCURSOR BUTTON1DOWN -- set the cursor position to the
character at the current position of the pointer
device.
SETPOINTER n/a -- set the pointer device position to the
character at the current cursor position.
TOGGLECOMMAND Shift-F9 -- open the dialog to issue a command.
TOGGLEINSERT Ins -- toggle the mode between inserting ON and
OFF.
TOGGLEMESSAGE Esc -- toggle betweeen the current document-view
and the message windows.
TRUNCATE Ctrl-Del -- delete the characters from the
current character position to the end of the
formatted line.
For CHAR, INSERTCHAR or REPLACECHAR, c may either
be any single character (expressed as a letter or
3 decimal digits or an x followed by two
hexadecimal digits) or a string enclosed in
single or double quotes.
n the repetition count
Return codes:
-1 invalid parameter (unknown or missing parameter)
ΓòÉΓòÉΓòÉ 4.47. PRREXX ΓòÉΓòÉΓòÉ
Emphasis parser for macros.
PRREXX is an emphasis parser for macros. This command will add the fonts and
classes defined below to elements of the current document. It will also give
each element a level, so that individual functions become subgroups. No change
is made to the content or formatting of the data.
For each element specified, PRREXX will set one or more of the following
classes:
CODE, COMMENT, ERROR, LABEL, OPENCOMMENT, SPACE
and set a fonts string containing these symbolic fonts:
A alphanumeric - variable names
C comments
E errors
H hexadecimal strings
K REXX keywords
L literals - quoted strings
N numbers
S specials
: labels
_ layout spaces
Syntax: PRREXX [ALL/CURRENT/PARSE]
Parameters: one of the following:
ALL parses the entire document, and does any necessary initialization
CURRENT parses only the current element and any others that are affected
by the changes (default)
REPARSE parses the entire document, without doing any initialization
Return codes:
-1 invalid parameter
-5 document is read-only
-8 insufficient memory
ΓòÉΓòÉΓòÉ 4.48. PURGE ΓòÉΓòÉΓòÉ
Purge pending messages.
PURGE throws away some or all retained messages. If no parameter is specified,
all messages will be purged.
Syntax: PURGE [n]
Parameters: n - number of messages to be discarded
Return codes:
-1 invalid argument - not a positive number
1 no messages to purge
ΓòÉΓòÉΓòÉ 4.49. QQUIT ΓòÉΓòÉΓòÉ
Unconditional quit from current document.
QQUIT permits quick quit from the current document. All elements of the
document are deleted and the document itself is then deleted. This action is
unconditional. A safe (protected) QUIT is available. Any pending messages for
the document are displayed on the screen.
Syntax: QQUIT
Return codes:
-3 attempt was made to leave while trigger processing
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.50. QUERY ΓòÉΓòÉΓòÉ
Displays the current values of specified settings. If the value of an item is
null or blanks then <null> or <one blank> or <n blanks> will be displayed.
Syntax: QUERY list
Parameters: list - one or more of the items which may be found in the help
index (F11) under the entry for QUERY Commands.
Return codes:
- 1 invalid item found, processing stops
ACTION.key command at logical key
ACTIONBAR.item[.subitem] user-defined actionbar options
ACTIONBARID.item[.subitem] if of actionbar menu option
ACTIONBARLIST user-defined pull-down menus
ACTIONLIST displays logical keys doing actions
ACTIONS action keys
ALARM alarm at next screen display
AUTOBLANKS add blanks when elements joined
AUTOCHANGES changes since last (auto)save
AUTOCHECK automatic checkpointing
AUTOCOUNT number of changes before autosave
AUTONAME autosave name
AUTONEXT time (secs) before next autosave
AUTOPARSE automatic parsing
AUTOSTOP stop at end of element or execute command
AUTOSYMBOLS automatic substitution of symbols
AUTOTIME n time (minutes) before autosave
BACKGROUND background character
BASEFONT default font for element
BEEP ON/OFF/INVERSE alarm sounding
BEEPLENGTH default alarm length
BEEPTONE default alarm frequency
BLOCKDOC document containing current block
BLOCKEND end of current marked block
BLOCKLENGTH number of elements/chars in block
BLOCKSHOW show by FONT.BLOCK or colour inversion
BLOCKSTART start of block (0 if not string)
BLOCKTYPE the nature of the current marked block
BOUND display range high bound
BROWSE casual overwriting
CHANGES document changes (alteration) count
CLASS element class
CLASSES element classes known for document
COMMANDCHECK exit when command issued
COMPACT blank lines formatting
CONTENT data content of an element
CONTEXT include high-level context
COUNTRY NLS information about country
CREATING exit when creating an element
CURSORCOL cursor column number
CURSORPOS cursor position beyond element
CURSORROW cursor row number
DBCS.option DBCS checking rules
DBCSRANGE ranges of SBCS reserved codepoints
DEFAULT as for SET but also set as default
DEFAULTS apply the established defaults
DELETING exit when deleting an element
DEPTH display range depth (range)
DIAG debug messages
DIRECTORY current directory
DISPDEPTH display depth
DISPWIDTH display width
DOCLIST list of current document numbers
DOCNUM number of current document
DOCTYPE document type, used for SAVE
DOCUMENTS number of documents in memory
DRIVE current drive
ELEMENT number of current element
ELEMENTS number of elements in document
ENVIRONMENT version, CPU type and so forth
EXCLUDE classes to exclude from display
FACE.username user-defined font name
FACELIST list of user-defined typeface names
FILL filler character
FINDHISTORY number of findings to remember
FLOW formatting flow bound
FOCUS.x focus line of display
FONT.x attributes for a given font
FONTLIST list of fonts currently set
FONTS font content of an element
FONTSIZE size of characters for a document window
FORMAT format settings (various)
FORMATTER document formatting
FORMWIDTH formatting width
FRAME (Non PM) document frame characters
FULLPARSE command for full(re) parse
GLOBAL.name global variable value
GLOBALLIST global variable names
HELPFONTSIZE (OS/2 1.1) size of characters for the help window
HELPLIB help library names
HELPWINDOW (OS/2 1.1) visibility of help window
HELPWINDOWPOS (OS/2 1.1) help window position and size
HIGHLIGHT display classes in highlight font
HISTORY number of checkpoint generations
HORIZSCROLL Increment for horizontal scroll
IDLETIME idle seconds before autosave
IMPMACRO implied MACRO commands
IMPSET implied SET commands
INCLUDE classes included for display
INDENT indentation factor
INSERTING insert before/after or replace at cursor
KEY.key logical key at physical key
KEYLIST list of defined keys
LASTFIND last argument to FIND command
LASTKEY last key obtained via KEYREAD
LASTLINE last line obtained via LINEREAD
LASTUNDO last UNDO generation undone
LENGTH length of current element
LEVEL true level of current element
LINEBREAK mode for ending of lines in file
LINEREAD.item title or promt for lineread
LINKED list of currently linked external commands
LIST.item extended query (various)
LOADEDMACROS query the LPEX macros loaded
LPATH search path for macros
MARK.name find mark position
MARKLIST list of marks set in document
MAXWINDOWPOS position and size of a maximised document
MENUACTIVE enable or disable an LPEX menu item
MENUCHECK check or uncheck an LPEX menu item
MESSAGELINE control message display in doc window
MESSAGES display of messages
MODES mode content of an element
MSGDEPTH maximum number of displayed messages
MSGFONTSIZE size of characters for the main window
MSGWIDTH width of the message box
MSGWINDOW change visibility of message window
MSGWINDOWID obtain the message window handle
MSGWINDOWPOS message window position and size
NAME document name
NOBLANKS save file with trailing blanks removed
NOSAVE do not allow SAVE of this document
OPENLIST display filelist on initial display of OPEN/GET dialog
OVERFONT.n overlay font for the screen
OVERHANG formatting flowed elements overhang
OVERLAY.n overlay text for the screen
PAD pad character
PARENT set parentage of LPEX windows
PARSER native command for live parsing
PENDING element pending live parsing
POSITION character position in element
PROFILES profiles to be used
PROTECT classes to protect from overtyping
RAWTEXT returns full unsubstituted text
READONLY prevent any changes
RECALL command recall options
RESOLVE.command resolution of command
REXX use of REXX interpreter
SCREEN summary of screen characteristics
SECONDS time since .LPEX started
SHOW indicate if element for show
SHOWCURRENT current element visibility
SHOWS display of show elements
SIDESCROLL offset of leftmost visible column
SPACE space character
SPILL formatting width for spillable elements
STATUSLINE control status line display in doc window
SUBGROUP local group only display
SYMBOL.string symbol values
SYMBOLLIST symbol names
SYMBOLS display specials as symbols
SYNONYM.name synonym values
SYNONYMLIST synonym names
TABS tab positions
TRIGPOS char position used by TRIGGER
UNPROTECT unprotect element with listed classes
VERSION LPEX version identification
VIEW.n information about a specific view
VIEWHELP custom help library names
VIEWLIST list of views of the current document
VIEWNAME name of current view
VIEWNUM number of the current element
WINDOW visibility of current document view window
WINDOWID obtain the window handle of the current document view
WINDOWMAP usage of window rows
WINDOWPOS view window position and size
WINDOWSHOW say when document window is to be first shown
WORDCHARS define the valid characters for an LPEX WORD
WRAP element wrap
ΓòÉΓòÉΓòÉ 4.51. QUIT ΓòÉΓòÉΓòÉ
Quit current document if unchanged.
QUIT quits the current document (if no changes made) by calling QQUIT. If
changes have been made a warning message is displayed and the QUIT does not
take place.
Syntax: QUIT
Return codes:
-1 changes have been made - quit not done
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.52. QUITVIEW ΓòÉΓòÉΓòÉ
Quit current view.
QUITVIEW quits from the current view and makes the next view current. If the
current view is the only view an error is generated.
Syntax: QUITVIEW
Return codes:
-3 attempt to leave view while trigger processing
-4 attempt to leave only view
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.53. REPEAT ΓòÉΓòÉΓòÉ
Repeat command n times.
REPEAT executes any LPEX command repeatedly, ending after the given number of
executions or when a non-zero return code is found. The command is executed by
the LXI command, so synonym resolution and so forth, is applied.
Syntax: REPEAT n command
Parameters:
n the number of repetitions required
command the command to repeat
Return codes as from command.
ΓòÉΓòÉΓòÉ 4.54. RESET ΓòÉΓòÉΓòÉ
Reset selected settings to initial values.
RESET resets selected settings to their initial (default) values. The settings
affected are:
Setting Default value
BOUND 0
BROWSE OFF
COMPACT OFF
CONTEXT ON
DEPTH 100
EXCLUDE none
FLOW 100
FORMATTER OFF
FORMWIDTH 72
IMPMACRO OFF
IMPSET ON
INCLUDE all
INDENT 2
LASTFIND NULL
OVERHANG 1
PROTECT none
READONLY OFF
SHOWCURRENT OFF
SHOWS ON
SPILL 72
SUBGROUP OFF
SYMBOLS OFF
WRAP ON
Syntax: RESET
Return codes:
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.55. RESTORE ΓòÉΓòÉΓòÉ
Restore document status.
RESTORE replaces the settings saved by the last PRESERVE with the values they
had when the PRESERVE was executed. The settings are:
BOUND
BROWSE
COMPACT
CONTEXT
DEPTH
EXCLUDE
FLOW
FORMATTER
FORMWIDTH
IMPMACRO
IMPSET
INCLUDE
INDENT
LASTFIND
OVERHANG
PROTECT
READONLY
SHOWCURRENT
SHOWS
SPILL
SUBGROUP
SYMBOLS
WRAP
Syntax: RESTORE
Return codes:
-2 no PRESERVE previously issued for this document
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.56. SAVE ΓòÉΓòÉΓòÉ
Save document to an OS/2 file.
SAVE saves a document as an OS/2 file. If no name is specified, the document
name is used. If no parameters are given, SAVE overwrites an existing file (if
any). If parameters are given, a check is made for an existing file. If one
does exist a message asking if you wish to overwrite the file is displayed.
SAVE writes out data according to default formatting rules unless:
1. An .LXS macro with a name matching the DOCTYPE value exists. In this case
the macro may change any of the formatting settings protected by PRESERVE
for specific formatting effects as the document is saved. PRESERVE and
RESTORE preserve the current formatting setting during saving and restore
them afterwards. The .LXS macro is called by default because SAVE is
listed in the PROFILES setting.
2. The /ASSHOWN option is specified. No RESET is done and no macro is called.
The saved file is exactly the same as the display. Considerable data may
be omitted if, for example, a SAVE /ASSHOWN is done while viewing the
Contents of a GML document.
Syntax: SAVE [filename] [/ASSHOWN] [/LINEBREAK ttt]
Parameters:
filename the name for the saved file
Note - the filenames PRN, LPTn and COMn are reserved for saving
the file directly to a printer or plotter, for example LPT1. If
such a name is specified the file is saved to the file
LPEXLPEX.TMP and then printed.
/ASSHOWN save in the layout as seen on screen (may be abbreviated to /AS)
/lb (or /linebreak) - SAVE file with line breaks according to line break
mode ttt.
Currently supported modes are listed in SET LINEBREAK
Return codes:
-1 document is empty
-2 file already exists and name given
-3 invalid option (not /ASSHOWN)
-4 uneven PRESERVE/RESTORE
-6 error writing file or renaming temporary file
-7 document protected by NOSAVE being set ON
-9 too many parameters
-10 command not found, error in .LXS macro
1 one or more lines truncated
Return codes from PRESERVE, RESTORE or a macro may be returned.
ΓòÉΓòÉΓòÉ 4.57. SCROLL ΓòÉΓòÉΓòÉ
Scroll n lines or columns in the window.
SCROLL scrolls up or down some displayed lines, or left or right across some
displayed columns. The current position is moved to the character and element
vertically above or below the original position. Data scrolls down one line by
default.
Syntax: SCROLL [UP/DOWN/LEFT/RIGHT ] [SCREEN] [n]
Parameters:
UP scrolls up the data
DOWN scrolls down the data
LEFT scrolls data to the left
RIGHT scrolls data to the right
SCREEN scrolls the number of lines on the screen minus n (or scrolls one
line, whichever is greater).
n scrolls n lines (or if SCREEN is used, subtract n from SCREEN
count). Default is one.
Examples:
SCROLL scrolls down one line
SCROLL DOWN 10 scrolls down 10 lines
SCROLL SCREEN 2 scrolls down screensize minus two lines
Return codes:
-1 invalid parameter
-2 scroll not possible - insufficient data lines
-4 document is empty or no elements are visible
1 no movement took place
ΓòÉΓòÉΓòÉ 4.58. SET ΓòÉΓòÉΓòÉ
Set internal state of set commands.
SET sets various internal states for flags, fonts, formatting and so forth.
Syntax: SET item string
Parameters:
item the item to be set
string according to item selected
Return codes:
-1 invalid item
-2 invalid parameter for item
-3 too many words for item or string too long
-5 document is read-only
1 synonym or symbol previously existed
ACTION.key command assign command to logical key
ACTIONBAR.item.subitem cmd user-defined actionbar options
ACTIONS ON/OFF/INVERSE enable action keys
ALARM ON/OFF/INVERSE sound alarm at next screen display
AUTOBLANKS ON/OFF/INVERSE add blanks when elements joined
AUTOCHANGES n changes since last (auto)save
AUTOCHECK ON/OFF/INVERSE enable automatic checkpointing
AUTOCOUNT n number of changes before autosave
AUTONAME filename autosave name
AUTOPARSE ON/OFF/INVERSE enable automatic parsing
AUTOSTOP ON/OFF/cmd stop at end of element or execute command
AUTOSYMBOLS ON/OFF/INVERSE automatic substitution of symbols
AUTOTIME n time (minutes) before autosave
BACKGROUND char background character
BASEFONT char default font for element
BEEP ON/OFF/INVERSE allow ALARM to sound
BEEPLENGTH duration default alarm length
BEEPTONE tone default alarm frequency
BLOCKSHOW FONT/INVERT FONT.BLOCK or colour inversion
BOUND n display range high bound
BROWSE ON/OFF/INVERSE prevents casual overwriting
CHANGES n document changes (alteration) count
CLASS classlist element class
CLASSES classlist element classes known for document
COMMANDCHECK command exit when command issued
COMPACT ON/OFF/INVERSE exclude formatting blank lines
CONTENT element text data content of an element
CONTEXT ON/OFF/INVERSE include high-level context
CREATING command exit when creating an element
CURSORCOL cursor column number
CURSORPOS cursor position beyond element
CURSORROW cursor row number
DBCS DBCS checking rules
DBCSRANGE ranges of SBCS reserved codepoints
DEFAULT as for SET but also set as default
DEFAULTS apply the established defaults
DELETING exit when deleting an element
DEPTH n display range depth (range)
DIAG ON/OFF/INVERSE/option debug messages
DIRECTORY name current directory
DISPDEPTH n display depth
DISPWIDTH n display width
DOCTYPE name document type, used for SAVE
DRIVE letter current drive
EXCLUDE classlist classes to exclude from display
FACE.user family face user-defined font name
FILL char filler character
FINDHISTORY n number of findings to remember
FLOW n formatting flow bound
FOCUS.x n focus line of display
FONT.x attribs attributes for a given font
FONTS string font content of an element
FONTSIZE w h/SMALL/LARGE size of characters for a document window
FORMAT list element format settings (various)
FORMATTER ON/OFF/INVERSE enable document formatting
FORMWIDTH n formatting width
FRAME characters (Non PM) document frame characters
FULLPARSE command command for full(re) parse
GLOBAL.name value assign a value to a global variable
HELPFONTSIZE w h/SMALL/LARGE (OS/2 1.1) size of characters for the help window
HELPLIB library ... help library names
HELPWINDOW (OS/2 1.1) help window visibility
HELPWINDOWPOS x y [cx cy] (OS/2 1.1) help window position and size
HIGHLIGHT classlist display classes in highlight font
HISTORY n limit the number of checkpoint generations
HORIZSCROLL n Increment for horizontal scroll
IDLETIME secs idle seconds before autosave
IMPMACRO ON/OFF/INVERSE implied MACRO commands
IMPSET ON/OFF/INVERSE implied SET commands
INCLUDE classlist classes to include for display
INDENT n indentation factor
INSERTING ON/OFF/INVERSE/AFTER insert before/after or replace
KEY.key lkeyname assign logical key to physical key
LASTFIND options last argument to FIND command
LINEBREAK mode mode for ending of lines in file
LINEREAD.item text title or promt for lineread
LPATH string set search path for macros
MAXWINDOWPOS x y cx cy position and size of a maximised document
MENUACTIVE.menuid enable or disable an LPEX menu item
MENUCHECK.menuid check or uncheck an LPEX menu item
MESSAGELINE ON/OFF/DYNamic control message display in doc window
MESSAGES ON/OFF/INVERSE/IMM control display of messages
MSGDEPTH n maximum number of displayed messages
MSGFONTSIZE w h/SMALL/LARGE size of characters for the main window
MSGWIDTH n width of the message box
MSGWINDOW visibility of message window
MSGWINDOWPOS x y [cx cy] message window position and size
NAME string set the document name
NOBLANKS ON/OFF/INVERSE save file with trailing blanks removed
NOSAVE ON/OFF/INVERSE do not allow SAVE of this document
OPENLIST ON/OFF/INVERSE display filelist on initial display of OPEN/GET dialog
OVERFONT.n string overlay font for the screen
OVERHANG n formatting flowed elements overhang
OVERLAY.n string overlay text for the screen
PAD char set the pad character
PARENT windowhandle set parentage of LPEX windows
PARSER command native command for live parsing
PENDING trigger element pending live parsing
POSITION n character position in element
PROFILES list profiles to be used
PROTECT classlist classes to protect from overtyping
READONLY ON/OFF/INVERSE prevent any changes
RECALL n opts set command recall options
REXX ON/OFF/INVERSE enable use of REXX interpreter
SHOW ON/OFF/INVERSE indicate if element for show
SHOWCURRENT ON/OFF/INVERSE force current element to be visible
SHOWS ON/OFF/INVERSE enable display of show elements
SIDESCROLL n offset of leftmost visible column
SPACE char space character
SPILL n formatting width for spillable elements
STATUSLINE ON/OFF control status line display in doc window
SUBGROUP ON/OFF/INVERSE display local group only
SYMBOL.string char value set up a symbol
SYMBOLS ON/OFF/INVERSE display specials as symbols
SYNONYM.name value of a synonym
TABS n n/EVERY m set tab positions
TRIGPOS n char position used by TRIGGER
UNPROTECT classlist unprotect element with listed classes
VIEWHELP libraries names of custom help libraries
VIEWNAME name name of current view
WINDOW option visibility of current document view window
WINDOWPOS x y [cx cy] view window position and size
WINDOWSHOW LOAD/PARSE/USER say when document window is to be first shown
WORDCHARS (to be defined)
WORDCHARS characters define the valid characters for an LPEX WORD
WRAP ON/OFF/INVERSE wrap elements
ΓòÉΓòÉΓòÉ 4.59. SPLITJOIN ΓòÉΓòÉΓòÉ
Split an element or join two elements.
SPLITJOIN either splits an element or joins two elements together. The current
element is split into two elements if the SPLIT option is specified, or if no
option is specified and there is a non-blank character under or to the right of
the cursor. The start of the second element becomes the current position.
The JOIN option joins the following element (if any) to the end of the current
element. A join is also carried out if no option is specified and there are
only blank characters to the right of the current position.
There are two exceptions to the above. SPLITJOIN treats a sequence of flowed
elements as though they are continuous text. SPLITJOIN ignores SHOW elements.
If the cursor is beyond the end of the element, SPLITJOIN will first pad the
element with the PAD character, regardless of whether a split or join is to be
done.
Syntax: SPLITJOIN [SPLIT] [JOIN]
Parameters:
SPLIT splits the current element into two elements
JOIN joins two element together
Return codes:
-5 document is read-only
-1 document is empty
1 no next element to join
ΓòÉΓòÉΓòÉ 4.60. SSHOW ΓòÉΓòÉΓòÉ
Display current views.
SSHOW displays the current data and overlays for a view. This is useful within
macros where it is necessary to display the current screen state before
requesting input.
Syntax: SSHOW
Return codes:
-9 parameter passed where none required
ΓòÉΓòÉΓòÉ 4.61. SUBSTITUTE ΓòÉΓòÉΓòÉ
Cause symbol substitution.
SUBSTITUTE causes symbol substitution on demand, instead of automatically as it
would if AUTOSYMBOLS is ON. If no parameter is specified the whole document is
scanned. A parameter of 1 scans only the current element.
Syntax: SUBSTITUTE [1]
Parameters: 1 - scan only the current element.
Return codes:
-1 invalid parameter
1 no symbols currently defined
2 no symbols found
ΓòÉΓòÉΓòÉ 4.62. TOP ΓòÉΓòÉΓòÉ
Move to the top of the document.
TOP moves the current position to the first character of the first element in
the document.
Syntax: TOP
Return codes:
-9 parameter passed where none required
1 already at top of document
ΓòÉΓòÉΓòÉ 4.63. TRIGGER ΓòÉΓòÉΓòÉ
Trigger live parsing of pending elements, or do a FULLPARSE if FULLPARSE is
specified.
TRIGGER FULLPARSE causes a complete reparse of the document if a SET FULLPARSE
commnad has been issued previously.
TRIGGER causes live parsing of pending elements. This routine calls the live
parser (set by SET PARSER) for each element on the pending list. This list
contains elements whose content has changed since the last trigger processing
(or since the SET PARSER command). Elements may also be added to (or deleted
from) the pending list by the SET PENDING command.
Elements changed by the parser are added to the list of changed elements with a
special type, so it is not necessary to switch off the parser during trigger
processing. The special type (PARSER) can be checked using an embedded post
parser process.
Syntax: TRIGGER [FULLPARSE]
Return codes:
-1 invalid (non-null) parameter string
-2 failure in parser command
1 no changed elements since last live parsing call
2 no parser to call (SET PARSER unavailable) or no FULLPARSE to call (
SET FULLPARSE unavailable)
ΓòÉΓòÉΓòÉ 4.64. UNDO ΓòÉΓòÉΓòÉ
Undo one or more sets of document changes.
UNDO undoes one or more sets of recent changes, checkpointed by the CHECK
command or SET AUTOCHECK ON. UNDO itself takes a checkpoint and changes made by
UNDO are recorded after this point. To undo the last UNDO, use the command UNDO
1.
If no parameters are specified, UNDO will undo a set of changes from the
current state of the document. The next UNDO undoes a further set of changes
and so on. When UNDO has undone all available changes, its continued use will
work back towards the original state of the document. Eventually the cycle will
be repeated.
If UNDO is used with a numeric parameter, this gives the count of generations
to be undone. Changes made by the UNDO command are not added to the pending
trigger list for live parsing.
Syntax: UNDO [n]
Parameters: n - undo n generations of changes
Return codes:
-5 document is read-only
-3 processing error - invalid recording
-1 invalid parameter
1 no changes recorded, so nothing undone
ΓòÉΓòÉΓòÉ 4.65. UNLINK ΓòÉΓòÉΓòÉ
Unlink a previously linked external command.
LPEX external commands are dynamically linked the first time they are invoked.
Once invoked, an external command remains linked until it's removed with an
UNLINK command or LPEX is terminated. While linked, the disk file LXxxx.DLL
(where xxx is the name of the command) is locked by OS/2 and cannot be erased,
modified or renamed. The QUERY LINKED command will list the commands currently
linked. If a lxexit() procedure has been supplied with the external command it
is called to allow any necessary clean up of the interfaces used by the
command.
Syntax: UNLINK command
Parameters: command - the command to be unlinked.
Return codes:
-2 no command given
1 command not found
ΓòÉΓòÉΓòÉ 5. LXPM and External Commands ΓòÉΓòÉΓòÉ
LPEX external commands are provided as separate DLLs.
ΓòÉΓòÉΓòÉ 5.1. LXPM ΓòÉΓòÉΓòÉ
Start up LPEX.
The LXPM command starts up LPEX. It can optionally specify filenames and
startup options. If the instance of LPEX is already active, the LXPM command
will merely pass its parameters across to the active program, there is only
ever one copy of LPEX for each named instance. See the option /instance
described below.
Any filenames may contain drive and absolute or relative path information. If
global filename characters are used, each file found satisfying the
specification is opened, up to the system limit of 30 files/views.
If any filename specification contains leading, embedded, or trailing blanks
then the filename must be enclosed with " characters.
Options:
/ni (or /noinit) - do not run PROFINIT.LX
/np (or /nopro) - do not run PROFILE.LX
/ns (or /nosys) - do not run PROFSYS.LX
/lb (or /linebreak) - load file according to line break mode ttt.
Currently supported modes are listed in SET LINEBREAK.
/as (or /asis) - do not run xxx.LXL (or xxx.LXS when a SAVE is issued).
/in instancename (or /instance instancename) - create an instance of LPEX
identified by instancename or, if the instance already exists pass
the parameters to that instance. If this option is not specified
the default instance is created/used. The AUTONAME is computed from
the first four bytes of the instance name.
/dt vvv (or /doctype vvv) - set DOCTYPE to vvv
/cm xxx (or /command xxx) - issue command xxx after loading files
The LXPM command can be issued in several ways:
o from the Desktop Manager
o from the File Manager (using Associate)
o from an OS/2 session (either full-screen or windowed)
o from a command file
o from another application
ΓòÉΓòÉΓòÉ 5.2. DIR ΓòÉΓòÉΓòÉ
Display a directory as a document.
DIR displays a directory as a document. If no parameter is specified, the
current directory (*.*) is displayed. The filename must be changed from .DIR
(which is not a legal OS/2 filename) using SET NAME before it can be saved. If
APPEND is used, entries are added to any existing directory file. Files cannot
be selected directly from the list for editing.
Syntax: DIR [specification] [APPEND]
Parameters:
specification - the specification of the directory file
APPEND - append new directory to existing file
Return codes:
-2 incorrect parameter specified (use APPEND only)
1 no files found
ΓòÉΓòÉΓòÉ 5.3. DRAW ΓòÉΓòÉΓòÉ
Draw using some of the ASCII box characters.
This command will let you draw boxes and other rectangular shapes using the
arrow keys. While the DRAW command is active, an overlay line will be displayed
on the screen.
To draw lines, just move the cursor keys around the screen, and a line will be
drawn behind the cursor. To move without drawing, use the Alt key in
conjunction with the cursor keys. Alternatively, press the Ins key - the
cursor will become a block to indicate this. To return to DRAW mode press the
Ins key again - the cursor will then turn back to a line.
While you are in DRAW mode, most of the keys will be disabled. However the
Space Bar, Delete, Page Up, Page Down and Enter will act as normal. Any invalid
key will cause a beep.
To change the current draw option (see below for details of these) just type a
new option, which will be displayed on the DRAW overlay line.
To quit DRAW at any time, press the Esc key. The overlay line will be removed
to indicate that you have finished.
Command format:
+- -+
| 1-4 |
DRAW | B or b |
| /character |
+- -+
where 1-4 selects one of the four different types of boxes (see below), B (or
b) means draw with blanks, and /character means draw with the chosen character.
The different boxes are as follows:
Type 1 Type 2 Type 3 Type 4
ΓöîΓöÇΓöÇΓö¼ΓöÇΓöÉ ΓòöΓòÉΓòÉΓòªΓòÉΓòù +--+-+ ΓûêΓûÇΓûÇΓûêΓûÇΓûê
Γöé Γöé Γöé Γòæ Γòæ Γòæ | | | Γûê Γûê Γûê
Γö£ΓöÇΓöÇΓö╝ΓöÇΓöñ ΓòáΓòÉΓòÉΓò¼ΓòÉΓòú +--+-+ ΓûêΓûÇΓûÇΓûêΓûÇΓûê
Γöé Γöé Γöé Γòæ Γòæ Γòæ | | | Γûê Γûê Γûê
ΓööΓöÇΓöÇΓö┤ΓöÇΓöÿ ΓòÜΓòÉΓòÉΓò⌐ΓòÉΓò¥ +--+-+ ΓûÇΓûÇΓûÇΓûÇΓûÇΓûÇ
Note: These boxes may not be represented correctly in code pages other than
850.
Return codes:
-2 invalid DRAW option
-5 document is read only
-8 insufficient memory
ΓòÉΓòÉΓòÉ 5.4. SHOWFONT or SHWFNT ΓòÉΓòÉΓòÉ
Display content of character set.
SHOWFONT displays the entire character set for the given font on the screen.
Syntax: SHOWFONT [fontname/OFF]
Parameters:
fontname name of the font to be displayed
nothing show FONT.! (default data font)
OFF remove the SHOWFONT display
Return codes:
-8 insufficient memory
-10 invalid font name
10 selected font not set
ΓòÉΓòÉΓòÉ 6. QUERY and SET Commands ΓòÉΓòÉΓòÉ
The items which may be queried and/or set are described individually. They may
be accessed via the table of contents, under this heading, or the QUERY
Commands or SET Commands index entries, or from the QUERY or SET command
descriptions.
ΓòÉΓòÉΓòÉ 6.1. Default SET Values ΓòÉΓòÉΓòÉ
Default values for the SET options. In addition to setting them via the
profile and load macros, certain SET options may be remembered in the current
PM environment; to be used for future loading of documents or when a new LPEX
session is started after closing this session.
These options fall into two categories.
1. Those options which can be set even when there is no document opened.
These are the options which apply to the overall LPEX session.
2. Those options which apply to a document. These options are applied
immediately after the document is loaded and before any profiles or load
macros are executed.
The options are either set from the Options pull-down, or by using the SET
DEFAULT command.
If the Options method is used, being saved if the check box Set the system
default is selected during a Change to the option value. If the box is checked
the value is set even if the value has not changed, but not if the SET command
returns an error. The default can be cleared by checking the box and clearing
the contents of the value.
In either case the saved setting are stored such that settings saved against a
particular INSTANCE of LPEX - see the LXPM
ΓòÉΓòÉΓòÉ 6.2. ACTION.key ΓòÉΓòÉΓòÉ
Assign a command to a logical key.
ACTION.key assigns an action to a logical key for the current document only.
When the assigned key is pressed, the action will be carried out, providing
ACTIONS is ON. The MULT command permits a multiple action to be attached to a
key.
In many cases the Shift- Alt- Ctrl- can be combined to form further possible
combinations. Example C-S-K could be used to call a function to capitalise only
the first character of the word whereas C-K capitalises the entire word.
Syntax: SET ACTION.keyname [command]
or QUERY ACTION.keyname
Parameters:
keyname - any one of the following:
3 decimal digits defining an ASCII , or extended ASCII code (for
example 065 = "A") OR
a hexadecimal character code in the form x nn or x nnn (for example x41
= "A") OR
any single character taken as its ASCII value
c-a to c-z Ctrl-letter keys
c-0 to c-9 Ctrl-number keys
a-a to a-z Alt-letter keys
a-0 to a-9 Alt-number keys
c-s-a to c-s-z Ctrl-Shift-letter keys
a-s-a to a-s-z Alt-Shift-letter keys
c-s-a-a to c-s-a-z Ctrl-Shift-Alt-letter keys
fn Function keys
(but not F1 or F10)
s-f1 to s-f12 Shift-Function keys
c-f1 to c-f12 Ctrl-Function keys
a-f1 to a-f12 Alt-Function keys
Normal, Shift- Alt- Ctrl- Ctrl-Shift- Alt-Shift- or Ctrl-Shift-Alt-
with:
buttonNdown a click on button N
buttonNdouble a double-click on button N
buttonNdrag a mouse movement while button N is down
(N = 1, 2 or 3)
Normal, Alt- Ctrl- or Ctrl-Alt- with:
ESC
ENTER
TAB
BACKTAB
BACKSPACE
Normal, Shift- Alt- Ctrl- Ctrl-Shift- Alt-Shift- or Ctrl-Shift-Alt-
with:
HOME
UP
PGUP
LEFT
RIGHT
END
DOWN
PGDN
INS
DEL
OS/2 Presentation Manager reserves the following keys for special
purposes
f1 (help)
f10 (activate action bar)
a-f4 (close)
a-f5 (restore)
a-f6
a-f7 (move)
a-f8 (size)
a-f9 (maximize)
a-f10 (minimize)
c-esc (task manager)
a-backtab (previous application/window)
a-enter
a-padenter
a-tab (next application/window)
a-esc (next session)
command - any valid LPEX command, including MULT
ΓòÉΓòÉΓòÉ 6.3. ACTIONBAR ΓòÉΓòÉΓòÉ
Set contents of action bar pull-downs.
ACTIONBAR.item.subitem sets the action bar pull-downs by adding the subitem
choice to the item pull-down on the action bar. If item is not an existing
pull-down, it is created. If no command is given the subitem choice is deleted
from the pull-down and if no choices then exist, the item pull-down itself is
deleted. For example
SET ACTIONBAR.mine.sound alarm
will cause a pull-down called mine to appear in the action bar. When this is
pulled down, the choice sound becomes available. When sound is picked, the
alarm sounds.
Syntax: SET ACTIONBAR.item.subitem [command]
or QUERY ACTIONBAR.item.subitem
- this returns ACTIONBAR.item.subitem command
or QUERY ACTIONBAR.item
- this returns ACTIONBAR.item subitem1 subitem2 (options in the
specified pull-down)
Parameters:
item - name of menu to be included on action bar
subitem - word to be added to item pull-down
command - the action(s) to be executed when the subitem is selected
ΓòÉΓòÉΓòÉ 6.4. ACTIONBARID (Query only) ΓòÉΓòÉΓòÉ
Query the menuid of action bar pull-downs.
ACTIONBARID.item queries the id of the actionabr entry itself whilst
ACTIONBAR.item.subitem queries the id of the pulldown entry. item and subitem
must be specified exactly as it was on the ACTIONBAR
Syntax: QUERY ACTIONBARID.item.subitem
- this returns the menuid for item.subitem
or QUERY ACTIONBARID.item
- this returns the id for ACTIONBAR.item
Parameters: as for QUERY ACTIONBAR.
ΓòÉΓòÉΓòÉ 6.5. ACTIONBARLIST (QUERY only) ΓòÉΓòÉΓòÉ
List user-defined pull-down menus.
ACTIONBARLIST gives a list of the names of all user-defined pull-down menus on
the action bar for the current document.
Syntax: QUERY ACTIONBARLIST
- this returns ACTIONBARLIST item1 item2 (pull-down titles on the
action bar)
ΓòÉΓòÉΓòÉ 6.6. ACTIONLIST (QUERY only) ΓòÉΓòÉΓòÉ
List the logical keys with assigned commands.
ACTIONLIST lists the logical keys to which SET ACTION.command has assigned
actions. For details of which commands have been assigned to which keys, use
QUERY LIST.ACTION.
Syntax: QUERY ACTIONLIST
ΓòÉΓòÉΓòÉ 6.7. ACTIONS ΓòÉΓòÉΓòÉ
Enable action keys.
ACTIONS ON causes any action assigned to a specific key to be carried out when
that key is pressed. If ACTIONS is OFF, the key will return its own value, as
if it had not been remapped.
Syntax: SET ACTIONS ON/OFF/INVERSE
or QUERY ACTIONS
ΓòÉΓòÉΓòÉ 6.8. ALARM ΓòÉΓòÉΓòÉ
Sound alarm on next screen refresh.
ALARM ON sounds a tone when the screen is next refreshed. ALARM is
automatically set to OFF after the screen has been refreshed. The alarm will
only sound if BEEP is ON.
Syntax: SET ALARM ON/OFF/INVERSE
or QUERY ALARM
ΓòÉΓòÉΓòÉ 6.9. AUTOBLANKS ΓòÉΓòÉΓòÉ
Add mid-element blanks at line ends.
AUTOBLANKS ON ensures that a blank is automatically added to the end of a line
which finishes in the middle of an element (if a blank has not already been
typed). This prevents the accidental joining of words which are separated by
the end of a line.
Use AUTOBLANKS OFF when the position of blanks is critical or when line ends
can be ignored.
Syntax: SET AUTOBLANKS ON/OFF/INVERSE
or QUERY AUTOBLANKS
ΓòÉΓòÉΓòÉ 6.10. AUTOCHANGES ΓòÉΓòÉΓòÉ
Count of changes since last autosave.
AUTOCHANGES gives a count of changes since the last autosave. AUTOCHANGES may
be set explicitly to either a higher count to force an autosave or to a lower
count to postpone an autosave.
Syntax: SET AUTOCHANGES [n]
or QUERY AUTOCHANGES
Parameters: n- the number of changes between autosaves (default zero)
ΓòÉΓòÉΓòÉ 6.11. AUTOCHECK ΓòÉΓòÉΓòÉ
Enable automatic checkpointing.
AUTOCHECK ON automatically takes checkpoints at various points, for example
when the cursor moves to the command line or to a new element. Each check point
records a state of the document and it is possible to go back to one of these
states with the UNDO command. HISTORY must be set to a positive value for
checkpointing to occur.
When AUTOCHECK is OFF, checkpoints for UNDO are the responsibility of the user
(and are taken by the CHECK command).
Syntax: SET AUTOCHECK ON/OFF/INVERSE
or QUERY AUTOCHECK
ΓòÉΓòÉΓòÉ 6.12. AUTOCOUNT ΓòÉΓòÉΓòÉ
Number of changes before autosave.
AUTOCOUNT determines the number of changes that can be made before the document
is automatically saved. The document will be automatically saved, using the
AUTONAME, if the number of changes since the last save or autosave equals or
exceeds AUTOCOUNT and no key has been pressed for IDLETIME seconds.
Set AUTOCOUNT to zero to prevent autosaving of the document.
Syntax: SET AUTOCOUNT [n]
or QUERY AUTOCOUNT
Parameters: n- number of changes before autosave.
ΓòÉΓòÉΓòÉ 6.13. AUTONAME ΓòÉΓòÉΓòÉ
Set name for autosave file.
AUTONAME is the name under which a document is saved automatically if the
AUTOCOUNT or AUTOTIME conditions are met. The default AUTONAME is the 8
character hexadecimal equivalent of the window handle underwhich first opened
the file. The extension is the extension of the file which is being edited.
This method is used to try to minimise the possibility of a duplicate id which
using LPEX in a LAN environment. The user can change this name, but it is
recommended that this is done prior to the first autosave.
Syntax: SET AUTONAME filename
or QUERY AUTONAME
Parameters: filename- the name given to the autosave file, including a
relevant extension. A drive and path may be included.
ΓòÉΓòÉΓòÉ 6.14. AUTONEXT (QUERY only) ΓòÉΓòÉΓòÉ
Seconds before next autosave.
AUTONEXT gives the time in seconds before the next autosave occurs. When
AUTOTIME is set to zero, AUTONEXT will also be zero because no autosave is
scheduled.
Syntax: QUERY AUTONEXT
ΓòÉΓòÉΓòÉ 6.15. AUTOPARSE ΓòÉΓòÉΓòÉ
Resume live parsing.
AUTOPARSE is used to resume or suspend live parsing. When AUTOPARSE is OFF
pending changed elements are processed before parsing is suspended. AUTOPARSE
ON processes pending changed elements after parsing is suspended.
AUTOPARSE will automatically be turned OFF if any errors occur during live
parsing.
Syntax: SET AUTOPARSE ON/OFF/INVERSE
or QUERY AUTOPARSE
ΓòÉΓòÉΓòÉ 6.16. AUTOSTOP ΓòÉΓòÉΓòÉ
Stop replacing character at end of element.
AUTOSTOP is used to prevent accidental overtyping the content of an element
which is flowed to the current element. If OFF is specified, there is no
protection. If ON is specified the cursor will not move into the next element
and the ALARM will sound. Specifying a command will cause that command to be
executed when the cursor reaches the end of the element. A typical command
would be SET INSERTING AFTER which would allow typing to continue inserting the
text at the end of the current element.
Syntax: SET AUTOSTOP ON/OFF/INVERSE/command
or QUERY AUTOSTOP
ΓòÉΓòÉΓòÉ 6.17. AUTOSYMBOLS ΓòÉΓòÉΓòÉ
Automatically translate symbols.
AUTOSYMBOLS ON automatically translates symbols typed in the data area into
their single character representation. This is the default setting. If no
parser is handling symbols and AUTOSYMBOLS is OFF the symbols will remain in
the data.
Syntax: SET AUTOSYMBOLS ON/OFF/INVERSE
or QUERY AUTOSYMBOLS
ΓòÉΓòÉΓòÉ 6.18. AUTOTIME ΓòÉΓòÉΓòÉ
Minutes between autosaves.
AUTOTIME gives the minutes between autosaves. The document is saved when
AUTOTIME minutes have passed if at least one change has been made since the
last save or autosave and no key has been pressed for IDLETIME seconds. The
document is saved using its AUTONAME. An AUTOTIME of zero will prevent
autosaving.
Syntax: SET AUTOTIME [n]
or QUERY AUTOTIME
Parameters: n- the number of minutes required between autosaves (default zero)
ΓòÉΓòÉΓòÉ 6.19. BACKGROUND ΓòÉΓòÉΓòÉ
Set background character.
BACKGROUND sets the character used to fill the area outside the data area. Use
SET FONT.BACKGROUND to select the color and highlighting of the background
character itself.
Syntax: SET BACKGROUND char
or QUERY BACKGROUND
Parameters: char - the required fill character or blank or nnn (n=0-9) or xnn
(n=0-9 a-f)
ΓòÉΓòÉΓòÉ 6.20. BASEFONT ΓòÉΓòÉΓòÉ
Default font for current element.
BASEFONT sets the default font for the current element. This is the font used
if a change is made to the data by overtyping or inserting characters from the
keyboard, or if no explicit FONTS string has been specified.
Syntax: SET BASEFONT char
or QUERY BASEFONT
Parameters:
char - a pre-determined FONT character or nnn (n=0-9) or xnn (n=0-9
a-f)
ΓòÉΓòÉΓòÉ 6.21. BEEP ΓòÉΓòÉΓòÉ
Enable or disable alarm.
BEEP turns the alarm beep on and off. When BEEP is ON any message displayed on
the screen will be accompanied by an alarm beep. When BEEP is OFF the ALARM
command is disabled.
Syntax: SET BEEP ON/OFF/INVERSE
or QUERY BEEP
ΓòÉΓòÉΓòÉ 6.22. BEEPLENGTH ΓòÉΓòÉΓòÉ
Default length of alarm.
BEEPLENGTH sets the default ALARM duration in hundredths of a second.
Syntax: SET BEEPLENGTH [duration]
or QUERY BEEPLENGTH
Parameters: duration - a number between zero and 1000 in hundredths of a
second (default 20)
ΓòÉΓòÉΓòÉ 6.23. BEEPTONE ΓòÉΓòÉΓòÉ
Default tone of alarm.
BEEPTONE sets the default ALARM tone (in hertz). If BEEPTONE is not set, the
default frequency is 440 hertz.
Syntax: SET BEEPTONE tone
or QUERY BEEPTONE
Parameters: tone- a number in the range 50 through 10,000 (hertz)
ΓòÉΓòÉΓòÉ 6.24. BLOCKDOC (QUERY only) ΓòÉΓòÉΓòÉ
Returns document containing current block.
BLOCKDOC returns the DOCNUM of the document containing the current block, or
zero if there isn't one.
Syntax: QUERY BLOCKDOC
ΓòÉΓòÉΓòÉ 6.25. BLOCKEND (QUERY only) ΓòÉΓòÉΓòÉ
Returns end position of block.
BLOCKEND gives the end position of a block. If if no block is set, zero is
returned. The value returned depends on the type of block set:
Element block returns zero.
Character block returns the position of the last marked character in the last
element of the block.
Rectangular block returns the position of the last marked character for each
marked element.
Syntax: QUERY BLOCKEND
ΓòÉΓòÉΓòÉ 6.26. BLOCKLENGTH (QUERY only) ΓòÉΓòÉΓòÉ
Number of characters or elements in block.
BLOCKLENGTH gives the length of the current block as the number of elements
which are participating in the block. For CHARACTER or RECTANGULAR blocks the
size of the block in characters must be calculated - element by element for
character blocks and as (BLOCKEND-BLOCKSTART+1)*BLOCKLENGTH for rectangular
blocks.
Syntax: QUERY BLOCKLENGTH
ΓòÉΓòÉΓòÉ 6.27. BLOCKSHOW ΓòÉΓòÉΓòÉ
Sets the way a block is shown on the screen.
BLOCKSHOW causes the block to be shown using the FONT.BLOCK or by inverting
(XORing) the colours of the characters. The latter way preserves some
indication of the fonts set characters within the block.
Syntax: SET BLOCKSHOW FONT/INVERT
or QUERY BLOCKSHOW
Parameters:
FONT use FONT.BLOCK to show the marked block.
INVERT show the marked block by XORing the colours.
ΓòÉΓòÉΓòÉ 6.28. BLOCKSTART (QUERY only) ΓòÉΓòÉΓòÉ
Query the start position of a block.
BLOCKSTART gives the start position of a currently set block. Zero is returned
if no block is set. The value returned depends on the type of block set:
Element block returns zero.
Character block returns the position of the first marked character in the
first element of the block.
Rectangular block returns the position of the first marked character for each
marked element.
Use QUERY BLOCKTYPE to determine if a block exists, as a value of zero
returned by QUERY BLOCKSTART is ambiguous.
Syntax: QUERY BLOCKSTART
ΓòÉΓòÉΓòÉ 6.29. BLOCKTYPE (QUERY only) ΓòÉΓòÉΓòÉ
Type of block currently set.
BLOCKTYPE gives the type of block currently set by returning one of the
following values:
CHARACTER the block is a character block
ELEMENT the block is an element block
RECTANGLE the block is a rectangular block
UNSET no block is currently set
Syntax: QUERY BLOCKTYPE
ΓòÉΓòÉΓòÉ 6.30. BOUND ΓòÉΓòÉΓòÉ
Display range low bound.
BOUND controls the low bound of elements selected for display. Elements of
depth n and above will be displayed. The value of BOUND is the inverse of the
structure depth. If CONTEXT is ON, elements higher in the structure than n will
be displayed provided they have structural information (such as FORMAT BEFORE,
AFTER or ABSOLUTE) specified, to show the global context of the display group.
Use SUBGROUP to display only elements that are in the same display group as the
current position.
The deepest level of the structure to be displayed can be controlled using the
DEPTH
The value of BOUND automatically extends to include the depth of the current
position if the current element is outside the BOUND setting. This occurs only
while the condition is detected.
Syntax: SET BOUND [n]
or QUERY BOUND
Parameters:
n - the depth number of the required level (default zero)
ΓòÉΓòÉΓòÉ 6.31. BROWSE ΓòÉΓòÉΓòÉ
Display data without allowing changes.
BROWSE ON protects a data area from accidental modification by preventing typed
changes. However, the file may still be altered by action keys, commands from
the command line or a macro. A beep warns that BROWSE is ON if overtyping is
attempted.
Syntax: SET BROWSE ON/OFF/INVERSE
or QUERY BROWSE
ΓòÉΓòÉΓòÉ 6.32. CHANGES ΓòÉΓòÉΓòÉ
Document changes count.
CHANGES counts the number of alterations made to a document. The count is
incremented by one for every data field (element or part element) altered by
typing on the display screen and by one for every command issued interactively
which resulted in changes to the document. A macro which makes many alterations
will count as one change.
Syntax: SET CHANGES [n]
or QUERY CHANGES
Parameters: n - number of alterations made to a document
ΓòÉΓòÉΓòÉ 6.33. CLASS ΓòÉΓòÉΓòÉ
Element class.
CLASS sets the class(es) to which the current element belongs (such as MARKUP,
TEXT, ANNOTATE and so forth).
Syntax: SET CLASS classlist
or QUERY CLASS
Parameters: classlist - class(es) to which current element belongs
ΓòÉΓòÉΓòÉ 6.34. CLASSES ΓòÉΓòÉΓòÉ
Element classes known for document.
CLASSES sets the number and names of classes for the current document. At least
one class must always be present - this defaults to the name DATA. SET CLASSES
may be used repeatedly to rename the current classes, but once a given number
of classes has been set up, the number of classes cannot be reduced. Each word
in the list names the next class in sequence, moving from left to right.
Syntax: SET CLASSES classlist
or QUERY CLASSES
Parameters: classlist - up to thirty words, each naming a class
ΓòÉΓòÉΓòÉ 6.35. COMMANDCHECK ΓòÉΓòÉΓòÉ
Associate a command with the issuing of a command from the Issue Command
COMMANDCHECK causes the command to be executed whenever a command is issued
from the Issue Command dialog box. The command must be provided by the user
and must return 0 if the subject command is to be permitted or non-zero (but
NOT -1) if the command is to be suppressed. The checking routine is called with
the command to be checked as the argument string. command can be either a macro
or an LPEX external command and must provide the appropriate user information
if the command is supporessed. See the provided LXCMDCHK.C and CHKCMD.LX in the
EXTRAS directory for examples of such commands.
Syntax: SET COMMANDCHECK [command]
or QUERY COMMANDCHECK
Parameters: command - An external command, or macro.
ΓòÉΓòÉΓòÉ 6.36. COMPACT ΓòÉΓòÉΓòÉ
Exclude blank formatting lines.
COMPACT ON allows additional data to be included on the screen by excluding the
blank formatting lines which precede or follow certain elements. COMPACT
defaults to OFF.
Syntax: SET COMPACT ON/OFF/INVERSE
or QUERY COMPACT
ΓòÉΓòÉΓòÉ 6.37. CONTENT ΓòÉΓòÉΓòÉ
Data content of an element.
CONTENT changes the content of the character string of the current element.
FONTS is reset to the default font for the current element, repeated to the
same length as the new content and sets the POSITION, in the element to one.
Syntax: SET CONTENT [string]
or QUERY CONTENT
Parameters: string - replacement content for current element
ΓòÉΓòÉΓòÉ 6.38. CONTEXT ΓòÉΓòÉΓòÉ
Include or exclude high-level context.
CONTEXT ON shows structured elements of a level higher than the level set by
BOUND. They are displayed in a special font selected by SET FONT.CONTEXT.
Syntax: SET CONTEXT ON/OFF/INVERSE
or QUERY CONTEXT
ΓòÉΓòÉΓòÉ 6.39. COUNTRY (QUERY only) ΓòÉΓòÉΓòÉ
Return country-dependent information.
COUNTRY gives country-dependent information such as time and date formats,
currency symbol and so forth. The total string is 28 characters long and
contains items separated by blanks. For full details see the OS/2 Technical
Reference Manual.
Syntax: QUERY COUNTRY
ΓòÉΓòÉΓòÉ 6.40. CREATING ΓòÉΓòÉΓòÉ
Associate a command with the creation of an element.
CREATING associates the command given as a parameter with the creation of a new
element. Each time a new element is created, but before it is parsed, the
command is called, allowing the command to perform some action on or relating
to the new element.
Syntax: SET CREATING [command]
or QUERY CREATING
Parameters: command - An external command, macro or internal command.
ΓòÉΓòÉΓòÉ 6.41. CURSORCOL ΓòÉΓòÉΓòÉ
Column containing cursor.
CURSORCOL sets the screen column containing the cursor. The leftmost column of
the screen is column one. The column value must not be greater than the
rightmost column of the screen.
Syntax: SET CURSORCOL [n]
or QUERY CURSORCOL
Parameters: n - the screen column at which the cursor is to be positioned. The
column value should not be greater than the rightmost column on the
screen. (Default one)
ΓòÉΓòÉΓòÉ 6.42. CURSORPOS ΓòÉΓòÉΓòÉ
Column containing cursor.
CURSORPOS allows the cursor to be positioned beyond the end of an element. This
command changes the current position either to be the same as the cursor
position (if the offset lies within the element) or immediately beyond the
element (if the offset lies outside).
Syntax: SET CURSORPOS n
or QUERY CURSORPOS
ΓòÉΓòÉΓòÉ 6.43. CURSORROW ΓòÉΓòÉΓòÉ
Row containing cursor.
CURSORROW sets the row containing the cursor. The topmost row of the screen is
row one. LPEX will adjust the value if necessary so that the cursor position is
within the data portion of the screen.
Syntax: SET CURSORROW [n]
or QUERY CURSORROW
Parameters: n - the row number at which the cursor is to be positioned. The
row value should not be greater than the screen depth.
ΓòÉΓòÉΓòÉ 6.44. DBCS ΓòÉΓòÉΓòÉ
Defines the DBCS characters which cannot END or START a line in a formatted
paragraph. These commands constitute a set supporting the KINSOKU rules.
DBCS.NOEND defines the DBCS characters which are not allowed to END the line.
DBCS.NOSTART defines the DBCS characters which are not allowed to START the
line.
DBCS.CHECK defines whether these checks are to be performed.
DBCS.SPACE defines whether or not an SBCS space is to be inserted between DBCS
characters when two elements are flowed together. This should be set OFF for
JAPANESE DBCS modes but should be set ON for KOREAN DBCS modes.
Syntax: SET DBCS.NOEND [DBCSchars]
or.SET DBCS.NOSTART [DBCSchars]
or.SET DBCS.CHECK ON/OFF/INVERSE
or.SET DBCS.SPACE ON/OFF/INVERSE
or. QUERY DBCS.NOEND
or QUERY DBCS.NOSTART
or QUERY DBCS.CHECK
or QUERY DBCS.SPACE
Parameters:
DBCSchars the DBCS character which cannot END or START a line of a
paragraph. The characters are entered as a single string without
any separating blanks.
ON/OFF/INVERSE Enables or disables a) thee checking of NOEND and NOSTART or
b) the addition of a SPACE when flowing DBCS characters.
ΓòÉΓòÉΓòÉ 6.45. DBCSRANGE (QUERY only) ΓòÉΓòÉΓòÉ
DBCSRANGE returns the ranges of the code page which have been reserved for the
first byte of DBCS character pairs. Each pair of values returned are the
decimal value of first codepoint followed by the decimal value of the last
codepoint. If the system does not support DBCS characters the values are null.
Syntax: QUERY DBCSRANGE
ΓòÉΓòÉΓòÉ 6.46. DEFAULT ΓòÉΓòÉΓòÉ
The default setting of an option.
DEFAULT takes as an argument a normal set option. If the set option functions
satisfactiorily, the setting is saved in the OS/2 defaults file, identified by
the INSTANCE of LPEX - see the LXPM command.
Syntax: SET DEFAULT setoption
Parameters: setoption - any valid option for the set command except DEFAULT.
ΓòÉΓòÉΓòÉ 6.47. DEFAULTS (QUERY only) ΓòÉΓòÉΓòÉ
The LPEX system defaults which have been established.
DEFAULTS returns the set options which have been established for the LPEX
SESSION (NODOC) or for any document window when it is opened (DOC). The NODOC
defaults are applied before PROFINIT is invoked, and the DOC defaults are
applied before PROFSYS.LX is invoked.
Syntax: QUERY DEFAULTS NODOC/DOC
Parameters:
NODOC get the LPEX SESSION defaults.
DOC get the defaults for a Document.
ΓòÉΓòÉΓòÉ 6.48. DELETING ΓòÉΓòÉΓòÉ
Associate a command with the deletion of an element.
DELETING associates the command given as a parameter with the deletion of an
existing element. Each time an element is deleted, and after any other commands
have been executed, the command is called, allowing the command to perform some
action on or relating to that element.
Syntax: SET DELETING [command]
or QUERY DELETING
Parameters: command - An external command, macro or internal command.
ΓòÉΓòÉΓòÉ 6.49. DEPTH ΓòÉΓòÉΓòÉ
Determine lower bound of display range.
DEPTH controls the number of levels to be displayed which are at or below the
BOUND value. Elements with a depth greater than the sum of BOUND + DEPTH - 1
will not be displayed.
DEPTH increases to include the depth of the current position if the current
element is deeper than BOUND + DEPTH - 1, but only while the condition is
detected.
Syntax: SET DEPTH [n]
or QUERY DEPTH
Parameters: n - the range depth, zero or greater
ΓòÉΓòÉΓòÉ 6.50. DIAG ΓòÉΓòÉΓòÉ
Enable or disable diagnostic messages.
DIAG ON provides a special debug tracing facility, giving diagnostic messages.
Syntax: SET DIAG [COMMANDS] [TRACE] [ON] [OFF] [INVERSE]
or QUERY DIAG
Parameters: COMMANDS - give a trace of LPEX commands issued (including LPEXAPI
calls). Other diagnostic modes are cancelled.
ON provides a special debug tracing facility , giving diagnostic
messages - including COMMANDS.
TRACE - as ON but all messages are recorded in the file LXTRACE.TRC
in the current directory.
OFF disables all debug tracing.
INVERSE - if OFF set ON otherwise set OFF.
ΓòÉΓòÉΓòÉ 6.51. DIRECTORY ΓòÉΓòÉΓòÉ
Set current working directory.
This lets you change the current OS/2 working directory that LPEX will use when
given a filename without any path specification.
Syntax: SET DIRECTORY name
or QUERY DIRECTORY
ΓòÉΓòÉΓòÉ 6.52. DISPDEPTH ΓòÉΓòÉΓòÉ
Depth of document window.
DISPDEPTH sets the depth of the display window into the document. The minimum
value is 5.
Syntax: SET DISPDEPTH n
or QUERY DISPDEPTH
Parameters: n - the window depth
ΓòÉΓòÉΓòÉ 6.53. DISPWIDTH ΓòÉΓòÉΓòÉ
Width of window into document.
DISPWIDTH sets the width of the display window into the document. The window
scrolls sideways when the cursor reaches the window frames if DISPWIDTH is less
than the longest line the formatter produces. DISPWIDTH has a minimum value of
20 and it is recommended that DISPWIDTH be not greater than FORMWIDTH (if
FORMWIDTH is not 0).
Syntax: SET DISPWIDTH n
or QUERY DISPWIDTH
Parameters: n - the window width, greater than 19.
ΓòÉΓòÉΓòÉ 6.54. DOCLIST (QUERY only) ΓòÉΓòÉΓòÉ
List current document numbers.
DOCLIST returns the numbers of all documents currently in memory. The items are
separated by blanks.
Syntax: QUERY DOCLIST
ΓòÉΓòÉΓòÉ 6.55. DOCNUM (QUERY only) ΓòÉΓòÉΓòÉ
Number uniquely identifying a document.
DOCNUM gives a number that uniquely identifies the current document. This is
the same as the number used for the initial autosave name.
Syntax: QUERY DOCNUM
ΓòÉΓòÉΓòÉ 6.56. DOCTYPE ΓòÉΓòÉΓòÉ
Document type.
DOCTYPE describes the type of document and is the name of the LXS macro that
will be called when the current document is saved. This is usually set by the
LOAD command to be the same as the extension of the file loaded, so that the
correct processing will be carried out when the document is saved regardless of
the extension used on the SAVE command.
Files with no extension are given a DOCTYPE of LPEX.
Syntax: SET DOCTYPE [name]
or QUERY DOCTYPE
Parameters: name - a string of no more than eight characters
ΓòÉΓòÉΓòÉ 6.57. DOCUMENTS (QUERY only) ΓòÉΓòÉΓòÉ
Number of documents currently in memory.
DOCUMENTS gives the number of documents currently in memory.
Syntax: QUERY DOCUMENTS
ΓòÉΓòÉΓòÉ 6.58. DRIVE ΓòÉΓòÉΓòÉ
Set current drive.
This lets you change the current OS/2 drive that LPEX will use when given a
filename without any leading drive letter.
Syntax: SET DRIVE letter
or QUERY DRIVE
ΓòÉΓòÉΓòÉ 6.59. ELEMENT (QUERY only) ΓòÉΓòÉΓòÉ
Number of current element.
ELEMENT gives the number of the current element, counting from the first
element (one) at the top of the document. An empty document returns zero.
Syntax: QUERY ELEMENT
ΓòÉΓòÉΓòÉ 6.60. ELEMENTS (QUERY only) ΓòÉΓòÉΓòÉ
Number of elements in current document.
ELEMENTS gives the number of elements in the current document. This does not
include the header element which is maintained internally.
Syntax: QUERY ELEMENTS
ΓòÉΓòÉΓòÉ 6.61. ENVIRONMENT (QUERY only) ΓòÉΓòÉΓòÉ
Obtain system information.
ENVIRONMENT allows macros to determine the current environment. The items
returned are:
Item Possible value(s)
Operating system name OS/2
Operating system version 10.10 or 10.20
Processor type 80286 or 80386
Macro BUILTIN or REXXSAA
Syntax: QUERY ENVIRONMENT
ΓòÉΓòÉΓòÉ 6.62. EXCLUDE ΓòÉΓòÉΓòÉ
Classes to exclude from display.
EXCLUDE lists classes to be excluded from the display. Any element in a class
listed under SET EXCLUDE will not be displayed. If no classlist is specified,
no classes of element will be specifically excluded.
Syntax: SET EXCLUDE [classlist]
or QUERY EXCLUDE
Parameters: classlist - the list of class names to be excluded from display
ΓòÉΓòÉΓòÉ 6.63. FACE ΓòÉΓòÉΓòÉ
Gives user-defined name to font.
FACE.username allows you to specify a "shorthand" name for a currently
available font rather than having to specify its full familyname and facename
each time you use it.
No more than three such fonts may be created within a given view. Once created
a font may be changed by giving a new family and/or face name, or dropped
entirely by omitting both the family and face name.
For example
SET FACE.BOLD COURIER COURIER BOLD
enables you to use the Courier bold style by only tying FACE.BOLD when using
the FONT.x command.
Syntax: SET FACE.username [familyname facename]
or QUERY FACE. [username]
Parameters:
username - name by which you wish to call the font (up to 25 characters)
familyname - name of type family (such as Courier or Helvetica)
facename - name of type face (such as Courier Bold or Swiss Helv Italic)
ΓòÉΓòÉΓòÉ 6.64. FACELIST (QUERY only) ΓòÉΓòÉΓòÉ
List user-defined font names.
FACELIST lists the current user-defined font names for the current view (which
can be set by SET FACE and used in subsequent SET FONT commands.
Syntax: QUERY FACELIST
ΓòÉΓòÉΓòÉ 6.65. FILL ΓòÉΓòÉΓòÉ
Set fill character.
FILL sets the character used to fill the area to the left of each line on the
screen. The default FILL character is the period. The FILL character never
appears in saved data. Use SET FONT.FILL to select the color and highlighting
for the FILL character.
Syntax: SET FILL char
or QUERY FILL
Parameters: char - the FILL character required or blank or nnn (n=0-9) or xnn
(n=0-9 a-f)
ΓòÉΓòÉΓòÉ 6.66. FINDHISTORY ΓòÉΓòÉΓòÉ
Number of find occurence to track.
FINDHISTORY limits the number of find occurence which are remembered. By
default, a history of up to 10 occurence is kept. If FINDHISTORY is zero, no
record of found occurences is kept. Whenever the value of FINDHISTORY is
changed the FIND PREVIOUS/NEXT point is reset to the last remembered entry.
Syntax: SET FINDHISTORY [n]
or QUERY FINDHISTORY
Parameters:
n the number of find occurences to be remembered, up to a maximum
of 25
ΓòÉΓòÉΓòÉ 6.67. FLOW ΓòÉΓòÉΓòÉ
Controls automatic flowing of elements.
FLOW controls the automatic flowing of elements. Elements at or below a given
depth will be flowed together on the display. This saves lines and gives a
formatted view of the data. Flowed elements are displayed with the same
indentation as the element to which they are flowed, modified by the OVERHANG
value. The indentation used is FLOW + OVERHANG - 1.
Syntax: SET FLOW [n]
or QUERY FLOW
Parameters: n - the depth of the element at or below which elements are to be
flowed (default 0)
ΓòÉΓòÉΓòÉ 6.68. FOCUS ΓòÉΓòÉΓòÉ
Alter focus line of display.
FOCUS.x alters the focus line of the display. If a number is not specified, the
value n defaults to either the very bottom, the very top or the next view row.
Syntax: SET FOCUS.x [n]
or QUERY FOCUS.x
Parameters:
x - any of the following
BOTTOM sets the line in the document area which is used to trigger
upwards scrolling of the document. It is the lowest line on
which the cursor can be placed.
TOP sets the line in the document area which is used to trigger
downwards scrolling of the document. It is the highest line on
which the cursor can be placed.
NEXT sets the view row for the next display focus
n the number of the view row for the focus line. A positive number
counts from the top of the view downwards, a negative number
counts upwards from the bottom of the view
ΓòÉΓòÉΓòÉ 6.69. FONT ΓòÉΓòÉΓòÉ
Set attributes for document or display fonts.
FONT.x sets the display attributes used for displaying data or a specific font.
All characters and upper case letters may be used as data fonts. Numeric fonts
(one through nine) should normally be used only for OVERLAY lines. Zero has a
fixed meaning of all defaults and may not be used.
A font may be specified as a number, either as three decimal digits or the
letter x followed by two hexadecimal digits.
For example
SET FONT.A /bright cyan : changes the background color of
font A to bright cyan
SET FONT.STATUS REVERSE: reverses the colors on the status
line
Syntax: SET FONT.x [REVERSE] [UNDERLINE] [fore] [/back] [FACE.username]
or QUERY FONT.x
Parameters:
x - LPEX allows the following:
all characters
three decimal digits
uppercase letters A through Z
xnn - one letter followed by two hexadecimal digits
.BACKGROUND - background character font
.BLOCK - marked block font
.CONTEXT - context elements font
.FILL - fill character font
.HIGHLIGHT - highlighting font
.HELP - help window font
.MESSAGE - message window font
.NOTICE - message in document window font
.OVERLAY - default overlay font
.SPACE - space font
.STATUS - status line font
.SYMBOL - symbols font
REVERSE - changes foreground and background colors
UNDERLINE - underlines all characters
fore - possible colors are listed below
/back - possible colors are listed below
BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN,
LIGHT GRAY (or LIGHT GREY), GRAY (or GREY),
BRIGHT BLUE, BRIGHT GREEN, BRIGHT CYAN, BRIGHT RED,
BRIGHT MAGENTA, YELLOW, WHITE.
FACE.username - facename established using the SET FACE command.
ΓòÉΓòÉΓòÉ 6.70. FONTLIST (QUERY only) ΓòÉΓòÉΓòÉ
List symbolic fonts.
FONTLIST lists the symbolic fonts characters which are currently set. Use QUERY
FONT.x to find the characteristics of a specific font.
Syntax: QUERY FONTLIST
ΓòÉΓòÉΓòÉ 6.71. FONTS ΓòÉΓòÉΓòÉ
Character fonts for the current element.
FONTS sets the character fonts for the current element. The string of
characters supplied must be the same length as the content of the current
element, because each character determines the font of the corresponding
character in the element.
Syntax: SET FONTS string
or QUERY FONTS
Parameters: string - a succession of as many characters as the element
contains
ΓòÉΓòÉΓòÉ 6.72. FONTSIZE ΓòÉΓòÉΓòÉ
Size of the characters for a document window.
FONTSIZE sets the size of the characters for the document window. The size of
the window remains the same and the document is redrawn with the top line as
the top line of the new window. If any typeface has been defined LPEX will try
to set the corresponding face for the new size.
Syntax: SET FONTSIZE [w h/LARGE/SMALL]
or QUERY FONTSIZE
Parameters:
w h are the width and depth of the character. The valid combinations
with supplied userfonts are
screentype width x depth .....
CGA 8 x 8
EGA 8 x 8 , 8 x 12
VGA 8 x 8 , 8 x 14
8514A 7 x 15, 8 x 17, 8 x 8, 12 x 16, 12 x 20
12 x 22, 7 x 25, 12 x 30
Other sizes are valid but no userfonts are supplied, however any
FACE definitions will be preserved so that a change to one of the
above sizes will reinstate the defined face.
SMALL is defined as the first size listed above
LARGE is defined as the second size listed above for each type of
screen. For the CGA screen SMALL = LARGE
ΓòÉΓòÉΓòÉ 6.73. FORMAT ΓòÉΓòÉΓòÉ
Format settings for the current element.
FORMAT changes the formatting control for the current element.
Syntax: SET FORMAT [list]
or QUERY FORMAT
Parameters: list - zero or more from the following list:
ABSOLUTE n
sets the current element level to n, which must be positive. The
AFTER option may be used, but BEFORE should not.
AFTER n
changes the current level by n after the current element. n may
be positive (increasing level) or negative (decreasing level).
BEFORE and AFTER may both be specified.
BEFORE n
changes the current level by n before the current element. n may
be positive (increasing level) or negative (decreasing level).
BEFORE and AFTER may both be specified.
BREAK
forces this element to start on a new line, regardless of the
setting of FORMAT FLOW and SET FLOW.
FINAL
forces the next element to start on a new line, regardless of the
setting of FORMAT FLOW and SET FLOW.
FLOW
always flows this element to follow the preceding element.
NOlist
options not followed by a number may be prefixed with the string
NO. For example, adding NOBREAK to the end of an existing FORMAT
list will guarantee that BREAK is cleared.
POSTSPACE
includes a blank line after this element, and always starts the
next element on a new line.
PRESPACE
includes a blank line before this element, and always starts this
element on a new line.
SOLID
indicates that the element is solid, so the formatter will not
split the element at blanks (or elsewhere), except when there is
no other way to format the element
SPILL
indicates that the element may be SPILLed.
ΓòÉΓòÉΓòÉ 6.74. FORMATTER ΓòÉΓòÉΓòÉ
Enables document to be formatted.
FORMATTER uses information (FLOW, BREAK, PRESPACE and so forth) associated with
each element to format the document. When FORMATTER is OFF, each element is
displayed on a separate line. FORMATTER is OFF by default.
Syntax: SET FORMATTER ON/OFF/INVERSE
or QUERY FORMATTER
ΓòÉΓòÉΓòÉ 6.75. FORMWIDTH ΓòÉΓòÉΓòÉ
Set the formatting width of the document.
FORMWIDTH sets the length of the longest line that the formatter will produce
when WRAP is ON. If WRAP is OFF, long lines are not wrapped. If 0 is specified
then the current value of DISPWIDTH is used - if DISPWIDTH changes the file is
reformatted if FORMATTER is ON.
Syntax: SET FORMWIDTH n
or QUERY FORMWIDTH
Parameters: n - length of longest line formatter will produce, and must be 0
or in the range 20 through 2500
ΓòÉΓòÉΓòÉ 6.76. FRAME ΓòÉΓòÉΓòÉ
This function does not do anything for this version of LPEX, and is provided
for compatibility only.
ΓòÉΓòÉΓòÉ 6.77. FULLPARSE ΓòÉΓòÉΓòÉ
Define the parser to be used for a full as opposed to an incremental parse. For
all other details, see SET PARSER and TRIGGER FULLPARSE
ΓòÉΓòÉΓòÉ 6.78. GLOBAL ΓòÉΓòÉΓòÉ
The SET GLOBAL.name command assigns a value to a global variable. If the
variable does not currently exist it will be created. Global variables remain
in existence until the LPEX session is terminated and may be set or queried
from any document or macro.
Syntax: SET GLOBAL.name value
or QUERY GLOBAL.name
Parameters:
name arbitrary name of the variable
value an arbitrary string
ΓòÉΓòÉΓòÉ 6.79. GLOBALLIST (QUERY only) ΓòÉΓòÉΓòÉ
List names of global variables.
GLOBALLIST gives a list of all the global variables which are currently set.
Syntax: QUERY GLOBALLIST
ΓòÉΓòÉΓòÉ 6.80. HELPFONTSIZE ΓòÉΓòÉΓòÉ
This function no longer has any meaning in LPEXPM and is retained for
compatibility.
Size of the characters for the help window.
HELPFONTSIZE sets the size of the characters for the help window. The size of
the window remains the same and the help window is redrawn with the top line as
the top line of the new window.
Syntax: SET HELPFONTSIZE [w h/LARGE/SMALL]
or QUERY HELPFONTSIZE
ΓòÉΓòÉΓòÉ 6.81. HELPLIB ΓòÉΓòÉΓòÉ
Default help library names.
Certain information will always be available through the help table of contents
regardless of which help panel is displayed. This information comes from the
default help libraries which can be modified using this command.
The default help libraries are LPEXCMD.LXH and LPEXHELP.LXH which contain
command and help system information respectively. It is recommended that both
always be included, particularly the command help as these help panels are
cross-referenced from other help libraries.
The order of the default help libraries will be reflected in the help table of
contents.
Syntax: SET HELPLIB library [library ...]
or QUERY HELPLIB
Parameters: Each name may be a fully qualified name including drive and path,
otherwise the file should be in the path specified by the HELP
environment variable.
At least one library must be specified.
ΓòÉΓòÉΓòÉ 6.82. HELPWINDOW ΓòÉΓòÉΓòÉ
This function no longer has any meaning in this version of LPEX.
Set the mode of the help window.
HELPWINDOW controls whether the help window is visible, minimized or maximized.
or activated.
Syntax: SET HELPWINDOW option
Parameters:
MINimized the window is minimised - if the window was hidden it is made
visible before minimizing.
MAXimized the window is maximized - if the window was hidden it is made
visible before maximizing.
VISIBLE the window set to restored size and made visible - focus is not
necessarily given to the window.
ΓòÉΓòÉΓòÉ 6.83. HELPWINDOWPOS ΓòÉΓòÉΓòÉ
This function no longer has any meaning in this version of LPEX.
Positions and optionally sizes help window.
SET HELPWINDOWPOS x y [cx cy]
The parameters are all in pels and refer to the frame, not the client area. x
and y set the position of the lower left corner, while cx and cy set the width
and depth. If cx and cy are omitted or set to 0 the window is not resized.
Setting both cx and cy to -1 will maximise the window (x and y will be
ignored).
Note that some part of the window must be visible on the desktop, whose size
can be obtained by QUERY SCREEN. Note also that LPEX ensures that the client
area is always a whole number of characters wide or deep, so the cx and cy
values may be adjusted by LPEX to ensure this.
ΓòÉΓòÉΓòÉ 6.84. HIGHLIGHT ΓòÉΓòÉΓòÉ
Classes to highlight when displayed.
HIGHLIGHT controls which displayed elements are highlighted. Any element with
its class specified in classlist will have its contents displayed using
FONT.HIGHLIGHT.
Syntax: SET HIGHLIGHT [classlist]
or QUERY HIGHLIGHT
Parameters: classlist - one or more classes from which member elements are to
be highlighted when displayed
ΓòÉΓòÉΓòÉ 6.85. HISTORY ΓòÉΓòÉΓòÉ
Number of undoable checkpoint generations.
HISTORY limits the number of checkpoint generations kept. By default, a
history of up to 10 checkpoints is kept. If HISTORY is zero, no record of
changes is kept.
Syntax: SET HISTORY [n]
or QUERY HISTORY
Parameters:
n the number of checkpoint generations to be kept, up to a maximum
of 25
ΓòÉΓòÉΓòÉ 6.86. HORIZSCROLL ΓòÉΓòÉΓòÉ
This sets the number of columns which are scrolled when using the horizontal
scrollbar scroll buttons.
ΓòÉΓòÉΓòÉ 6.87. IDLETIME ΓòÉΓòÉΓòÉ
Idle seconds required before autosave.
IDLETIME sets the IDLETIME delay, specifying the number of idle seconds
required before an autosave should occur. A pending autosave is delayed until
no key has been pressed for IDLETIME seconds. IDLETIME defaults to two seconds.
Syntax: SET IDLETIME n
or QUERY IDLETIME
Parameters: n - number of idle seconds between autosaves
ΓòÉΓòÉΓòÉ 6.88. IMPMACRO ΓòÉΓòÉΓòÉ
Implied MACRO commands.
IMPMACRO ON tries unknown commands as macros, after LPEX has established that
the command is not a native command, an implied SET or QUERY, or an external
LPEX command.
Syntax: SET IMPMACRO ON/OFF/INVERSE
or QUERY IMPMACRO
ΓòÉΓòÉΓòÉ 6.89. IMPSET ΓòÉΓòÉΓòÉ
Implied SET commands.
IMPSET ON tries unknown commands as SET or QUERY commands. Single word
commands are tried as a QUERY, multiple word commands are tried as a SET.
Syntax: SET IMPSET ON/OFF/INVERSE
or QUERY IMPSET
ΓòÉΓòÉΓòÉ 6.90. INCLUDE ΓòÉΓòÉΓòÉ
Classes to include in display.
INCLUDE lists the classes to be included in the displayed document. If an
element is in a class listed under SET INCLUDE, it will be displayed (unless
overridden by SET EXCLUDE). If no class list is specified, all classes of
element are included.
Syntax: SET INCLUDE [classlist]
or QUERY INCLUDE
Parameters: classlist - the list of classes for inclusion in the data display
ΓòÉΓòÉΓòÉ 6.91. INDENT ΓòÉΓòÉΓòÉ
Indentation factor.
INDENT sets the amount by which a structural level will be indented on the
screen. INDENT defaults to two.
Syntax: SET INDENT n
or QUERY INDENT
Parameters: n - the number of character positions by which indentation is
required, in the range zero through 5
ΓòÉΓòÉΓòÉ 6.92. INSERTING ΓòÉΓòÉΓòÉ
or insert after insert, replace.
INSERTING determines whether characters are inserted before the cursor position
(INSERTING ON) or replace the existing characters (INSERTING OFF) or are
inserted after the chracter at the current cursor position.
Syntax: SET INSERTING ON/OFF/INVERSE/ AFTER
or QUERY INSERTING
Parameters:
ON set inserting before current cursor position
OFF set mode to replace at current cursor position
AFTER set inserting after current cursor position
INVERSE if OFF set on, else set OFF
ΓòÉΓòÉΓòÉ 6.93. KEY ΓòÉΓòÉΓòÉ
Map a physical key to a logical key.
KEY.key allows a physical key to be mapped to a logical key. Pressing the key
identified by pkeyname will have exactly the same effect as pressing lkeyname.
Syntax: SET KEY.pkeyname lkeyname
or QUERY KEY.pkeyname
Parameters:
pkeyname any physical key
lkeyname the logical key from which pkeyname takes its effect
For a list of valid keynames see SET ACTION.
ΓòÉΓòÉΓòÉ 6.94. KEYLIST (QUERY only) ΓòÉΓòÉΓòÉ
List currently remapped physical keys.
KEYLIST gives a list of the names of all keys which have been remapped using
SET KEY.
Syntax: QUERY KEYLIST
ΓòÉΓòÉΓòÉ 6.95. LASTFIND ΓòÉΓòÉΓòÉ
Set parameters for FIND.
LASTFIND determines the search that will take place if FIND is called without
any parameters. If LASTFIND is not set explicitly it will take its values from
the most recently issued FIND command.
Syntax: SET LASTFIND [ [VISIBLE] [UP] ELEMENT n/text ]
or QUERY LASTFIND
Parameters:
UP specifies an upward search
VISIBLE restricts search to visible elements
ELEMENT n searches for the nth element
text text string to be found, prefixed by ANY or ASIS
ANY find string, regardless of case
ASIS find string exactly as entered
Return codes:
-1 invalid parameter (unknown search type or string too long)
-2 document is empty
-3 repeat FIND requested but no previous FIND
1 string not found (or not visible)
2 string found - only occurrence in document
3 string found but wrap to top/bottom of document needed
ΓòÉΓòÉΓòÉ 6.96. LASTKEY (QUERY only) ΓòÉΓòÉΓòÉ
Last key obtained by KEYREAD.
QUERY LASTKEY gives the name of the key read by the most recent KEYREAD
command, or the key used to terminate the most recent LINEREAD command,
whichever came later.
A list of the key names that can be returned by this command is given in the
help for SET/QUERY ACTION.
Syntax: QUERY LASTKEY
ΓòÉΓòÉΓòÉ 6.97. LASTLINE (QUERY only) ΓòÉΓòÉΓòÉ
Last line obtained by LINEREAD.
QUERY LASTLINE gives the line of data read by the most recent LINEREAD command.
Syntax: QUERY LASTLINE
ΓòÉΓòÉΓòÉ 6.98. LASTUNDO (QUERY only) ΓòÉΓòÉΓòÉ
Display the last UNDO value.
LASTUNDO gives the value of the most recent UNDO generation which was undone.
Syntax: QUERY LASTUNDO
ΓòÉΓòÉΓòÉ 6.99. LENGTH (QUERY only) ΓòÉΓòÉΓòÉ
Length of the current element.
LENGTH gives the number of characters in the current element.
Syntax: QUERY LENGTH
ΓòÉΓòÉΓòÉ 6.100. LEVEL (QUERY only) ΓòÉΓòÉΓòÉ
True level of the current element.
LEVEL gives the structural level of the current element. This is determined by
current or previous FORMAT settings. LEVEL may be negative if relative (BEFORE
and AFTER) settings are used that outdent more than the current level. The
highest structural level has a level of 0.
Syntax: QUERY LEVEL
ΓòÉΓòÉΓòÉ 6.101. LINEBREAK ΓòÉΓòÉΓòÉ
Record type.
LINEBREAK defines the linne break modes. This is used to determine how the
lines are to be identified.
The default mode is DOS which requires that both CR and LF are present and are
adjacent in that order. Also end-of-file is determined by the sequence
CR-LF-EOF or hex 0D0A1A'.
Syntax: SET LINEBREAK [type]
or QUERY LINEBREAK
Parameters: mode - must be one of
DOS Both CR and LF in that order are required - the default.
CRLF Both CR and LF in that order are required (same as DOS).
UNIX Only LF is required.
LF Only LF is required (same as UNIX).
ΓòÉΓòÉΓòÉ 6.102. LINEREAD. ΓòÉΓòÉΓòÉ
Set title or prompt for next LINEREAD
LINEREAD.TITLE sets the title line for the next issuance of the LINEREAD
LINEREAD.PROMPT sets the prompt line for the next issuance of the LINEREAD
Syntax: SET LINEREAD.TITLE text
SET LINEREAD.PROMPT text
QUERY LINEREAD.TITLE
or QUERY LINEREAD.PROMPT
Parameters: text - the text to be used for the appropriate area of the
lineread dialog.
ΓòÉΓòÉΓòÉ 6.103. LINKED (QUERY only) ΓòÉΓòÉΓòÉ
List of currently linked external commands.
LINKED lists the names of the external commands which have been linked to LPEX.
Once invoked, an external command remains linked until it's removed with an
UNLINK command or LPEX is terminated. While linked, the disk file LXxxx.DLL
(where xxx is the name of the command) is locked by OS/2 and cannot be erased,
modified or renamed.
Syntax: QUERY LINKED
ΓòÉΓòÉΓòÉ 6.104. LIST (QUERY only) ΓòÉΓòÉΓòÉ
Details about document, keys, views, etc.
LIST.item gives information about current actions, documents, fonts, keys,
marks, symbols, synonyms or views. For example, LIST.FONT displays the values
of the currently set fonts. Possible commands are:
Syntax: QUERY LIST.item
Parameters: item - any of the following:
ACTION logical keys and actions assigned to them
ACTIONBAR pull-downs and choices assigned to them
DOC names and number of elements in current documents
FACE current user defined font names
FONT current fonts and their attributes
GLOBAL current global variables and their values
KEY physical keys that have been remapped and the logical keys to
which they have been assigned
MARK current marks and details about them
SYMBOL current symbols and their values
SYNONYM current synonyms and their values
VIEW the names of views of the current document
ΓòÉΓòÉΓòÉ 6.105. LOADEDMACROS (QUERY only) ΓòÉΓòÉΓòÉ
List the preloaded REXX macros. This query will list the names of the REXX
macros which have been preloaded into the REXX storage to save loading each
time they are used.
Syntax: QUERY LOADEDMACROS
ΓòÉΓòÉΓòÉ 6.106. LPATH ΓòÉΓòÉΓòÉ
Set directory search path for help and macros.
LPATH sets the path to be searched for macros and help files, instead of
defaulting to the current directory only. Failure to specify a pathlist will
result in the use of the OS/2 DPATH value, which is established by the SET
DPATH= command in the CONFIG.SYS file.
Syntax: SET LPATH pathlist
or QUERY LPATH
Parameters: pathlist - a list of OS/2 directories, separated by semi-colons
ΓòÉΓòÉΓòÉ 6.107. MARK (QUERY only) ΓòÉΓòÉΓòÉ
Return position of specified mark in element.
MARK.name gives the named mark's position within an element. The number
returned is positive if the mark is in the current element, negative if it is
not. An unknown mark returns zero.
Syntax: QUERY MARK.name
ΓòÉΓòÉΓòÉ 6.108. MARKLIST (QUERY only) ΓòÉΓòÉΓòÉ
Return list of marks set in document.
MARKLIST gives an unordered list of the names of marks currently set in the
document.
Syntax: QUERY MARKLIST
ΓòÉΓòÉΓòÉ 6.109. MAXWINDOWPOS ΓòÉΓòÉΓòÉ
Sets the position and size of the maximised window.
Syntax: SET MAXWINDOWPOS x y cx cy
or SET MAXWINDOWPOS CURRENT
or QUERY MAXWINDOWPOS
The parameters are all in pels and refer to the frame, not the client area. x
and y set the position of the lower left corner, while cx and cy set the width
and depth.
Note that some part of the window must be visible on the desktop, whose size
can be obtained by QUERY SCREEN. Note also that LPEX ensures that the client
area is always a whole number of characters wide or deep, so the cx and cy
values may be adjusted by LPEX to ensure this.
The maximised size can also be set by sizing the current document window to
the required size and then issuing the command
SET MAXWINDOWPOS CURRENT
ΓòÉΓòÉΓòÉ 6.110. MENUACTIVE ΓòÉΓòÉΓòÉ
Enables or disables an actionbar item or pulldown item.
Note: Currently only LPEX predefined items can be changed.
Syntax: SET MENUACTIVE.name ON/OFF
or QUERY MENUACTIVE.name
Parameters:
name This is either the predefined LPEX name for a LPEX defined
menuitem or a numeric value for a user acdded item. This numeric
value can be obtained using the QUERY ACTIONBARID. command.
ON enable the actionbar/pulldown item.
OFF disable the actionbar/pulldown item.
INVERSE toggles between ON and OFF
Note: Currently INVERSE is not implemented.
MENUACTIVE controls the enabling or disabling of actionbar items or pulldown
items. If the command is issued when the message window has the focus the
action is performed on the message window otherwise the action is performed on
the current document/view window. Disabling an item will not disable any
accelerator key; this must be done using an appropriate SET ACTION. command.
Similarly enabling an item will not activate the accelerator key.
The following table defines the name of the predefined LPEX items and the
english content of the item.
LP_ABOUT About..
LP_FILEMSG File
LP_MESSAGES Messages
LP_ENABLEMSG Enable messages
LP_PURGE Purge current messages
LP_COPYMSG Copy messages to current document
LP_EXITLPEX Exit LPEX
LP_MINONUSE Minimize on use
LP_ACTIONS Window
LP_SHOW Show
LP_HIDE Hide
LP_MIN Minimize
LP_CLOSE Close
LP_MINALL Minimize all LPEX
LP_SELECTALL Select al
LP_DESELECTALL Deselect all
LP_MULTIPLE Multiple selection
LP_SORTOPEN Sort by order opened
LP_SORTNAME Sort by window name
LP_FILEDOC File.
LP_OPEN Open...
LP_SAVE Save
LP_SAVEAS Save as...
LP_GET Get...
LP_PRINT Print
LP_PRINTAS Print as shown
LP_FILEQUIT File -Save&Quit
LP_UNDOOPTS Undo
LP_UNDO Undo last set of changes
LP_CHECK Take a checkpoint
LP_SETUNDO Set undo options...
LP_EDIT Edit
LP_CLIPCOPY Copy to clipboard
LP_CLIPCUT Cut to clipboard
LP_CLIPPASTE Paste from clipboard
LP_COPY Copy block
LP_MOVE Move block
LP_DELETE Delete block
LP_UPPER Uppercase block
LP_LOWER Lowercase block
LP_UNMAARK Unmark block
LP_NAMEMARK Name a mark...
LP_CLIP Clipboard
LP_BLOCK Block
LP_FINDOPTS Find
LP_START Start of block
LP_END End of block
LP_ELEMENT Element number...
LP_FINDMARK Named mark...
LP_FINDCHANGE Find and Change Text...
LP_WINDOW Window
LP_NEWVIEW Open new view
LP_CLOSEVIEW Close this view
LP_COMMAND Command
LP_ISSUECMD Issue command...
LP_SYNONYMS Set synonyms...
LP_ACTION Set action keys...
LP_RECALLOPTS Set recall options...
LP_OPTIONS Options
LP_FONTS Fonts...
LP_FONTSIZE Fontsize
LP_TABS Tab settings...
LP_GLOBALS Global variables...
LP_OTHEROPTS Other settings...
LP_STATUSLINE Status Line
LP_MSGLINE Message Line
LP_EXITDOC Exit from document
ΓòÉΓòÉΓòÉ 6.111. MENUCHECK ΓòÉΓòÉΓòÉ
Sets or unsets the checkmark for an actionbar item or pulldown item.
Note: Currently only LPEX predefined items can be changed.
Syntax: SET MENUCHECK.name ON/OFF
or QUERY MENUCHECK.name
Parameters:
name This is either the predefined LPEX name for a LPEX defined
menuitem or a numeric value for a user acdded item. This numeric
value can be obtained using the QUERY ACTIONBARID. command.
ON check the actionbar/pulldown item.
OFF uncheck the actionbar/pulldown item.
INVERSE toggles between ON and OFF
Note: Currently INVERSE is not implemented.
MENUCHECK controls the checkmark of actionbar items or pulldown items. If the
command is issued when the message window has the focus the action is
performed on the message window otherwise the action is performed on the
current document/view window.
See MENUACTIVE for the predefined LPEX names.
ΓòÉΓòÉΓòÉ 6.112. MESSAGELINE ΓòÉΓòÉΓòÉ
Control display of last generated.
MESSAGELINE controls the displaying of the last message. This control is in
addition to the MESSAGES option. This option only control where the last
message is to be displayed in addition to the message area in the
message/windowlist window.
Syntax: SET MESSAGELINE DYNAMIC/ON/OFF/INVERSE
or QUERY MESSAGELINE
Parameters:
DYNAMIC display the last message in the data area overlaying the first
text line temporarily until the next function is performed.
ON display the last message in a special area at the bottom of the
window.
If the MESSAGELINE setting is not ON the space is not reserved in
the window.
OFF do not display the last message anywhere.
INVERSE toggles between ON and OFF, and sets DYNAMIC to OFF
ΓòÉΓòÉΓòÉ 6.113. MESSAGES ΓòÉΓòÉΓòÉ
Control display of messages.
MESSAGES controls the display of messages. Messages will not be displayed if
set OFF. If set ON, messages are queued until the current command finishes.
IMM(ediate) displays messages as they are generated.
Syntax: SET MESSAGES ON/OFF/INVERSE/IMM
or QUERY MESSAGES
Parameters:
ON queue messages until current command finishes
OFF do not display messages
INVERSE toggles between ON and OFF, and sets IMM to OFF
IMM displays messages immediately
ΓòÉΓòÉΓòÉ 6.114. MODES (QUERY only) ΓòÉΓòÉΓòÉ
Character modes for the current element.
MODES queries the character modes for the element.
The string returned specifies whether the characters are SBCS or DBCS. A
character value of 0 is returned for the former. For the latter a character
value of 1 or 2 is returned depending on whether the position is the leftmost
or rightmost position of the double byte character.
Syntax: QUERY MODES
ΓòÉΓòÉΓòÉ 6.115. MSGDEPTH ΓòÉΓòÉΓòÉ
Maximum number of retained messages.
MSGDEPTH limits the number of messages that LPEX will retain for display in the
message window. As new messages are added, the oldest messages are lost.
Syntax: SET MSGDEPTH n
or QUERY MSGDEPTH
Parameters: n - the maximum depth of message window (default 50)
ΓòÉΓòÉΓòÉ 6.116. MSGFONTSIZE ΓòÉΓòÉΓòÉ
This function no longer has any meaning in this version of LPEX.
Size of characters in the main message window.
ΓòÉΓòÉΓòÉ 6.117. MSGWIDTH ΓòÉΓòÉΓòÉ
Formatting width for messages.
This function no longer has any meaning in this version of LPEX.
MSGWIDTH splits long messages into a number of lines, each no longer than
MSGWIDTH characters. The split is done at a convenient blank, if possible. The
value can be positive or negative. If negative, MSGWIDTH is the current screen
width, minus n.
Syntax: SET MSGWIDTH n
or QUERY MSGWIDTH
Parameters: n - the width in characters of the message pop-up box (default is
current screen width minus two)
ΓòÉΓòÉΓòÉ 6.118. MSGWINDOW ΓòÉΓòÉΓòÉ
Set the mode of the message window.
MSGWINDOW gives control over whether the message is visible, minimized or
maximized. or activated.
Syntax: SET MSGWINDOW option
Parameters:
ACTIVATE the window is restored if necessary and the focus set to the
window.
MINLPEX all windows in the entire LPEX session is minimised including any
ancilliary windows such as HELP and Find/Change. (note that MIN
is not an abbreviation for this - only for MINIMIZED
MINimized the window is minimised - if the window was hidden it is made
visible before minimizing.
MAXimized the window is maximized - if the window was hidden it is made
visible before maximizing.
VISIBLE the window set to restored size and made visible - focus is not
necessarily given to the window.
ΓòÉΓòÉΓòÉ 6.119. MSGWINDOWID (QUERY only) ΓòÉΓòÉΓòÉ
This QUERY returns the id (handle) of the message/windowlist window.
Syntax: QUERY MSGWINDOWID
ΓòÉΓòÉΓòÉ 6.120. MSGWINDOWPOS ΓòÉΓòÉΓòÉ
Positions and optionally sizes message window.
SET MSGWINDOWPOS x y [cx cy]
The parameters are all in pels and refer to the frame, not the client area. x
and y set the position of the lower left corner, while cx and cy set the width
and depth. If cx and cy are omitted or set to 0 the window is not resized.
Setting both cx and cy to -1 will maximize the window (x and y will be
ignored).
Note that some part of the window must be visible on the desktop, whose size
can be obtained by QUERY SCREEN. Note also that LPEX ensures that the client
area is always a whole number of characters wide or deep, so the cx and cy
values may be adjusted by LPEX to ensure this.
ΓòÉΓòÉΓòÉ 6.121. NAME ΓòÉΓòÉΓòÉ
Set the document name.
NAME changes the name of the current document. A name may be up to 80
characters in length, although a limited number of characters may be visible at
one time in the window title bar.
Syntax: SET NAME name
or QUERY NAME
Parameters: name - the new name for the current document
ΓòÉΓòÉΓòÉ 6.122. NOBLANKS ΓòÉΓòÉΓòÉ
Setting NOBLANKS ON causes trailing blanks to be removed when an unformatted
file is saved by the SAVE command
Syntax: SET NOBLANKS ON/OFF/INVERSE
or QUERY NOBLANKS
ΓòÉΓòÉΓòÉ 6.123. NOSAVE ΓòÉΓòÉΓòÉ
Do not allow document to be saved.
NOSAVE protects a document from being autosaved or saved by the SAVE command.
Syntax: SET NOSAVE ON/OFF/INVERSE
or QUERY NOSAVE
ΓòÉΓòÉΓòÉ 6.124. OPENLIST ΓòÉΓòÉΓòÉ
Sets the initializing conditions for the file dialogs.
OPENLIST determines whether the Files list is to be initialised automatically
on initial opening of the Open, Get or Save As dialogs.
Syntax: SET OPENLIST ON/OFF/INVERSE
or QUERY OPENLIST
ΓòÉΓòÉΓòÉ 6.125. OVERFONT ΓòÉΓòÉΓòÉ
Set fonts for overlay lines.
OVERFONT.n sets the fonts for the overlay which appears on line n of the view.
Each digit in the string parameter sets the font for the corresponding
character position on the screen. These fonts are in the range zero through
nine and are defined by the SET FONT.n command. They may be reset by the SET
FONT.n command without affecting the appearance of the overlay line, unless a
further SET OVERFONT command is issued. If no string is specified, the font set
by FONT.OVERLAY is used.
Syntax: SET OVERFONT.n [string]
or QUERY OVERFONT.n
Parameters:
n the screen line for which the fonts are to be set. A positive
value is counted from the top of the window, a negative value
from the bottom.
string a numeric string (ranging from zero through nine) in which each
digit identifies a font. If the string is shorter than the
overlay, the font set in FONT.OVERLAY fills the remaining
positions.
ΓòÉΓòÉΓòÉ 6.126. OVERHANG ΓòÉΓòÉΓòÉ
Specify overhang for flowed elements.
OVERHANG determines the indentation of flowed elements. When elements are
automatically flowed from one line to the next, the second and subsequent lines
start at the same indentation as the first flowed element. A positive value for
OVERHANG will indent the flowed lines to the right of the first line, whilst a
negative value will cause the flowed lines to appear to the left of the first
line. The amount of the offset is the product of OVERHANG multiplied by INDENT.
OVERHANG has a switch on value of one but subsequently defaults to zero.
Syntax: SET OVERHANG [n]
or QUERY OVERHANG
Parameters: n - the value by which INDENT is multiplied to determine the
number of characters by which to offset lines
ΓòÉΓòÉΓòÉ 6.127. OVERLAY ΓòÉΓòÉΓòÉ
Set text for overlay line.
OVERLAY.n determines that a given string is overlaid onto the whole of row n of
the screen. The string appears in the font set by SET FONT.OVERLAY unless SET
OVERFONT.n overrides this. An OVERLAY line is switched off by using SET
OVERLAY.n with no text. n must have the same value and sign as was used when
the overlay was first specified.
Syntax: SET OVERLAY.n [string]
or QUERY OVERLAY.n
Parameters:
n the line on which the overlay is to appear. A positive value is
counted from the top of the screen, a negative value from the
bottom.
string text to appear on the overlay line
ΓòÉΓòÉΓòÉ 6.128. PAD ΓòÉΓòÉΓòÉ
Set the pad character.
PAD determines the character which will be used to extend or fill elements as
required.
Syntax: SET PAD char
or QUERY PAD
ΓòÉΓòÉΓòÉ 6.129. PARENT ΓòÉΓòÉΓòÉ
Set the parent window for LPEX.
PARENT changes the parentage of LPEX to the window whose handle is passed as
the parameter. It the parameter is 0, LPEX is reset to have the DESKTOP
(screen) as the parent. Any open documents are also given the new window as the
parent. The current positioning is maintained at the same relative position to
the new parent as it was before resulting in the windows being relocated on the
screen. All dialogs and the windowlist window will always have the DESKTOP as
the parent.
The parent of LPEX must be the CLIENT window if a frame and if the id of the
frame window is passed LPEX will find the id of the CLIENT.
Changing the parent provides two charactestics.
o The windows are clipped to the boundary of the parent window.
o LPEX is hidden if the parent is minimised.
Syntax: SET PARENT id
where id is the handle of the window to which the LPEX parentage is
to be assigned. A value of 0 means the DESKTOP.
or QUERY PARENT
ΓòÉΓòÉΓòÉ 6.130. PARSER ΓòÉΓòÉΓòÉ
Define the live parser to be used.
PARSER defines which parser is to be used. This sets the command to be invoked
by the TRIGGER command to process elements on the pending list. As each is
processed, the parser command specified by SET PARSER is invoked with the
pending element temporarily set to the current element. A call to SET PARSER
will process any pending changed elements before the new parser is selected or
switched off. Automatic parsing is switched off if SET PARSER is used without
parameters.
The parser command must be a native command and is invoked with the parameter
string specified on the SET PARSER command. The parser itself can be a macro or
an external LPEX command. If so, the native command must be LXR. Automatic
parsing of elements may be switched off by using SET PARSER without a command
name or parameters. See also SET FULLPARSE
Syntax: SET PARSER [command] [parameters]
or QUERY PARSER
Parameters:
command the command to be invoked by TRIGGER
parameters the parameters required by command
ΓòÉΓòÉΓòÉ 6.131. PENDING ΓòÉΓòÉΓòÉ
Element is pending processing by parser.
PENDING can add or drop the current element from the trigger list of elements
waiting to be processed. Elements are added to the pending list if a PARSER is
set and their text content is changed by commands such as INSERT and SET
CONTENT or by overtyping. An element is also automatically added to the list
if a PARSER is set and the element becomes the current element after an element
is deleted by any means. SET PENDING without a parameter adds the current
element to the pending list.
Syntax: SET PENDING OFF/PARSER/CHANGE/DELETE/ BOTH
or QUERY PENDING
Parameters: one of the following:
OFF drops current element from pending list
PARSER indicates to a post-parser process that the element has been
changed by the main parser but the text has not changed. This
form of the command should only be issued by the main parser.
CHANGE forces reprocessing when current element has been changed
DELETE forces reprocessing when the prior element has been deleted,
There may have been several elements deleted.
BOTH forces reprocessing when both a change and deletion have occurred
ΓòÉΓòÉΓòÉ 6.132. POSITION ΓòÉΓòÉΓòÉ
Set character position in element.
POSITION moves the current position within the character content of the current
element. The current position may be to the right of the last character of the
element (allowing a Block copy or move before that position to place data after
the last character of the data, for example).
Syntax: SET POSITION n
or QUERY POSITION
Parameters: n - a positive value up to one greater than the length of the
content of the element
ΓòÉΓòÉΓòÉ 6.133. PROFILES ΓòÉΓòÉΓòÉ
Set profiles to be used.
PROFILES sets the list of profiles that are to be used (if available) during
LOAD or SAVE. This setting overrides any previous SET PROFILES.
Syntax: SET PROFILES [SYSTEM] [LOAD] [USER] [SAVE]
or QUERY PROFILES
Parameters: one of the following:
SYSTEM PROFSYS.LX (the system profile) is called after LOAD, but before
an extension-dependent macro
LOAD loads extension-dependent macro. Its name will match DOCTYPE and
have an LXL extension.
USER PROFILE.LX is called after LOAD and after PROFSYS and
extension-dependent macro
SAVE macro with name matching doctype .LXS is called to set formatting
defaults
By default, all four are used.
ΓòÉΓòÉΓòÉ 6.134. PROTECT ΓòÉΓòÉΓòÉ
Classes to be protected on display.
PROTECT ensures that elements specified in classlist are protected against
overtyped changes. Changes by other means such as macros are still allowed.
Syntax: SET PROTECT classlist
or QUERY PROTECT
Parameters: classlist - the list of classes protected against overtyped
changes
ΓòÉΓòÉΓòÉ 6.135. RAWTEXT (QUERY only) ΓòÉΓòÉΓòÉ
Data content of an element without symbol substitution.
RAWTEXT returns the content of the character string of the current element.
Irrespective of the setting of SYMBOLS any substituted characters are restored
to the original symbol string. Using the form instead of CONTENT guarantees
that if the text is replaced by a SET CONTENT the symbol variables will be
retained.
Syntax: QUERY RAWTEXT
ΓòÉΓòÉΓòÉ 6.136. READONLY ΓòÉΓòÉΓòÉ
Protect elements from changes.
READONLY protects a view from changes to its elements. An attempted overtype
sounds an alarm.
Syntax: SET READONLY ON/OFF/INVERSE
or QUERY READONLY
ΓòÉΓòÉΓòÉ 6.137. RECALL ΓòÉΓòÉΓòÉ
Set command recall options.
RECALL sets the size of command-recall buffer. LPEX maintains a buffer of
recently entered commands which can be recalled. By default this buffer holds
up to 12 commands, but the size can be any value between 1 and 1000. RECALL
also lets you determine which commands get saved in the buffer. By default only
those issued through the command line are saved, but you can also specify that
commands issued by selecting menu pull-down options or by pressing keys to
which actions have been assigned are also recallable.
Syntax: SET RECALL n [COMMANDLINE] [PULLDOWN] [ACTIONKEY]
or QUERY RECALL
Parameters:
n the size of the recall buffer. The minimum value is 1, the
maximum is 1000 and the default is 12.
COMMANDLINE commands issued through the command line are to be recallable
PULLDOWN commands issued through menu pull-down options are to be
recallable
ACTIONKEY commands issued by pressing action keys are to be recallable
ΓòÉΓòÉΓòÉ 6.138. RESOLVE (QUERY only) ΓòÉΓòÉΓòÉ
Resolution of command to be executed.
RESOLVE.name returns a string describing the command that would be executed if
name were issued as a command. This response will be SYNONYM, NATIVE, QUERY or
?. The question mark is returned if the command might be an OS/2 command, an
LPEX macro or is unknown. QUERY is returned for any name that would resolve to
a QUERY command. If SYNONYM is returned, the value of that synonym is also
included. NATIVE implies that the command is built into LPEX.
Syntax: QUERY RESOLVE.name
Parameters: name - the name of the command to be queried
ΓòÉΓòÉΓòÉ 6.139. REXX ΓòÉΓòÉΓòÉ
Enable use of REXX (if resident).
If a REXX interpreter is present, LPEX will use it for executing macros as long
as the REXX option is ON (which is the default). Switching it OFF will force
LPEX to use the built-in macro processor which, though faster, has no support
for variables, conditional processing etc.
ΓòÉΓòÉΓòÉ 6.140. SCREEN (QUERY only) ΓòÉΓòÉΓòÉ
Summary of window characteristics.
SCREEN gives the number of rows and columns in the window.
SCREEN also gives the size (in PELS) of the data area and the (nominal)
character size for the window. See also FONTSIZE.
Syntax: QUERY SCREEN
ΓòÉΓòÉΓòÉ 6.141. SECONDS (QUERY only) ΓòÉΓòÉΓòÉ
Seconds elapsed since start of LPEX session.
SECONDS gives the number of seconds since the LPEX session started.
Syntax: QUERY SECONDS
ΓòÉΓòÉΓòÉ 6.142. SHOW ΓòÉΓòÉΓòÉ
Indicate if element for show.
SHOW indicates that an element is purely for show, to improve the presentation
of a document while editing. SHOW elements are automatically excluded when
documents are written to a file. Setting SHOW ON or OFF increments the change
count and may be undone with the UNDO command. SHOW elements can be excluded
from the display explicitly by using SET SHOWS OFF.
Syntax: SET SHOW ON/OFF/INVERSE
or QUERY SHOW
ΓòÉΓòÉΓòÉ 6.143. SHOWCURRENT ΓòÉΓòÉΓòÉ
Force current element to be visible.
SHOWCURRENT OFF (the default) ensures that the current position always moves to
a visible element. SHOWCURRENT ON forces the current element to be visible,
regardless of the settings of INCLUDE and EXCLUDE.
Syntax: SET SHOWCURRENT ON/OFF/INVERSE
or QUERY SHOWCURRENT
ΓòÉΓòÉΓòÉ 6.144. SHOWS ΓòÉΓòÉΓòÉ
Enable display of show elements.
SHOWS displays SHOW elements. Turning SHOWS OFF suppresses the display of SHOW
elements.
Syntax: SET SHOWS ON/OFF/INVERSE
or QUERY SHOWS
ΓòÉΓòÉΓòÉ 6.145. SIDESCROLL ΓòÉΓòÉΓòÉ
Gives offset of leftmost visible column.
SIDESCROLL gives the number of columns that cursor is positioned to the right
of column one. LPEX scrolls sideways to keep the current position visible. When
no sideways scrolling is in effect, zero is returned.
Syntax: SET SIDESCROLL n
or QUERY SIDESCROLL
ΓòÉΓòÉΓòÉ 6.146. SPACE ΓòÉΓòÉΓòÉ
The character used to highlight formatting spaces.
SPACE defines which character is used to occupy the blank areas into which
nothing has been typed.
Syntax: SET SPACE [char]
or QUERY SPACE
Parameters: char - the required SPACE character
ΓòÉΓòÉΓòÉ 6.147. SPILL ΓòÉΓòÉΓòÉ
Formatting width for spillable elements.
SPILL determines the width at which SPILLable elements are formatted. If an
element, whose FORMAT includes the SPILL option, is longer than the SPILL width
the line will end at a blank and a new line is started. If SPILL is larger than
FORMWIDTH, it has no effect.
Syntax: SET SPILL n
or QUERY SPILL
Parameters: n - the width (in characters) at which a new line begins for a
SPILLable element. This must be in the range 20 through 2500.
ΓòÉΓòÉΓòÉ 6.148. STATUSLINE ΓòÉΓòÉΓòÉ
Control display of last generated.
STATUSLINE controls the displaying of the document/view status.
The status is in three parts.
Insert/replace mode and cursor position in the file.
Number of changes since the last SAVE
Whether in BROWSEmode.
Syntax: SET STATUSLINE/ON/OFF/INVERSE/ IMM
or QUERY STATUSLINE
Parameters:
ON display the status in a special area at the top of the window.
If the STATUSLINE setting is not ON the space is not reserved in
the window.
OFF do not display the status anywhere.
INVERSE toggles between ON and OFF, and sets DYNAMIC to OFF
ΓòÉΓòÉΓòÉ 6.149. SUBGROUP ΓòÉΓòÉΓòÉ
Display local group only.
SUBGROUP displays only the local group. The elements in the same context as the
current position, bounded by the setting of BOUND, are the display group. This
group can be selected for display (with all other data lower than or at the
level of BOUND, excluded). by setting SUBGROUP ON. The default of SUBGROUP OFF
causes all elements at or below BOUND to be displayed, regardless of their
relationship to the current position.
Syntax: SET SUBGROUP ON/OFF/INVERSE
or QUERY SUBGROUP
ΓòÉΓòÉΓòÉ 6.150. SYMBOL ΓòÉΓòÉΓòÉ
Special character symbolic font.
SYMBOL.string sets up a new special character symbol. When the string is typed
into the data, it will be replaced by the hexadecimal code and font associated
with the required symbol (providing AUTOSYMBOLS is ON or a live parser is
processing the symbols). If no font is given the default font (BASEFONT) for
the element will be used. When SET SYMBOLS is ON, any occurrence of the special
character in the data will be displayed as the required symbol. Optionally, a
second font may be specified. This font will never be set by LPEX but will be
recognised as also identifying the the character c as the representation of the
special character symbol.
For example
SET SYMBOL.!alpha. xe0 *
and
SET SYMBOL.!alpha. 224 *
will both have the same effect. Typing !alpha will enter the Greek alpha
character, in font *.
Syntax: SET SYMBOL.string c font [altfont]
or QUERY SYMBOL.string
Parameters:
string string to be typed into data (15 character maximum length)
c the single character, hexadecimal code or three digit code
representing the special character to replace string in the data.
font the font in which the special character will appear
altfont the alternate font in which the special character can appear
ΓòÉΓòÉΓòÉ 6.151. SYMBOLLIST (QUERY only) ΓòÉΓòÉΓòÉ
Return list of current symbols.
SYMBOLLIST gives an unordered list of the names of all the symbols set for the
current document.
Syntax: QUERY SYMBOLLIST
ΓòÉΓòÉΓòÉ 6.152. SYMBOLS ΓòÉΓòÉΓòÉ
Display special characters as symbols.
SYMBOLS displays symbols exactly as they were entered, rather than as the
special characters they represent. The symbols are included in data formatted
for the screen or saving; the document itself is not changed.
Syntax: SET SYMBOLS ON/OFF/INVERSE
or QUERY SYMBOLS
ΓòÉΓòÉΓòÉ 6.153. SYNONYM ΓòÉΓòÉΓòÉ
Value of a synonym.
SYNONYM.name sets up a synonym for a command. When used at the start of an
interactive command, a synonym will be replaced by the value of the synonym
before the command is executed. For example
SET SYNONYM.BLOCKSHIFT 6 BLOCK SHIFT RIGHT 2
would cause the marked block to be moved two characters to the right if any of
BLOCKSHIFT, BLOCKSHIF, BLOCKSHI or BLOCKSH were typed on the command line.
Syntax: SET SYNONYM.name length value
or QUERY SYNONYM.name
Parameters:
name arbitrary name (the synonym) given to the command
length the length that name may be abbreviated to and still recognized.
The maximum length is 15 characters.
value the command to be issued when name is typed
ΓòÉΓòÉΓòÉ 6.154. SYNONYMLIST (QUERY only) ΓòÉΓòÉΓòÉ
Return list of current synonyms.
SYNONYMLIST gives a list of all the synonyms set for the current document.
Syntax: QUERY SYNONYMLIST
ΓòÉΓòÉΓòÉ 6.155. TABS ΓòÉΓòÉΓòÉ
Set tab positions.
TABS sets the tabulation stops for a document. When the Tab or Backtab key is
pressed, the cursor moves to the next or previous tab position respectively.
Tabs may be set at a number of explicit positions and/or at fixed intervals.
For example:
SET TABS 8 12 16 EVERY 10
will set tabs at positions 8, 12, 16, 26, 36, 46 and so forth. A maximum of 50
explicit positions may be set, and these must be supplied in increasing value.
By default tabs are set every eight positions.
Syntax: SET TABS [n1 n2 n3] [EVERY m]
or QUERY TABS
Parameters:
n1 n2 n3 the character positions at which tabs stops are explicitly
required
EVERY m tab stops are set at intervals of m (default eight)
ΓòÉΓòÉΓòÉ 6.156. TRIGPOS ΓòÉΓòÉΓòÉ
Position to use after trigger processing.
TRIGPOS sets the position which will become the current position after trigger
processing is complete. This is character n in the element. If TRIGPOS is not
set, the current position is saved before trigger processing and restored
afterwards.
QUERY TRIGPOS returns a number which indicates the saved current position. If
the position is unknown a zero is returned. If the position is in the current
element, a positive number is returned. If the position is known but is not on
the current element an negative number is returned.
Syntax: SET TRIGPOS n
or QUERY TRIGPOS
Parameters: n - the character position to become the current position after
trigger processing
ΓòÉΓòÉΓòÉ 6.157. UNPROTECT ΓòÉΓòÉΓòÉ
Classes to be unprotected on display.
UNPROTECT releases elements specified in classlist from protection against
overtyped changes. Normally UNPROTECT is used to temporarily negate the effect
of PROTECT command.
Syntax: SET UNPROTECT classlist
or QUERY UNPROTECT
Parameters: classlist - the list of classes released from protection against
overtyping changes
ΓòÉΓòÉΓòÉ 6.158. VERSION (QUERY only) ΓòÉΓòÉΓòÉ
LPEX version identification.
VERSION gives the version of LPEX being used. This is of the form:
LPEX Version 2.00
Syntax: QUERY VERSION
ΓòÉΓòÉΓòÉ 6.159. VIEW (QUERY only) ΓòÉΓòÉΓòÉ
Gives name of view.
VIEW.n displays the name of view n of the current document.
Syntax: QUERY VIEW.n
Parameters: n - the number of the view for which the name is requested.
ΓòÉΓòÉΓòÉ 6.160. VIEWHELP ΓòÉΓòÉΓòÉ
Add supplementary help libraries for the current view.
Syntax: SET VIEWHELP libraries
or QUERY VIEWHELP
Parameters: libraries - one or more library names separated by blanks. These
are the names of files produced using the Information Presentation
Facility compiler. At run time, these files should be in the path
defined by the HELP environment variable. This variable is usually
defined in CONFIG.SYS.
This command can be used in conjunction with the SET ACTIONBAR command to
provide custom help panels for custom action bar items.
ΓòÉΓòÉΓòÉ 6.161. VIEWLIST (QUERY only) ΓòÉΓòÉΓòÉ
List current view numbers.
VIEWLIST gives a list of the numbers of all views currently in memory,
separated by blanks.
Syntax: QUERY VIEWLIST
ΓòÉΓòÉΓòÉ 6.162. VIEWNAME ΓòÉΓòÉΓòÉ
Name of the current view.
VIEWNAME is the name given to each view when it is created. The default name
for the first view is Document, and subsequent views default to Viewn where n
is the view number. To move to a named view, use the GOVIEW NAME command.
Syntax: SET VIEWNAME [name]
or QUERY VIEWNAME
Parameters: name - the name to be given to the specific view. If none is
given, then the name is reset to the default.
ΓòÉΓòÉΓòÉ 6.163. VIEWNUM (QUERY only) ΓòÉΓòÉΓòÉ
Unique number identifying view.
VIEWNUM gives the unique number which identifies the current view amongst all
of the views of the document created in the current session. The initial view
has a VIEWNUM of one, and VIEWNUM for each successive view is incremented by
one.
Syntax: QUERY VIEWNUM
ΓòÉΓòÉΓòÉ 6.164. WINDOW ΓòÉΓòÉΓòÉ
Set the mode of the document window.
WINDOW give control over whether the current document is
visible/hidden/minimized/maximized or activated.
Syntax: SET WINDOW option
Parameters:
HIDDEN the window is hidden from view - the is restored to normal before
hiding.
MINimized the window is minimised - if the window was hidden it is made
visible before minimizing.
MAXimized the window is maximized - if the window was hidden it is made
visible before maximizing.
VISIBLE the window set to restored size and made visible - focus is not
necessarily given to the window.
ACTIVATEd the window is made visible and then place on top with the focus.
ΓòÉΓòÉΓòÉ 6.165. WINDOWID (QUERY only) ΓòÉΓòÉΓòÉ
Unique number identifying window to PM.
WINDOWID returns the unique number PM has assigned as the handle of the window.
This number may be used to SEND or POST PM messages to that window. This is
particularly necessary when operation in a modeless dialog.
Syntax: QUERY WINDOWID
ΓòÉΓòÉΓòÉ 6.166. WINDOWMAP (QUERY only) ΓòÉΓòÉΓòÉ
Map window row usage.
WINDOWMAP gives a map of the usage of row on the screen when it was last built
or displayed. Each row on the screen is represented by a single character in
the returned character string:
o Digits for data. Data lines may appear empty when no data is available for
them.
o O for an Overlay line.
o "." for an empty line that cannot be used by data.
ΓòÉΓòÉΓòÉ 6.167. WINDOWPOS ΓòÉΓòÉΓòÉ
Positions and optionally resizes a view window
Syntax: SET WINDOWPOS x y [cx cy]
or QUERY WINDOWPOS
Parameters: The parameters are all in pels and refer to the frame, not the
client area. x and y set the position of the lower left corner,
while cx and cy set the width and depth. If cx and cy are omitted or
set to 0 the window is not resized. Setting both cx and cy to -1
will maximize the window (x and y will be ignored).
Note Some part of the window must be visible on the desktop, whose size can be
obtained by QUERY SCREEN. Also, LPEX ensures that the client area is always a
whole number of characters wide or deep, so the cx and cy values may be
adjusted by LPEX to ensure this.
ΓòÉΓòÉΓòÉ 6.168. WINDOWSHOW ΓòÉΓòÉΓòÉ
Controls when document and view windows are first shown.
SET WINDOWSHOW CREATE shown when the window is created.
SET WINDOWSHOW LOAD (the default) shown after the document has been loaded.
SET WINDOWSHOW PARSE shown after the document has been parsed.
SET WINDOWSHOW USER shown explicitly by the next SET WINDOW VISIBLE command.
QUERY WINDOWSHOW returns the current value.
ΓòÉΓòÉΓòÉ 6.169. WORDCHARS ΓòÉΓòÉΓòÉ
Define the characters which are to be considered a word in LPEX.
WORDCHARS determines the valid word characters. The default word characters are
the national language alphabetic characters as defined by the current codepage,
plus the numerics.
Syntax: SET WORDCHARS [characters]
SET WORDCHARS characters sets the valid word characters to the list
provided - this list replaces any previous character list.
The LPEX concept of a word does not apply to the Double Byte Character Set
(for example KANJI) and so the list is restricted to the Single Byte
Character Set.
or QUERY WORDCHARS
The characters are returned in ASCII collating sequence according to the
codepage in force.
ΓòÉΓòÉΓòÉ 6.170. WRAP ΓòÉΓòÉΓòÉ
Wrap elements for the display.
WRAP ON ensures that elements will wrap from one line to the next if the
formatted line is longer than the screen width.
Syntax: SET WRAP ON/OFF/INVERSE
or QUERY WRAP
ΓòÉΓòÉΓòÉ 7. LPEX Application programming interface. ΓòÉΓòÉΓòÉ
This section explains the LPEX API interface for creating your own commands.
ΓòÉΓòÉΓòÉ 7.1. Program Entry Conditions ΓòÉΓòÉΓòÉ
Your external command will receive control at a routine called lxmain(). This
is defined like this:
int lxmain(parm)
uchr *parm;
The type 'uchr' is simply an abbreviation for 'unsigned char' and is defined in
the LPEX external command header files.
The argument is a pointer to the command's parameter string: In other words
everything typed following the command name on LPEX's command line.
The return value is the return code sent back to LPEX. The value -1 is
reserved of LPEX's own use and you must not return this value from your
external commands. Some LPEX commands return other codes up to -9, which may
be returned to your external command under certain conditions. We suggest that
you allocate your return codes starting from -10.
ΓòÉΓòÉΓòÉ 7.2. LPEX Access Library Calls ΓòÉΓòÉΓòÉ
In order to allow the external command programmer full access to LPEX without
having to expose the full internal data structures, a library of C-callable
LPEX access functions are provided. These functions are listed here and
described in more detail below.
lxcmd() A routine to call an LPEX command.
lxcall() An alternative routine to call LPEX commands.
lxalloc() Allocate storage through LPEX.
lxfree() Free storage allocated with lxalloc().
lxquery() Query LPEX data items and settings.
lxhab() Obtain the handle to the anchor block.
lxnext() steps to the next element
lxprev() steps to the previous element
lxqtext(). Query the content of an element
lxstext() Set the content of an element.
lxqfont() Query the font string associated with an element
lxsfont() Set the font string for an element
lxqmode() Query the DBCS mode string for the current element.
lxqclass() Returns a long int describing the classes which apply to the
current element.
lxsclass() This command sets the classes which apply to the current element.
lxinsert() Insert text as a new element.
lxqmode() This call returns the DBCS mode string.
lxlink_user() Add a user defined pointer to some object to the element, view
or document control block.
lxquery_user() Query the user defined pointer within the element, view or
document control block.
lxfind_user() Find the (next) element associated with the pointer passed as a
parameter.
lxqgmlfnt() Find the string of fonts recognised by the GML parser.
lxgmlfntadd() Append your font codes to those already recognised by the GML
lxqelestate() Query the satus of the element, whether VISIBLE, SHOW and/or
PROTECTed.
ΓòÉΓòÉΓòÉ 7.3. API function descriptions. ΓòÉΓòÉΓòÉ
In the following function descriptions, the type uchr is used. This is defined
in the LPEX header file to be equivalent to unsigned char.
ΓòÉΓòÉΓòÉ 7.3.1. lxcmd() ΓòÉΓòÉΓòÉ
int far lxcmd(uchr far *cmd);
The Return Code is the return code from LPEX as defined for the command being
invoked.
This function provides a way of issuing any LPEX command, as though it was
issued from the Command...->Issue_command dialog. The argument is a single
string which contains the command to be executed.
For example:
lxcmd("INSERT this is a new element");
lxcmd("FIND UP ASIS needle");
lxcmd("NEXT WORD");
ΓòÉΓòÉΓòÉ 7.3.2. lxcall() ΓòÉΓòÉΓòÉ
int far lxcall(uchr far *rtn,
uchr far *arg);
The Return Code is the return code from LPEX as defined for the command being
invoked.
This is an alternative method of issuing LPEX commands. Two arguments are
passed - the first the command name and the second the parameters for the
command.
For example:
lxcall("INSERT", "this is a new element");
lxcall("MSG", "this is a message");
lxcall("NEXT", "WORD");
ΓòÉΓòÉΓòÉ 7.3.3. lxalloc() ΓòÉΓòÉΓòÉ
uchr far * far lxalloc(int size);
The Return Code is the address of the allicated storage or a NULL pointer if
the allocation fails.
Sometimes it may be necessary for an external command to add to or subtract
from the LPEX internal data structures. It is recommended that this be done by
issuing LPEX commands through the lxcmd() or lxcall() interfaces, but
occasionally this may not be possible. For example an external command may wish
to create control information which must continue to exist after the command
has terminated (so that it may be examined by another command later).
It is possible to use the SYNONYM mechanism to solve the problem since it can
be used to create and modify global variables. However this may be confusing
to the user and in any case is not suitable for handling complex data
consisting of bit fields or arbitrary byte values.
Depending on the operating system and compile and link options used to create
the command it may or may not be possible to use the standard C library malloc
function to obtain memory space, but again depending on conditions this memory
may or may not persist across different invocations of the command. The
lxalloc is provided to remove all these dependencies.
The lxalloc() is essentially a malloc call using LPEX's own internal storage
manager. Using this function will therefore always work and will allocate
storage which will last throughout the whole execution of the LPEX program.
A word of warning: It is not a good idea to use these functions to create new
elements or destroy old ones directly.This is because doing so will bypass the
normal LPEX recording mechanisms which are used by AUTOSAVE, UNDO and QUIT.
Since changes will not be properly recorded they will not be able to be undone
and may allow the user to QUIT without saving. Any changes to element text or
fonts should be done using commands (via lxcmd() or lxcall()) such as:
INSERT
DELETE
CHANGE
SET CONTENT
SET FONTS
ΓòÉΓòÉΓòÉ 7.3.4. lxfree() ΓòÉΓòÉΓòÉ
void far lxfree(ptr)
unsigned char far *ptr;
The lxfree() function should be used to free any storage allocated through
lxalloc() that is no longer required.
Note: Do not use C's free() function to free storage obtained via lxalloc().
ΓòÉΓòÉΓòÉ 7.3.5. lxquery() ΓòÉΓòÉΓòÉ
uchr far * far lxquery(uchr far *item,
uchr far *buffer);
The Return Code is a pointer to "buffer"
This function is used to extract data from LPEX. The function is passed a
string containing the item to be queried and a buffer to hold the result. The
buffer must be large enough for the result - the constant MAXLEN defined in
LPEX2API.H is set to the longest possible result.
The function provides access to almost the entire internal state of LPEX (see
the LPEX QUERY command for a detailed list of items) in a way which is
independent of the actual internal LPEX data structures. The result returned
by lxquery() is a string identical to that which would appear in the message
box if a QUERY command were issued i.e. the result of the QUERY command is
preceded by the name of the item queried.
There are three exceptions however: when the result of a QUERY command
consists of an empty string, a single blank or multiple blanks, the result is
shown in the message box as <null> , <blank> or <blanks>. respectively. This
is just for visual clarity, the result from lxquery() is the true resulting
string.
Note: Unlike the LPEX QUERY COMMAND, only a single item may be queried at a
time.
For example:
b = lxalloc(MAXLEN);
lxquery("VERSION", b);
lxquery("COUNTRY", b);
ΓòÉΓòÉΓòÉ 7.3.6. lxhab() ΓòÉΓòÉΓòÉ
void far * lxhab(void);
The Return Code is the HAB for the process.
This call returns the hab and may be used to invoke dialog boxes etc from
external commands.
ΓòÉΓòÉΓòÉ 7.4. "Fast Path" commands ΓòÉΓòÉΓòÉ
It is entirely possible to write parsers and other external commands using the
above commands, however the code
lxquery("CONTENT",buff);
would return a string of the form
CONTENT this is the content
and the external command would have to step over the command name CONTENT etc.
Obviously the parsing of the ASCII string within LPEX itself will also take
time. For these reasons the following fast path commands have been provided,
which directly set or query the content, fonts and classes of the current
element.
In the following calls the int return code is always 0 unless otherwise stated.
ΓòÉΓòÉΓòÉ 7.4.1. lxnext() ΓòÉΓòÉΓòÉ
int lxnext(void);
The Return Code is 1 if called when on the last element, otherwise 0.
This command moves the "current element" pointer to the next element. For
example to step forwards through each element in the file, a simple loop could
be used:
do {
something();
} while ( lxnext() == 0 )
ΓòÉΓòÉΓòÉ 7.4.2. lxprev() ΓòÉΓòÉΓòÉ
int lxprev(void);
The Return Code is 1 if called when on the first element, otherwise 0.
This command moves the "current element" pointer to the previous element. For
example to step BACKWARDS through each element in the file, a simple loop could
be used:
do {
something();
} while ( lxprev() == 0 )
ΓòÉΓòÉΓòÉ 7.4.3. lxqtext() ΓòÉΓòÉΓòÉ
int lxqtext(uchr far *buff);
The Return Code is 0.
This command returns the content of the element. It is functionally equivalent
to the command
lxcall("CONTENT",buff);
except that the string returned in buff[] does not contain the item name
i.e.CONTENT. This call does not involve parsing of any ascii command and so is
much faster, and is used in the supplied parsers.
ΓòÉΓòÉΓòÉ 7.4.4. lxstext() ΓòÉΓòÉΓòÉ
int lxstext(uchr far *buff);
The Return Code is 0.
This call replaces the existing text of the current element with the string
contained in "buff".
ΓòÉΓòÉΓòÉ 7.4.5. lxqfont() ΓòÉΓòÉΓòÉ
int lxqfont(uchr far *buff);
The Return Code is 0.
This command returns the font string of the current element in buff[]
ΓòÉΓòÉΓòÉ 7.4.6. lxsfont() ΓòÉΓòÉΓòÉ
int lxsfont(uchr far *buff);
This command is used to set the font string for the current element. The font
string must be of the same length as the text string, and MUST be terminated
with a NULL.
ΓòÉΓòÉΓòÉ 7.4.7. lxqmode() ΓòÉΓòÉΓòÉ
int lxqmode (uchr *buff)
The Return Code is 0.
This call returns in buff[] the DBCS (Double Byte Character Set) mode string
associated with the current element. In OS/2 the ideographic languages use two
bytes to represent a "character". The first byte always lies within a known
range or set of ranges, given by DosGetDBCSEv() while the second byte can lie
anywhere in the range 0 to 255. The second byte of a DBCS character could
therefore be mistaken for a SBCS character. LPEX returns when queried, a string
of the same length as the CONTENT. The characters within that string are set as
follows:
buff[n] = '0' means CONTENT[n] is SBCS
buff[n] = '1' means CONTENT[n] is DBCS1 (first byte)
buff[n] = '2' means CONTENT[n] is DBCS2 (second byte)
External commands may then scan the text of the element, and use the mode
string to ensure that only the SBCS characters are compared with delimiters
such as " or \ or -
Note: The mode string characters are ASCII 0 1 or 2 NOT Hex 0 1 and 2.
ΓòÉΓòÉΓòÉ 7.4.8. lxqclass() ΓòÉΓòÉΓòÉ
int lxqclass(unsigned long int *classlist);
The Return Code is 0.
Each element in an LPEX document may be assigned up to 32 classes and the view
may then be restricted to EXCLUDE certain classes or INCLUDE only certain
classes. This call returns the classes currently assigned to the element, while
the next sets the classes for the current element.
ΓòÉΓòÉΓòÉ 7.4.9. lxsclass() ΓòÉΓòÉΓòÉ
int lxsclass(unsigned long int classlist);
The Return Code is 0.
Typically, a parser written as an external command would read the content of
each element in turn, using lxqtext(), and parse the element in whatever way is
appropriate, setting a font character for each text character in the element.
When parsing of the element is complete, a terminating null should be placed at
the end of the font string and the function lxsfont() called to set the fonts.
Note that the coloured text is displayed when the command SSHOW is executed,
either implicitly when the command returns to LPEX or explicitly when called by
the parser.
Note: The user may PROTECT certain classes via the action bar independant of
any external command, and an element which has a protected class
assigned to it will be effectively write protected. A parser should
take this into account, by setting the class of each element to the
default before parsing, and setting the new classes after.
ΓòÉΓòÉΓòÉ 7.4.10. lxqelestate() ΓòÉΓòÉΓòÉ
long * lxqelestate ()
This call returns a LONG bitmap of the state of the elements The states returns
are whether the element is VISIBLE, a SHOW element or PROTECTED, or any
combination of these. The states are defined in the header file LPEX2API.H as
follows
#define LPEX_ELE_VISIBLE (0x80000000) /* VISIBLE element */
#define LPEX_ELE_SHOW (0x40000000) /* SHOW element */
#define LPEX_ELE_PROTECTED (0x20000000) /* PROTECTED element */
A typical usage would be
if ( lxqelestate() & LPEX_ELE_VISIBLE ) ...
ΓòÉΓòÉΓòÉ 7.5. Routines to associate parser structures to elements, views or document ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.5.1. lxlink_user() ΓòÉΓòÉΓòÉ
int far lxlink_user(long int type,void far *object);
The Return Code is 0 if the link was successful otherwise
1 Link already set.
-2 Invalid type
-10,-11,-12 LPEX Control Block corresponding to type is not allocated.
This command allows the user to set a pointer to an object from the current
element or from the current document. The object to which the pointer points
is defined by the user, and it is the responsibility of the user to (a) ensure
that the object to which the pointer points is within the scope of the LPEX
process etc, and (b) to set the pointer back to NULL before any attempt to
delete the element (including an LPEX QQUIT). If the user has issued a SET
DELETING command, that routine must be used to set the pointer to NULL. If the
pointer is non-NULL, then the delete will fail with an appropriate message.
Pointers such as these may also be removed by commands called via the exit
profile, PROFEXIT.LX which is the executed against the current document as a
result of the user ending the edit session on that document.
To set a pointer from the current element:
if (lxlink_user(LPEX_ELEMENT,"A POINTER TO THIS STRING") != 0)
lxcall("MSG","Could not set pointer of element scope");
To set a pointer from the current document:
if (lxlink_user(LPEX_DOCUMENT,"This is document wide") != 0)
lxcall("MSG","Could not set pointer of document scope");
ΓòÉΓòÉΓòÉ 7.5.2. lxquery_user() ΓòÉΓòÉΓòÉ
int far lxquery_user(long int, void far **);
In conjunction with lxlink_user() this command allows the user to manage some
object which must remain related to the current element or document. The user
must take responsibility for any object to which the pointer points.
To query a pointer from the current element:
if ((lxquery_user(LPEX_ELEMENT,&pointer)) != 0)
lxcall("MSG",Failed to query pointer");
else {
if (pointer != NULL)
lxcall("MSG","User defined pointer already used");
else {
if (lxlink_user(LPEX_ELEMENT,"A POINTER TO THIS STRING") != 0)
lxcall("MSG","Could not set pointer");
}
The Return Code is 0 if the query was successful otherwise
-2 Invalid type
-10,-11,-12 LPEX Control Block corresponding to type is not allocated.
ΓòÉΓòÉΓòÉ 7.5.3. lxfind_user() ΓòÉΓòÉΓòÉ
int far lxfind_user(void far *);
This command is used when the external command wants to find the element
associated with a given pointer. It works in a very similar way to the normal
"find" command, searching first from the current element to the end of the
document, then from the beginning towards the current element, then finally
testing the current element. The same pointer may be associated with more than
one element, and so repeated calls to this function will move the cursor
position on where neccessary, wrapping at end of file.
The Return Code is 0 if the find was successful otherwise
1 Found after wrapping to top of document if type is LPEX_ELEMENT; for
other types the object was not found.
2 This is the only occurrence if the pointer for the type given.
-2 Invalid type
-10,-11,-12 LPEX Control Block corresponding to type is not allocated.
-13 The pointer passed is NULL.
ΓòÉΓòÉΓòÉ 7.6. National Language Considerations ΓòÉΓòÉΓòÉ
When adding commands to LPEX via the API, you may need to access some of the
LPEX country-dependent information. This is available via QUERY COUNTRY. The
file LXDIR.C contains the source of the external DIR command (LXDIR.DLL) and
this uses the QUERY COUNTRY call to obtain details of how to format dates and
times. LPEX is now DBCS enabled, and so may be used on Japanese and Korean
codepages. normal delimiters and separators will not be confused with the
second byte of DBCS characters.
ΓòÉΓòÉΓòÉ 7.7. Building External Commands written in C ΓòÉΓòÉΓòÉ
Under OS/2 external commands are created as Dynamic Link libraries whose names
start with the letters 'LX'. The names for the commands themselves are
therefore restricted under OS2 1.1 to six characters although the LPEX synonym
mechanism may be used to give the commands more reasonable names. Thus an
external command that is to be invoked via the LPEX command 'SCAN xxx'. would
be created as the dynamic link library 'LXSCAN.DLL'.
A 'make' file called LPEX2EXT is provided to illustrate the process of creating
an external command for OS/2. The sample commands are designed to be created
using this make file. It can be used by entering the command:
MAKE CMD=xxxx LPEX2EXT
where xxxx is the name of the LPEX command you wish to create e.g.
MAKE CMD=scan LPEX2EXT
ΓòÉΓòÉΓòÉ 7.7.1. Writing The Source Code ΓòÉΓòÉΓòÉ
The source code is written as a standard C program, making use of the LPEX
access calls described in the provided LPEX2API.H
A typical minimal external function might look rather like this:
/***********************************************************/
/* LXMIN2.C - A Minimal LPEX External Command for OS/2 */
/***********************************************************/
#include "lpex2api.h" /* include function definitions */
lxmain(parm) /* lxmain is routine entry point */
uchr *parm;
{
return (0); /* do nothing! */
}
Note that the program entry point will always be the lxmain() function. No
main() function is required and it is an error to include one.
See the sample programs for more extensive examples.
ΓòÉΓòÉΓòÉ 7.7.2. Compiling The Code ΓòÉΓòÉΓòÉ
The interface is designed to work with the IBM C/2 compiler, although Microsoft
C Version 5 will work too. A certain amount of 'trickery' is involved in using
the C compilers to create dynamic link libraries, and the routines in the LPEX
access library that perform this trickery were written for and have only been
tested with IBM C/2 and Microsoft C Version 5.
Writing anything other than LARGE or COMPACT model code is not worth the
effort. Memory constraints are not a problem under OS/2.
You should compile your program with the following options:
/Gs /G2 /Alxu
where 'x' is 'f' to create LARGE model code or 'n' for COMPACT model. For the
IBM C/2 compiler these options require the use of the CL compiler command.
ΓòÉΓòÉΓòÉ 7.7.3. Linking To Produce a LXxxxxxx.DLL ΓòÉΓòÉΓòÉ
You must include the LPEX access function library when your code is linked.
For OS/2 this library is called LPEX2API.LIB. You should ensure this is the
first library specified to the linker, or the resulting code will not work as a
dynamic link library.
You must use the supplied LPEX2API.DEF file with the link command and you must
use the /NOIGNORECASE linker option. The .DLL file that results should be
placed in a directory accessable via your LIBPATH.
The commands specified in the make file LPEX2EXT provide a good model.
ΓòÉΓòÉΓòÉ 7.7.4. Notes ΓòÉΓòÉΓòÉ
Your external command will be run directly as a procedure call from within
LPEX. There are points to consider:
You cannot use the C exit function to quit from your external command. The
only way back to LPEX is via a return from your lxmain() routine.
You will be running on LPEX's stack. This stack is quite large (currently
16,000 bytes), but you should try not to store too much on it.
Only one copy of your external command is ever loaded. If you make (directly
or indirectly) a recursive call, the same procedure will be called and any
static data items you use will refer to the same storage locations. Your
program should be written to allow for this re-entrancy.
The first reference to your external command will require the .DLL file to be
loaded from disk, subsequent references do not require re-loading from disk
and are therefore extremely fast.
Please bear in mind that the current C compliers do not correctly support
dynamic link library creation. You must compile with the options described
earlier and you must link so that the LPEX2API.LIB is the first library
mentioned to the linker and you must use the LPEX2API.DEF file. If you don't
do this is won't work! LPEX2API.LIB contains code to try (to the best of our
knowledge) to overcome the C/dynamic link library problems.
Despite this the following problems still exist:
Any uninitialised static data items are not given an initial zero value -
either initialise all your statics or don't assume they have initial values.
You can use lxalloc and lxfree and the LPEX2API. LIB code will translate
attempts to call malloc and free into these preferred calls. Other memory
management calls such as calloc or realloc are forced to fail.
There may be other C library function calls that give problems, you'll have to
experiment a bit!
ΓòÉΓòÉΓòÉ 7.8. New API. ΓòÉΓòÉΓòÉ
A new API is being developed which allows the user to invoke LPEX from a
subroutine DLL which is common to several separate LPEX external commands. This
new API is available now and LPEX has provided a compatibility feature. All
that is necessary to use the new API is for the user to replace the
#include "LPEX2API.H"
with
#include <LPEXAPI.H>
and use the make file LPEXEXT instead of LPEX2EXT, or if you have Microsoft (C)
C version 6 use LPEX6EXT which allows the use of C function calls such as
SPRINTF without causing a DosFreeModule error when the command is unlinked.
Note: LPEXAPI.H includes the file LPEXCPAT.H and both must reside in a
directory specified in the SET INCLUDE path. This is a change from the
old setup. See below for a summary of the old and new support files.
ΓòÉΓòÉΓòÉ 7.8.1. Summary of old and new support files ΓòÉΓòÉΓòÉ
Old API file New API file
LPEX2API LPEXAPI.H (with LPEXCPAT.H)
LPEX2EXT LPEXEXT
LPE2XAPI.DEF LPEXEXT.DEF
LPEX2API.LIB LPEXAPI.LIB
The new interface is shown below showing the old API and new API equivalents.
In future any enhancements to the LPEX API will be done using only the new
naming style. In due course this help will be re-oriented to the new API
commands.
Old API entrypoints New API equivalent
lxmain(a) EXPENTRY LpexEntry(a)
lxexit(a) EXPENTRY LpexExit(a)
Old API function New API equivalent
lxcmd(a) LpexCommand(a)
lxcall(a,b) LpexCall(a,b)
lxmsg(a) LpexCall("msg",a) (This is a special case compile time
macro for clarity of text)
lxalloc(a) LpexAlloc(a)
lxfree(a) LpexFree(a)
malloc(a) LpexAlloc(a)
All free storage management is done via LPEX
free(a) LpexFree(a)
All free storage management is done via LPEX
lxquery(a,b) LpexQuery(a,b)
lxhab(a) LpexHab(a)
This is provided for compatibility only - use appropriate
system call if HAB is required.
lxqgmlfonts(a) LpexQueryGMLFonts(a)
lxgmlfontadd(a) LpexAddGMLFonts(a)
lxnext() LpexNext("")
The new call has the parameter reinstated as for the NEXT
command
lxprev() LpexPrev("")
The new call has the parameter reinstated as for the PREV
command
lxqrawtx(a) LpexQueryRawText(a)
lxqtext(a) LpexQueryText(a)
lxstext(a) LpexSetText(a)
lxqfont(a) LpexQueryFonts(a)
lxsfont(a) LpexSetFonts(a)
lxqmode(a) LpexQueryCharModes(a)
lxqclass(a) LpexQueryClass(a)
lxsclass(a) LpexSetClass(a)
lxqelestate(a) LpexQueryElementState(a)
lxinsert(a) LpexInsert(a)
lxquery_user(a,b) LpexQueryUserLink(a,b)
lxlink_user(a,b) LpexSetUserLink(a,b)
lxfind_user(a,b) LpexFindUserLink(a,b)
ΓòÉΓòÉΓòÉ 7.8.2. Example of two lpex commands and a common subroutine. ΓòÉΓòÉΓòÉ
Files provided in \LPEX directory
LXCMDONE.C Source for the first command
LXCMDTWO.C Source for the second command
LXMYSUB.C The common subroutine.
SUBREXMP The Make file.
If the makefile is processed then three DLLs are generated - LXCMDONE.DLL,
LXCMDTWO.DLL and LXMYSUB.DLL If, in an LPEX session the command CMDONE is
invoked the following messages will be generated in the message window.
Entering Lpex command cmdone - calling mysub
mysub entered
-- from cmdone
First return from MYSUB
Calling Lpex command cmdtwo
Entering Lpex command cmdtwo - calling mysub
mysub entered
-- from cmdtwo
Second return from MYSUB
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FAT (File Access Table) is the disk format supported by both DOS and OS/2,
wherein names have the 8.3 format (an 8 character name and a 3 character
extension. Names are always folded to upper case.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
HPFS (High Performance File System) is the disk format supported by OS/2,
wherein names may be longer, and include and arbitrary number of periods and
blanks (even initial and trailing blanks). Mixed case is supported, although
searches ignore case and names must be unique when folded to upper case.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NFS (AIX's Network File System) is an Open Systems drive attached via a
suitable network the data on which is stored with only LineFeeds instead of
CarriageReturn/LineFeeds.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You should type one word only, either a known command word, or a known SET or
QUERY item word.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This will present an index of command words and QUERY and SET item words.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FAT (File Access Table) is the disk format supported by both DOS and OS/2,
wherein names have the 8.3 format (an 8 character name and a 3 character
extension. Names are always folded to upper case.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
HPFS (High Performance File System) is the disk format supported by OS/2,
wherein names may be longer, and include and arbitrary number of periods and
blanks (even initial and trailing blanks). Mixed case is supported, although
searches ignore case and names must be unique when folded to upper case.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NFS (AIX's Network File System) is an Open Systems drive attached via a
suitable network the data on which is stored with only LineFeeds instead of
CarriageReturn/LineFeeds.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You should type one word only, either a known command word, or a known SET or
QUERY item word.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This will present an index of command words and QUERY and SET item words.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Common User Access
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
American Standard Code for Information Interchange
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
OS/2 Presentation Manager
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Picture elements, dots on the screen.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Single Byte Character Set
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Double Byte Character Set