home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK6
/
OS_05
/
EPMASI.ZIP
/
MYASSIST.DOC
< prev
next >
Wrap
Text File
|
1993-03-29
|
7KB
|
170 lines
**********************************************************************
E3/EOS2/EPM SYNTAX ASSISTANCE VERSION 2.0
SVEN GUYET, 03/92 (DSGUYE AT DUESVM1)
**********************************************************************
INTRODUCTION:
In E3/EOS2/EPM, there are different syntax assistance tools to make
things easier when editing files of a special type. The standard E
macros include assistance for C, PASCAL and E programmers. EBOOKIE
is a package on PCTOOLS to support editing of BOOKMASTER documents.
But, there's no easy way for any E user to create his own syntax
assistance file with his own keywords.
Ta-da ||| Here it is |||
MYASSIST gives you the ability to create your own syntax assistance
file with your favourate abbreviations and their corresponding
replacements. The next time you edit a file with E3/EOS2/EPM,
you simply type the abbreviation, press ALT-H, and MYASSIST does
the rest (replaces the shortcut).
Beginning with MYASSIST version 2.0, the syntax assistance file
MYASSIST uses depends on the extension of the file you are currently
editing. That means, abbreviations within ".C" files are
processed with a different syntax assistance file compared to
abbreviations within ".SCR" files.
A default syntax assistance file name may be configured which
is used for filetypes with no special abbreviations file.
Although support for PM programming was my primary intent, it is
possible to use MYASSIST for many other purposes to save keystrokes.
It allows you to abbreviate a command often used during an edit
session, press ALT-H and let MYASSIST find out what you really
wanted to type in.
All you have to do is to create one or more files in which both
the desired abbreviations and the corresponding commands are defined.
The actual cursor position after the replacement may be defined
by putting the block character with ASCII code 178 at the
desired position within the replacement string.
If you like to have different abbreviations for the same
thing, just put them into consecutive lines and let the
corresponding commands follow the last abbreviation.
NOTE: o EACH LINE MAY HOLD ONLY ONE ABBREVIATION |||
o ABBREVIATIONS USED MORE THAN ONCE IN YOUR SYNTAX ASSISTANCE
FILE ARE REPLACED BY ALL OF THE GIVEN DEFINITIONS |||
The following examples for syntax assistance files come with
MYASSIST:
1.) OS/2 API FUNCTION CALLS
Programming under OS/2, especially when developing applications
running under the OS/2 Presentation Manager, requires a new kind
of programming style. For beginners the first barrier is the
tremendous quantity of new subroutines which come with OS/2 and
PM. For advanced programmers it is of course intricate to
remember the various syntax rules.
As a little help, ALL API function calls coming with
OS/2 1.3 EE are defined in
o OSAPI.ASI (Dev, Dos, Kbd, Mou, Pic, Prf, Spl, Vio)
o PMAPI.ASI (Gpi, Win, and some PM stuff)
For all functions, two abbreviations are given. The first is
the function name itself, the second is an abbreviated name
using only the uppercase characters of the function name.
So, if you want to code a WinCreateStdWindow in your PM program,
type WCSW and press ALT-H. MYASSIST inserts the procedure call
and positions the cursor at the first parameter within the
parenthesis.
You can also type WinCreateStdWindow or WINCREATESTDWINDOW
or wincreatestdwindow to get the same result.
2.) CSYNTAX.ASI
For all of you who don't like the style of E's standard C syntax
assistance, have a look at CSYNTAX.ASI, modify the contents to
your needs, rename the file to MYAS_C.ASI and use MYASSIST instead
of C_SYNTAX_ASSIST.
3.) BOOKIE.ASI
Supports editing of DCF/GML or BOOKMASTER files.
4.) MYSYNTAX.ASI
A skeleton for any other syntax assistance file.
HINTS:
Since MYASSIST supports only one syntax assistance file to be
active at a time, you may like to copy the contents of CSYNTAX.ASI,
OSAPI.ASI (and, perhaps, PMAPI.ASI) into a single file named
MYAS_C.ASI. The only disadvantage of using large assistance files
is the slower performance when pressing ALT-H. Also, you may run into
a insufficient memory problem when MYASSIST tries to load the
assistance file.
PREREQUISITES:
One of the E-editor versions found on PCTOOLS with the corresponding
macro files. See E3, EOS2 or EPM package on PCTOOLS/OS2TOOLS.
INSTALLATION:
1.) Download MYASSIST.FLS as binary onto your PC and unpack the files
with LOADRAM2 to get
MYASSIST.E (E code for syntax assistance)
OSAPI.ASI (example file for OS/2 programming support)
PMAPI.ASI (example file for OS/2 PM programming support)
CSYNTAX.ASI (example file for C programming support)
BOOKIE.ASI (example file for DCF/GML/BOOKMASTER editing)
MYSYNTAX.ASI (example skeleton file)
Note: Please make sure to use the latest LOADRAM2 version (2.0u+).
2.) Insert the line
WANT_MY_ASSIST = 1
in the "const" section of your MYCNF.E as well as the lines
compile if defined (WANT_MY_ASSIST)
compile if WANT_MY_ASSIST
include 'myassist.e'
compile endif
compile endif
at the start of one of your other "MY"-files, preferable in
MYKEYS.E. Now, if you wish to leave out MYASSIST temporarily,
you can simply set WANT_MY_ASSIST to 0 in your MYCNF.E, and it
will be omitted.
You may also set the constant "my_syntax_filename" in your
MYCNF.E to the default syntax assistant filename of your choice
if you don't like the predefined value which is "MYSYNTAX.ASI".
For fastest loading my_syntax_filename should include the full
path (otherwise it is searched along the DPATH, EPATH and PATH).
3.) Recompile the new E configuration with ET.EXE or ETPM.EXE for
the Presentation Manager version.
4.) The syntax descriptions used within a file with the extension
".XXX" have to be defined in the syntax assistance file
"MYAS_XXX.ASI". See "MYSYNTAX.ASI" coming with this package for
further informations.
To get syntax assistance during an edit session, type the abbreviated
keyword and press press ALT-H. The cursor position must be WITHIN
or ON ONE OF THE BLANKS AFTER the desired keyword prior pressing
ALT-H.
To change the default syntax assistance filename, type 'sf' or
'syntaxfile' followed by the new filename at the command line.
To get information about the actual default syntax assistance filename,
type 'sf' or 'syntaxfile' without any parameters at the command line.
SUPPORT:
Bugs, hints and/or improvement suggestions should be appended in the
EOS2 FORUM or sent to DSGUYE at DUESVM1 via VNET. If you should write
other useful syntax assistance files please send them to me.
I will include them in the package if I think they are of common
interest.