home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmbk.zip / EPMTECH.INF (.txt) next >
OS/2 Help File  |  1996-03-11  |  385KB  |  13,807 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction to the E Language ΓòÉΓòÉΓòÉ
  3.  
  4. In order to change existing features or add your own features to the E editor, 
  5. you must understand the code in the *.E files which implements the editor. 
  6. These files are written in a macro language (the E language) developed for the 
  7. editor.  To make changes to the editor, simply edit these files, remove the 
  8. pertinent E code, and make the necessary changes, place in a My*.E file, and 
  9. recompile using the etpm epm command as discussed in The EPM User's Guide. 
  10.  
  11. Special features of the E language include: 
  12.  
  13. o The E language provides high level list and display capabilities. 
  14.  
  15. o The E language combines file list primitives, display primitives, and 
  16.   keyboard primitives into a language with procedure definitions. Few other 
  17.   languages have attempted to provide useful display, file list and keyboard 
  18.   primitives. 
  19.  
  20. o The E language, like REXX, has untyped variables, making it easier to 
  21.   manipulate strings and numbers.  (In essence all variables are strings.) 
  22.  
  23. o The E language allows definition of keys, commands and procedures in a 
  24.   similar manner. 
  25.  
  26. An E program consists solely of one or more definitions. Each definition can 
  27. define: 
  28.  
  29. a procedure, 
  30.                          which consists of tasks to be performed when that 
  31.                          procedure is called by another definition; 
  32. a command, 
  33.                          which consists of tasks to be performed in order to 
  34.                          execute a command that a user types in the command 
  35.                          dialog box of the editor; 
  36. a key, 
  37.                          which consists of tasks to be performed when a user 
  38.                          presses that key while in the E editor; 
  39. initializations, 
  40.                          which consist of variable assignments that must be 
  41.                          performed immediately after the editor is invoked; 
  42. constants, 
  43.                          which consist of unchangeable values assigned to 
  44.                          identifiers; 
  45. configuration options, 
  46.                          which allow the user to change the basic configuration 
  47.                          (colors, cursor size, margins etc.) of the editor. 
  48. Each definition is composed of statements which implement the procedure or key 
  49. function being defined. 
  50.  
  51. A sample E program is presented below. The comments label and explain the key 
  52. features, so that you can relate their form to the descriptions above. 
  53.  
  54. def a_f2 =                 /* beginning a definition:
  55.                               defining the A_F2 key */
  56.    'temp'                  /* --> pressing this key causes the user-
  57.                               defined command temp to
  58.                               be performed */
  59.  
  60. defc temp                  /* beginning a definition:
  61.                               defining the temp command */
  62.   sayerror "Command TEMP in progress."     /* a statement */
  63.   junk = machine()         /* this statement includes a call to a
  64.                               built-in procedure (i.e. one that comes
  65.                               with the editor, and is not user-defined) */
  66. call mydisplay(junk)       /* a call to a user-defined procedure */
  67.  
  68. defproc mydisplay(machtype) /* beginning a procedure definition:
  69.                                defining a procedure = user-defined proc */
  70.   new_line = 'Machine type is: '||machtype  /* string concatenation */
  71.   insertline new_line, 5    /* this built-in statement adds the
  72.                                contents of variable new_line to the
  73.                                fifth line of the current file */
  74.  
  75. We will devote a section of this manual to discussing each of the major 
  76. components of the E language. These components (followed by an example) are: 
  77.  
  78. o Scoping (universal) 
  79.  
  80. o Variables and identifiers (newline (see above example)) 
  81.  
  82. o Arrays (do_array 1, arrayid, myarray) 
  83.  
  84. o Expressions and operators (x+1) 
  85.  
  86. o String expressions ('foo'||'bar') 
  87.  
  88. o Comments (/* like this */) 
  89.  
  90. o Line continuations (x=9+8; y=x-9) 
  91.  
  92. o Fileid structure (.filename) 
  93.  
  94. o Definition primitives (DEF, DEFC, DEFPROC) 
  95.  
  96. o Constants (const BLACK=0) 
  97.  
  98. o SET definitions (set cursors) 
  99.  
  100. o Built-in statements and procedures (insert; x=machine()) 
  101.  
  102. o Conditional and loop statements (IF-THEN-ELSE) 
  103.  
  104. o The PARSE statement (PARSE arg(1) WITH filename '.' filetype) 
  105.  
  106. o Compiler Directives (tryinclude) 
  107.  
  108. o Using EPM Command Statements ('E myfile.txt') 
  109.  
  110. o Predefined constants and variables (rc) 
  111.  
  112. o User exits (in DEFMAIN, NAME, SAVE and QUIT) 
  113. In future sections, the following symbolic conventions will be used to convey 
  114. points of the language more clearly: 
  115.  
  116. Symbol:             Meaning: 
  117. { } 
  118.                     Zero or more repetitions of what is inside. 
  119. [ ] 
  120.                     Zero or one of what is inside. 
  121. A | B 
  122.                     Substitution of A or B. 
  123. var 
  124.                     The word var indicates that a variable is required and not 
  125.                     an expression. 
  126. ... 
  127.                     More repetitions of the same syntactic pattern 
  128.  
  129. Note:  For an example of a var variable being required instead of an 
  130. expression, see the ACTIVATEFILE entry in section Built-in Statements and 
  131. Procedures. After reading the following sections, users who wish to make 
  132. extensive customizations to the E macros should rely heavily on the following: 
  133.  
  134. o Field Variables Listed; 
  135. o Built-in Statements and Procedures; 
  136. o E Language Syntax; 
  137. o General Structure of E-Macro Files; 
  138. o Descriptions of Procedures in Standard EPM. 
  139.  
  140. Note how these sections are divided. 
  141.  
  142.  
  143. ΓòÉΓòÉΓòÉ 1.1. Fileid Structures ΓòÉΓòÉΓòÉ
  144.  
  145. The Field Variables Listed section contains field variables that can take 
  146. assignments or be be referenced. For example: 
  147.  
  148. if .textcolor <> 14 then
  149.   .textcolor = 14
  150. endif
  151.  
  152. The first reference to textcolor checks the color of the text window (a 
  153. referenced field variable).  If it is not equal to color 14 (yellow) then it 
  154. makes the text window color yellow (a field variable assignment). 
  155.  
  156.  
  157. ΓòÉΓòÉΓòÉ 1.2. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  158.  
  159. There are built-in statements and procedures. These are internal in the E code, 
  160. and therefore cannot be located in any of the .E files. These are listed in the 
  161. Built-in Statements and Procedures section. For example: 
  162.  
  163. asciivalue = ASC('A')
  164. insert 'Written by the Yorktown E group', 5
  165.  
  166. The first example is of the ASC() procedure. It will return the value 65 in the 
  167. variable asciivalue. Only procedures can return values (but don't always have 
  168. to). Procedures always take parentheses even if no arguments are passed. There 
  169. cannot be any spaces between the procedure name (in my example ASC) and the 
  170. left parenthesis, or E will think it is a statement. 
  171.  
  172. Statements, however, never take parentheses and don't return values. They can, 
  173. but don't have to, take arguments. The second example is of the insert 
  174. statement, shown here with arguments. It would insert on line five the text: 
  175. Written by the Yorktown E group. 
  176.  
  177.  
  178. ΓòÉΓòÉΓòÉ 1.3. Standard Procedures ΓòÉΓòÉΓòÉ
  179.  
  180. There are also defproc procedures that have been written in E-code and 
  181. therefore exist in one of the .E files. These are listed in Descriptions of 
  182. Procedures in Standard EPM.. They always take parentheses and can return 
  183. values, just like the built-in procedures. An example is: 
  184.  
  185. mymaxnum = MAX(4,5,98,6)
  186.  
  187. This E code will set the variable mymaxnum to 98, the maximum number in the 
  188. argument list. Again, the left parenthesis is flush with the procedure name. 
  189.  
  190.  
  191. ΓòÉΓòÉΓòÉ 1.4. EPM Commands ΓòÉΓòÉΓòÉ
  192.  
  193. Commands, defined with the defc and written in E-code can be invoked from the 
  194. command line dialog box, and are listed in the The EPM User's Guide and the 
  195. section Commands Omitted From the User's Guide in this manual. These can also 
  196. be called from within the E language if surrounded by quotation marks. For 
  197. example: 
  198.  
  199. 'bottom'
  200.  
  201. will move the cursor position to the bottom of the file, as if the user had 
  202. typed bottom from the command line dialog box. 
  203.  
  204.  
  205. ΓòÉΓòÉΓòÉ 1.5. Summary ΓòÉΓòÉΓòÉ
  206.  
  207. Understanding the differences between these commands, statements, and 
  208. procedures is critical when programming in the E programming language. When 
  209. looking for a specific result, remember to look in all these sections to help 
  210. find a command, statement, or procedure that may accomplish your goal.  The 
  211. procedures defined with defproc and the commands defined with defc are good 
  212. sources of reference when programming in E.  Examining the E-code of procedures 
  213. or commands can be helpful when trying to accomplish a goal close to an 
  214. existing procedure or command. 
  215.  
  216. Note:  E ignores case for procedure, statements, variable, and command names. 
  217. Capitalizing ASC and MAX in the examples above was done purely by whim. 
  218.  
  219. Although the discussion above may be slightly fuzzy to a novice, it should get 
  220. more clear as the manual progresses. It may help to refer back to these 
  221. distinctions as the various elements of E are described in detail. 
  222.  
  223.  
  224. ΓòÉΓòÉΓòÉ 2. Basic Tools of the E Language ΓòÉΓòÉΓòÉ
  225.  
  226. Basic tools of the E language. 
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 2.1. Comparision with to the REXX Language:  Scoping ΓòÉΓòÉΓòÉ
  230.  
  231. Anyone familiar with the REXX language will notice that the E language has the 
  232. same look and feel. The string handling looks the same, and the control 
  233. structures are similar. You may well ask "Why not use REXX for the editor macro 
  234. language?" The answer is that there are some important differences, which we 
  235. will discuss. 
  236.  
  237. Unlike REXX, E makes all variables local by default.  You can specify that a 
  238. variable is to be global everywhere, i.e. available to any other procedure, not 
  239. only to the current caller, by using the universal keyword in the declaration. 
  240. A simple program will illustrate the scoping differences between REXX and E. 
  241.  
  242. REXX SAMPLE PROGRAM
  243.       /* REXX scoping example */
  244.       call starthere
  245.  
  246.       starthere: procedure
  247.          me='the old me'
  248.          call p1
  249.          say me                     /* says 'the old me' */
  250.          exit 0
  251.  
  252.       p1: procedure                 /* don't expose me here */
  253.          call p2
  254.  
  255.       p2: procedure expose me
  256.         me='the new me'             /* try to modify me down here */
  257.         return ''
  258.  
  259. E SAMPLE PROGRAM
  260.       /* E scoping example */
  261.       defmain
  262.          call starthere
  263.  
  264.       defproc starthere
  265.          universal me
  266.  
  267.          me='the old me'
  268.          call p1()
  269.          say me                     /* says 'the new me' */
  270.          exit 0
  271.  
  272.       defproc p1
  273.          call p2()
  274.  
  275.       defproc p2
  276.          universal me               /* make it really global */
  277.  
  278.          me='the new me'
  279.          return ''
  280.  
  281. For the REXX program to calculate the same results as the E program, procedure 
  282. p1 would have to expose the me variable. The REXX expose statement requires 
  283. that the symbol table be known at the time of the call. When a REXX procedure 
  284. is called, the current symbol table entries are removed except for those 
  285. entries that are exposed. This means that a symbol table must be maintained at 
  286. run time. When a variable is referenced, a lookup is performed to see if it is 
  287. already in the symbol table. If the variable is not in the symbol table a new 
  288. symbol table entry is created. 
  289.  
  290. In the E language, like MODULA-2, C and PASCAL, no symbol table is required at 
  291. run-time. The absence of variable lookup is one reason why E runs considerably 
  292. faster than REXX. However, REXX programs are more easily debugged for the same 
  293. reason. But the order of magnitude of improvement in performance was judged 
  294. critical for the programming environment. 
  295.  
  296. Note:  Rexx *is* supported as a macro programming language, for the benefit of 
  297.        those who don't want to recompile the macros (and for external users who 
  298.        might have problems downloading the EPMBBS package to get the macros and 
  299.        macro compiler), but E is what is recommended for any serious EPM 
  300.        programming.  See the online help for details on writing EPM macros in Rexx.
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 2.2. E Variables and Identifiers ΓòÉΓòÉΓòÉ
  304.  
  305. Variable declarations are not needed except for universal variables. All other 
  306. variables are assumed to be local except for a few predefined, universal 
  307. variables to be discussed in Predefined Constants and Variables. 
  308.  
  309. Identifiers have the following syntax: 
  310.  
  311.  [a-z | A..Z]{a-z | A..Z | 0-9 | _}
  312. Identifiers are not case sensitive, and can consist of no more than 28 
  313. characters. 
  314.  
  315.  
  316. ΓòÉΓòÉΓòÉ 2.2.1. The Contents of Uninitialized Variables ΓòÉΓòÉΓòÉ
  317.  
  318. When a variable is referenced for the first time in a REXX program the variable 
  319. holds the name of itself in upper case (e.g., abc='ABC'). In an E program the 
  320. value of an uninitialized variable is undefined. This decision was made for the 
  321. following reasons: 
  322.  
  323.  1. No symbol table information is required at run time. A complete symbol 
  324.     table is needed to know when the variable is first defined at run time. 
  325.  
  326.  2. Speed. Local variables do not have to be assigned anything except what the 
  327.     user assigns to the variable. 
  328.  
  329. Some people prefer the REXX convention because it allows you to type in some 
  330. operating system commands without using quotes. For example, 
  331.  
  332.     type profile exec
  333.  
  334. But many operating system commands will still require quotation marks anyway. 
  335. Requiring quotation marks in all cases reduces confusion. 
  336.  
  337. Since uninitialized variables are truly uninitialized (random) in E, strange 
  338. behavior can occur if a programmer accidentally creates an unintended variable, 
  339. for instance, by misspellling a statement ('sayeror').  The ET compiler will 
  340. catch most uninitialized variables at compile time, and report "Variable not 
  341. initialized".  For example, the following will be caught: 
  342.  
  343.    defc foo=
  344.       insertline x   /* x was never given a value */
  345.  
  346. This feature will also catch several other previously obscure errors. Omitting 
  347. the commas between universal variable names: 
  348.  
  349.    universal a b c   /* wrong, should be   universal a,b,c  */
  350.                      /* ET reports b as not initialized     */
  351.  
  352. The omission of parentheses after a procedure call: 
  353.  
  354.    call myproc       /* ET will report myproc as not initialized */
  355.  
  356. And most misspellings that otherwise wouldn't be caught until the line was 
  357. executed: 
  358.  
  359.    sayeror 0
  360.  
  361. Limitation:  This will not catch some cases where a variable is referenced 
  362. twice, or where two variables are combined in an expression: 
  363.  
  364.    call p(a+b)   /* Won't catch uninitialized a.  Will catch b. */
  365.  
  366.    for i=i       /* These are not caught. */
  367.    x=x+1
  368.  
  369. It should be noted that this feature is a benefit of E's compilation approach. 
  370. The variable names are tokenized at compile time (unlike REXX), making it easy 
  371. to tell when a new variable is being created. 
  372.  
  373.  
  374. ΓòÉΓòÉΓòÉ 2.3. Arrays in EPM ΓòÉΓòÉΓòÉ
  375.  
  376. Arrays are handled like files in a ring. When creating an array, an array id is 
  377. returned as a "handle" for the array. This array id then can be used to get and 
  378. put items into the array. Indices do not have to be numeric but instead can be 
  379. any arbitrary string (like REXX stems). 
  380.  
  381. The following shows the format of the DO_ARRAY statement used to create, write 
  382. to, and read from an array: 
  383.  
  384. do_array 1, array_id, myarray 
  385.                                      This creates an array called MYARRAY and 
  386.                                      returns its array id in the ARRAY_ID 
  387.                                      variable. If an array called MYARRAY 
  388.                                      already exists, then its array id will be 
  389.                                      returned. 
  390. do_array 2, array_id, index, value 
  391.                                      This sets the entry INDEX in the array 
  392.                                      identified by the ARRAY_ID number to the 
  393.                                      value specified in VALUE. Both the index 
  394.                                      and value can contain arbitrary strings. 
  395. do_array 3, array_id, index, result 
  396.                                      This will look up the INDEX entry in the 
  397.                                      array ARRAY_ID and assign the result to 
  398.                                      the variable RESULT.  An error is given if 
  399.                                      the index is not found. 
  400. do_array 4, array_id, index 
  401.                                      This will delete an entry specified, by 
  402.                                      INDEX, from the array. 
  403. do_array 6, array_id, array_name 
  404.                                      Returns the array_id associated with the 
  405.                                      array name specified by array_name 
  406. do_array 7, array_id, index, result 
  407.                                      (32-bit EPM only.)  This will look up the 
  408.                                      INDEX entry in the array ARRAY_ID and 
  409.                                      assign the result to the variable RESULT. 
  410.                                      If the index is not found, the value of 
  411.                                      the array's .userstring is returned. 
  412.  
  413. Due to the common interface, the second and fourth arguments in the DO_ARRAY 
  414. statement must be variables and not numeric or string constants or expressions. 
  415.  
  416. Arrays are, in fact, a special class of file, and the arrayid is the fileid of 
  417. the array file.  While you would not normally make an array the active file, 
  418. the way to delete an array is: 
  419.  
  420. getfileid curr_file     -- Save the current file
  421. activatefile arrayid    -- Activate the array pseudo-file
  422. 'xcom quit'             -- Quit the array
  423. activatefile curr_file  -- Restore the previously-active file
  424.  
  425. Suboperand 7 was added in the 32-bit version of EPM to not only avoid an error 
  426. message when looking up an index that is not present, but to allow you to set a 
  427. default value other than the null string.  For example, the following Rexx 
  428. file: 
  429.  
  430. /* Example Rexx code */
  431. array. = '[not set]'
  432. array.foo = 'Foo'
  433. say 'Value of array.foo is' array.foo 'and value of array.bar is' array.bar
  434. is equivalent to the following E code: 
  435.  
  436. do_array 1, array_id, 'Array'         -- Create the array
  437. array_id.userstring = '[not set]'     -- Set default value
  438. temp = 'Foo'                          -- (Fourth parameter must be a variable; can't just do:
  439.                                       --    do_array 2, array_id, 'foo', 'Foo'  -- )
  440. do_array 2, array_id, 'foo', temp     -- Set the value for index 'foo'
  441. do_array 7, array_id, 'foo', foo_val  -- Get the value for index 'foo'
  442. do_array 7, array_id, 'bar', bar_val  -- Get the value for index 'bar'
  443. sayerror 'Value of array.foo is' foo_val 'and value of array.bar is' bar_val
  444.  
  445. When an edit window is opened, the standard macros create a utility array, 
  446. array.EPM, whose index is saved in the universal variable EPM_utility_array_ID. 
  447. It is used by various sections of code, each section using a unique prefix for 
  448. its variables.  For example, 'bmi.' is the prefix for bookmark indices, with 
  449. 'bmi.0' containing the number of indices and 'bmi.'n containing the name of 
  450. bookmark number n.  Sharing a single array in this manner results in much less 
  451. overhead than creating a new array for each distinct usage.  User code can also 
  452. share in this savings if desired, by selecting a unique prefix.  This should 
  453. only be done for code which needs to keep the values for the extent of an edit 
  454. session.  Code that can delete the array after its usage should use a private 
  455. array, as individual array elements can not be deleted.  (They can be set to 
  456. null, but the indices will still be taking up space and slowing down the lookup 
  457. for other array indices.) 
  458.  
  459.  
  460. ΓòÉΓòÉΓòÉ 2.4. Expressions and Operators ΓòÉΓòÉΓòÉ
  461.  
  462. Expressions and operators. 
  463.  
  464.  
  465. ΓòÉΓòÉΓòÉ 2.4.1. Operators ΓòÉΓòÉΓòÉ
  466.  
  467.                     Add expressions 
  468.  
  469.                     subtract expressions 
  470.  
  471. ==, /== 
  472.                     exactly equal, not exactly equal forces exact string 
  473.                     comparison, taking all spaces and digits as a string. 
  474.  
  475. =, <>, <=, >=, <, > 
  476.                     These operators ignore leading and trailing spaces on 
  477.                     expressions being compared. If both operands are numbers a 
  478.                     number comparison is performed; otherwise a string 
  479.                     comparison is performed. 
  480.  
  481.                                          examples
  482.                                            'hi'='hi  '  is true
  483.                                            'hi'=='hi  ' is false
  484.  
  485. not, -, + 
  486.                     Boolean not, unary minus, unary plus 
  487.  
  488. and, &, or, | 
  489.                     Boolean and, Boolean and, Boolean or, Boolean or 
  490.  
  491. || 
  492.                     concatenates two strings 
  493.  
  494. *, /, % 
  495.                     integer multiply, divide, integer divide 
  496.  
  497. // 
  498.                     modulus (remainder) operator.  22 // 5 = 2. 
  499.  
  500. Note:  The percent sign % is to be used for integer division, while the slash / 
  501. is to be used for floating-point division. 
  502.  
  503.  
  504. ΓòÉΓòÉΓòÉ 2.4.2. Operator Precedence ΓòÉΓòÉΓòÉ
  505.  
  506. From lower to higher precedence:
  507.  
  508.      1. AND, OR, NOT, &, |
  509.  
  510.      2. >, <, =, ==, /==, <>, <=, >=
  511.  
  512.      3. ||
  513.  
  514.      4. +, -
  515.  
  516.      5. *, /, %, //
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 2.5. String Expressions ΓòÉΓòÉΓòÉ
  520.  
  521. The rules for delimiting strings are shown below: 
  522.  
  523. o Double or single quotes may be used. 
  524.  
  525. o Two single quotes inside single quotes represent the single quote character. 
  526.  
  527. o Two double quotes inside double quotes represent the double quote character. 
  528.  
  529. o Strings may not extend across line boundaries. 
  530.  
  531. o A backslash can be used to represent awkward characters, in the same style as 
  532.   the C language.  \t (without quotes) represents the tab character. On a PC 
  533.   the ASCII value of the tab character is 9, so \9 represents the same thing. 
  534.  
  535.   Other special characters are \r and \l, which denote carrage return and line 
  536.   feed, repectively. 
  537.  
  538. Examples:
  539.  
  540.   'abc'== "abc"
  541.   ''''=="'"
  542.   """"=='"'
  543.   '1'\50==12        /* 50 is ASCII value for the character '2' */
  544.   3+ '1'\50==15     /* everything is a string! */
  545.   3+ '1'||2==42      /* Concat'n has lower precedence than + */
  546.   asc(\t)==9
  547.   asc(\r)==13
  548.   \r\n==''\r\n''
  549.                      /* Note that \r\n is a single string literal,    */
  550.                      /* generically the same as a single string of    */
  551.                      /* two characters "XY".  No concatenation here. */
  552.  
  553.  
  554. ΓòÉΓòÉΓòÉ 2.5.1. Catenation (Concatenation) ΓòÉΓòÉΓòÉ
  555.  
  556. Strings can be joined by catenation using the (con)catenation operator (||). 
  557. However, the operator can be omitted in most cases. When the operator is 
  558. omitted, E will place a single blank between the catenated results IF there is 
  559. at least one space between the operands. As the following examples illustrate, 
  560. one can completely avoid using the catenation operator. Suppose: 
  561.  
  562.      v1 = 'abc'
  563.      v2 = 'xyz'
  564.      r1 = v1 v2
  565.      r2 = v1 'def'
  566.      r3 = v1'ghi'
  567.      r4 = v1      'qrs'
  568.      r5 = v1/* comment */v2
  569. then: 
  570.  
  571.      r1 == 'abc xyz'
  572.      r2 == 'abc def'
  573.      r3 == 'abcghi'
  574.      r4 == 'abc qrs'
  575.      r5 == 'abcxyz'
  576.  
  577.  
  578. ΓòÉΓòÉΓòÉ 2.6. Comments ΓòÉΓòÉΓòÉ
  579.  
  580. E allows three ways to add comments:
  581.  
  582.      1. placing a semicolon in column one;
  583.  
  584.         ; this is a comment
  585.  
  586.      2. surrounding the comment with '/*  */'; and
  587.  
  588.         /* this is a /* nested */ comment */
  589.  
  590.         /* this is a leading comment */ followed by executable code
  591.  
  592.         /* this is a
  593.         two line comment */
  594.  
  595.      3. a double-dash at the start of a line comment.
  596.  
  597.         this is executable code -- followed by a rest-of-line comment
  598.  
  599. If a semicolon appears in the first column (that's column one, without 
  600. preceding spaces) the rest of the line is ignored.  This style is often handy 
  601. for quick commenting-out of existing source code. A comment in a REXX-style /* 
  602. */ enclosure does not cause the remainder of the line (if any) to be ignored. 
  603. These comments can be nested. A double-dash ("--") causes the remainder of the 
  604. line to be ignored. This is an easier way to type one-line comments, but does 
  605. not allow multi-line comments or nesting. 
  606.  
  607.  
  608. ΓòÉΓòÉΓòÉ 2.7. Line Continuations ΓòÉΓòÉΓòÉ
  609.  
  610. This section was added to explain when statements can be continued across 
  611. lines.  In theory this information was already in the manual - the syntax 
  612. listing in E Language Syntax shows that a semicolon (which the compiler 
  613. considers to be the same as a new line) is often acceptable in mid-statement. 
  614. But this will provide better illustrations. 
  615.  
  616. E does not require an explicit statement continuation character as REXX does. 
  617. It automatically continues to the next line when it "knows" it needs more 
  618. information, such as after an operator in the middle of an expression.  This 
  619. differs from the REXX treatment.  REXX allows line continuations in more cases, 
  620. but EPM does not require the explicit comma. In REXX you could do this: 
  621.  
  622.    x = a ,
  623.         b               /* REXX result is   x = a b   */
  624. which concatenates the two strings a and b (implied concatenation). You can 
  625. achieve a similar (but not identical) effect by supplying an explicit operator 
  626. to make E aware that there must be more: 
  627.  
  628.    x = a ||   /* explicit concatenation operator */
  629.       b                 /* gives x = a||b, no intervening space */
  630.  
  631. A new line is allowed in all the following cases: 
  632.  
  633.  1. After an operator in an expression: 
  634.  
  635.            x = 1 +
  636.                    2
  637.  
  638.  2. After a comma in an expression list passed to a procedure: 
  639.  
  640.            call myproc( 'foobar' ,
  641.                         'axolotl' )
  642.  
  643.  3. After a comma in declarations of procedure parameters, constants or 
  644.     universal variables: 
  645.  
  646.            defproc myproc( a ,
  647.                            b  )
  648.  
  649.            const
  650.               x = 1,
  651.               y = 2
  652.  
  653.            universal a
  654.                      ,
  655.                      b
  656.  
  657.  4. After a comma in a DEF with a series of keynames: 
  658.  
  659.            def a_a, a_b, a_c,
  660.                a_d, a_e
  661.  
  662.  5. Between if and then: 
  663.  
  664.            if a=1
  665.               then b=a
  666.               else c=a
  667.            endif
  668.  
  669.  6. And after commas between parameters of several statements - getcommand, 
  670.     setcommand, getfileid, getline, replaceline, insertline, deleteline, and 
  671.     getmark: 
  672.  
  673.            replaceline 'this is a long new line'    ,
  674.                        linenumber ,
  675.                        fileid
  676.  
  677. As mentioned above, the semicolon can be used to separate statements on the 
  678. same line. For example: 
  679.  
  680.   x= 5+3; y= 9-7
  681.  
  682. will work and place the value of 8 in x and 5 in y Without a semicolon E 
  683. expects only one statement per line. For example: 
  684.  
  685.   x= 5+3  y= 9-7
  686.  
  687. will cause a compilation error of "Variable not initialized" on the y (it 
  688. attempts to concatenate 3 and y). 
  689.  
  690.  
  691. ΓòÉΓòÉΓòÉ 2.8. Fileid Structure ΓòÉΓòÉΓòÉ
  692.  
  693. The E editor must store information on each file in its rings. Therefore each 
  694. file is assigned a unique fileid, which acts as a handle for the file. The 
  695. fileid is actually a structure composed of many fields, such as .FILENAME, 
  696. .LINE, .DRAGCOLOR. Each field stores a value which identifies an attribute of 
  697. the file. By manipulating the values of these fields, macros can get and set 
  698. information about the files loaded, for example the modify status or the 
  699. contents of the message line. Because macros need the fileid to set the fileid 
  700. fields, E provides a GETFILEID statement to obtain the fileid. 
  701.  
  702. To access the structure of a file other than the active one, the GETFILEID 
  703. statement is provided to get an ID or "handle" on a file. 
  704.  
  705. GETFILEID  var fileid [,filename] 
  706.                     If filename is given, a search is performed for it in the 
  707.                     EPM rings. A match is considered to be found if the name 
  708.                     portion (without drive and path) of a filespec in the ring 
  709.                     matches filename. This could be ambiguous if two files of 
  710.                     the same name (from different directories) are in the ring; 
  711.                     if this is a concern, specify the full filespec, with path, 
  712.                     to force an exact match. 
  713.  
  714.                     This feature can also be used to find a temporary file with 
  715.                     a unique name, such as '.ALL' or '.DIR'. 
  716.  
  717.                     If a match is found, then the fileid will be a valid 
  718.                     integer handle for that file, where fileid >= 0. Otherwise 
  719.                     fileid='', a null string. 
  720.  
  721.                     If the filename is not given, then fileid will be a valid 
  722.                     handle for the current file, where fileid>=0. 
  723.  
  724. Examples:
  725.  
  726.  GETFILEID fileid               /* Set variable fileid to    */
  727.                                 /* correspond to active file */
  728.  
  729.  GETFILEID myid,'AUTOEXEC.BAT'  /* Set variable myid to             */
  730.                                 /* correspond to file AUTOEXEC.BAT. */
  731.                                 /* If AUTOEXEC.BAT is not already   */
  732.                                 /* loaded then myid will be null.   */
  733.  
  734. To assign values to the fileid fields: 
  735.  
  736. fileid.field = expression 
  737.                     fileid must be an integer handle corresponding to a valid 
  738.                     file. field must be one of the field names listed below. 
  739.                     For example, to set the current line of the active file to 
  740.                     one: 
  741.  
  742.     getfileid fileid    /* get the fileid of the active file */
  743.     fileid.line=1       /* set the current line to one */
  744.  
  745. The alternative syntax is: 
  746.  
  747. .field = expression 
  748.                     Since no fileid is specified, the current file is assumed. 
  749.  
  750.    .line=1     /* Make line 1 the current line of the */
  751.                /* current file.  Note that there is   */
  752.                /* no need to get a fileid to set a    */
  753.                /* field of the current (active) file. */
  754.  
  755. A list of all the fileid fields and their meaning is presented here. In the 
  756. following list, remember that x refers to the horizontal axis and y refers to 
  757. the vertical axis. 
  758.  
  759.  
  760. ΓòÉΓòÉΓòÉ 2.8.1. Field Variables Listed ΓòÉΓòÉΓòÉ
  761.  
  762. The following is a list of the field (dot) variables and what information they 
  763. contain: 
  764.  
  765. Field Variable                Description 
  766. AUTOSAVE                      number of changes (0 to 65535) between autosaves; 
  767.                               this counts the true number of changes, not just 
  768.                               number of lines entered. 
  769. AUTOSHELL                     A flag indicating if unrecognized commands 
  770.                               entered on the command line should be checked for 
  771.                               along the PATH or EPMPATH. The default is 1; 
  772.                               someone who frequently mistypes commands and for 
  773.                               whom it takes a while to search the path (e.g., 
  774.                               has many LAN drives in the PATH) might want to 
  775.                               set this to 0. 
  776. COL                           current column position, 1 to 255. 
  777. CURSORX                       cursor's x position relative to window origin. 
  778. CURSORY                       cursor's y position relative to window origin. 
  779. DRAGCOLOR                     is the color of the highlighted area within a 
  780.                               drag area. 
  781. DRAGSTYLE                     determines the type of mark done when a mouse 
  782.                               drag is used to mark text. Valid values are: 
  783.  
  784.    0 = don't show drag 
  785.    1 = show character mark 
  786.    2 = show block mark 
  787.    3 = show line mark 
  788. EAAREA                        pointer to extended attribute area, containing 
  789.                               the EAs for the current file.  See EPM_EA.E for 
  790.                               routines manipulating extended attributes in the 
  791.                               .EAAREA. 
  792. FILENAME                      name of current file. 
  793. FILEINFO                      FILESTATUS4 structure returned from the 
  794.                               DosQueryFileInfo call when current file was 
  795.                               opened. (See the OS/2 toolkit for details of this 
  796.                               structure.)  This can be used to determine if the 
  797.                               copy of the file on disk has been updated since 
  798.                               the file was loaded; if the copy on disk is 
  799.                               read-only; etc. 
  800.  
  801.                               New in EPM 6. 
  802. FONT                          the font id of the current file's font 
  803. FONTHEIGHT                    contains the current font height in pixels. 
  804. FONTWIDTH                     contains the current font height in pixels. 
  805. KEYSET                        the name of the keyset bound to the file, a 
  806.                               string like "EDIT_KEYS". 
  807. LAST                          the total number of lines in the current file. 
  808. LEVELOFATTRIBUTESUPPORT       A bit field indicating the level of attribute 
  809.                               support desired.  The bits are: 
  810.  
  811.    1   Display color attributes. 
  812.    2   Don't skip over attributes when moving the cursor. 
  813.    4   Display font attributes. 
  814.    8   Save attributes in an Extended Attribute when saving the file. 
  815.    16  Used by the macros to indicate that the Compiler menu was added (part of 
  816.        the Workframe support). 
  817.  
  818.                               Note:  Displaying mixed fonts can slow down 
  819.                                      screen refresh considerably.
  820.  
  821.  
  822. LINE                          the line number of the cursor's position, ranging 
  823.                               from 0 to LAST. 
  824. LINEG                         returns the same value as .LINE.  When set, 
  825.                               doesn't cause scrolling, so has less overhead 
  826.                               than setting .LINE when making temporary line 
  827.                               changes. .* 
  828. LOCKHANDLE                    can be used as a Boolean variable determining 
  829.                               whether the current file is locked against other 
  830.                               user's access in a LAN situation. (If non-zero, 
  831.                               the actual value is the file handle of the file, 
  832.                               which is kept open.) 
  833. MARGINS                       the margin settings for the file, a string like 
  834.                               "1 79 1". 
  835. MARKCOLOR                     contains the color for marked text. 
  836. MESSAGECOLOR                  contains the message display color. 
  837. MESSAGELINE                   in older versions of EPM, contained the contents 
  838.                               of the message line. Replaced by the 
  839.                               SetMessageLine command. 
  840. MODIFY                        The number of modifications to the file since it 
  841.                               was loaded or last saved.  Normally ranges 
  842.                               between 1 and .AUTOSAVE. 
  843. MOUSEX                        the column of the mouse location. This variable 
  844.                               is only valid when processing a mouse message. 
  845. MOUSEY                        the row of the mouse location. This variable is 
  846.                               only valid when processing a mouse message. 
  847. STATUSCOLOR                   contains the color of the status line. 
  848. STATUSLINE                    in older versions of EPM, contained the template 
  849.                               for the status line. Replaced by the 
  850.                               SetStatusLine command. 
  851. TABS                          the tab settings for the file, a string like "1 4 
  852.                               7 10" of up to 32 values. The tabs settings is 
  853.                               not a single global setting, but is remembered 
  854.                               for each file. 
  855. TEXTCOLOR                     shows the current textcolor setting. 
  856. TITLETEXT                     contains text to be displayed in the title bar 
  857.                               when this file is the current file. By default, 
  858.                               this field is empty, in which case the .filename 
  859.                               field is used. 
  860. USERSTRING                    this is a temporary storage string for the E 
  861.                               programmer to use for file specific information. 
  862.                               If used in your macro work files, you can do 
  863.                               anything you like with it.  If used in normal 
  864.                               text files being edited, it is suggested that you 
  865.                               add uniquely-delimited tags to the .userstring 
  866.                               rather than simply replacing it, in order to 
  867.                               allow other macros to share the string.  For 
  868.                               example: 
  869.  
  870.                                                             parse value .userstring with '[MyTag:' old_val ']'
  871.                                                             if old_val = '' then
  872.                                                                new_val = my_process_new_file()
  873.                                                                .userstring = .userstring '[MyTag:'new_val']'
  874.                                                             endif
  875.  
  876. VISIBLE                       contains a one if the file is displayable (ie. 
  877.                               not hidden) and a zero if the file is a hidden 
  878.                               file. 
  879. WINDOWHEIGHT                  contains the height of the current window. 
  880. WINDOWWIDTH                   contains the width of the current window. 
  881. WINDOWX                       gap between the right edge of the client windows 
  882.                               presentation space and the right edge of the 
  883.                               client window. 
  884. WINDOWY                       gap between the bottom end of the client windows 
  885.                               presentation space and the bottom end of the 
  886.                               client window. 
  887.  
  888. Some fields with numeric values also follow certain constraints about their 
  889. maximum and minimum values.  Some fields are dependent upon other fields.  The 
  890. following chart shows these dependencies and some of the fields' ranges of 
  891. values. 
  892.  
  893. Field name                Max value                          Min value
  894. ----------                ---------                          ---------
  895.  .AUTOSAVE                 65535                                  0
  896.  .COL                      255                                    1
  897.  .CURSORX                  .windowwidth                           1
  898.  .CURSORY                  .windowheight                          1
  899.  .FILENAME                 a string like 'C:\TESTFILE.DOC'
  900.  .KEYSET                   a string like 'EDIT_KEYS'
  901.  .LINE                     .last                                  0
  902.  .MARGINS                  a string like '1 254 1'
  903.  .MARKCOLOR                255                                    0
  904.  .MESSAGECOLOR             255                                    0
  905.  .MODIFY                   65535                                  0
  906.  .STATUSCOLOR              255                                    0
  907.  .TABS                     a string like '1 4 7 10' or '3'
  908.  
  909.  
  910. ΓòÉΓòÉΓòÉ 2.9. Attribute Pairs ΓòÉΓòÉΓòÉ
  911.  
  912. EPM provides one with the ability to associate information with positions and 
  913. regions of a file without modifying the content of the file.  This capability 
  914. is called attribute support and can be used to provide features like embedded 
  915. objects, hidden text, bookmarks, hypertext links, and structured text editing. 
  916.  
  917. In most editors files/buffers are treated as streams of characters.  EPM 
  918. differs from most editors in that a file/buffer is treated (for display) as a 
  919. stream of characters and attribute records.  Attribute support simply provides 
  920. an interface for managing files/buffers that contain attribute records. 
  921.  
  922. Attribute records themselves are essentially invisible, but because they can be 
  923. used to pass information to the rendering, live parsing, and formatting 
  924. components of the editor, a user of the editor can often ascertain the 
  925. existence and location of some attribute records based on the effect these 
  926. attribute records have on the rendering of the file/buffer. 
  927.  
  928. In order to manage attribute records, it is useful to have a notation system 
  929. for referencing individual attribute records within a file/buffer.  In EPM the 
  930. notation system is positional-- that is, one points to location of the 
  931. attribute record when one wants to reference it. 
  932.  
  933. In an ordinary text editor one can refer to any position in a file/buffer by 
  934. specifying a line number and column number.  This approach is not adequate for 
  935. an editor like EPM that has the dual goal of supporting attributes record 
  936. management and yet minimizing the impact of attribute support on 
  937. applications/macros that are not attribute-aware.  In order to best achieve 
  938. both goals, EPM has replaced the common line/column coordinate system with a 
  939. line/column/atoffset based coordinate system.  In this system each character of 
  940. a line occupies a unique column, but individual attribute records are denoted 
  941. by their attribute offset relative to the next character in the buffer/file. 
  942. The characters themselves always have an atoffset value of zero, so the 
  943. atoffset value is often omitted when referring to characters.  An attribute 
  944. record located immediately to the left of a character is said to be located at 
  945. the same column as that character but at an atoffset of -1.  An attribute 
  946. record immediately to the left of that is said to be at atoffset -2.  The 
  947. following diagram illustrates the notation for various characters and 
  948. attributes on a line: 
  949.  
  950.     abcd[A]efg[B][C][D]h[E]  [F]
  951.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöé
  952.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöö col 11 atoffset -1
  953.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöö column 9  atoffset -1
  954.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöö column 8  (atoffset 0)
  955.     Γöé  Γöé Γöé Γöé   Γöé     Γöö column 8  atoffset -1
  956.     Γöé  Γöé Γöé Γöé   Γöö column 8  atoffset -3
  957.     Γöé  Γöé Γöé Γöö column 5  (atoffset 0)
  958.     Γöé  Γöé Γöö column 5  atoffset -1
  959.     Γöé  Γöö column 4  (atoffset 0)
  960.     Γöö column 1  (atoffset 0)
  961.  
  962. Note:  The text in the example will simply appear as a sequence characters from 
  963.        "a" to "h" because attribute records are invisible.  An exception to 
  964.        this might be if the attributes effect the formatting, parsing, or 
  965.        rendering of the text.
  966.  
  967. As you can see in this first example, each of the characters resides at a 
  968. unique column number and has an implicit atoffset of zero.  You can also see 
  969. all attribute records reside at negative atoffsets and that it is possible for 
  970. more than one attribute record to reside between any two adjacent characters. 
  971. In this example, three attribute records reside between the "g" in column 7 and 
  972. the "h" in column 8. 
  973.  
  974. It should be noted that negative column numbers and positive at offset values 
  975. are invalid.  In previous versions of EPM it was possible to have positive 
  976. atoffsets.  This has been changed because it complicates the implementation 
  977. without providing a satisfactory solution to any problem.  It also be noted 
  978. that overly negative atoffset values have undefined semantics that may vary 
  979. depending on the operation requested.  Most operations will flag an error when 
  980. overly negative values are specified.  ((Footnote:  It is recognized by the 
  981. developers of EPM that people tend to deal with positive numbers better than 
  982. with negative. For this reason, we'd like to change the notation to be positive 
  983. and to represent the position of attributes relative to the character to the 
  984. left. Unfortunately, we are unlikely to find the time to make this change.)) 
  985.  
  986. When working with attributes records it is also important to have a notation 
  987. for the spaces between characters and attribute records.  The convention is 
  988. that each interstitial is reference by the same coordinate as the character or 
  989. attribute to its right.  In the first example, the position on the left side of 
  990. the "c" character is referred to column 3 atoffset 0. Similarly the 
  991. interstitial between the C and D attribute records is referred to as column 8 
  992. atoffset -1. 
  993.  
  994. In addition to positional information, attribute records also contain class, 
  995. value, and range information. 
  996.  
  997. Each attribute record has a class field that is used to categorize the 
  998. attribute record based on its purpose.  For example, one might be a member of a 
  999. bookmark class or sgml tag class.  Certain predetermined classes are supported 
  1000. by the editor:  AC_FONT, AC_COLOR, AC_HSPACE.  Internal support for additional 
  1001. classes will be added later, and applications can create and support additional 
  1002. classes.  This is done by registering a class.  The editor provides C and E 
  1003. macro API's for this. 
  1004.  
  1005. In addition to a class field, each attribute record has a four byte "value" 
  1006. field whose interpretation is based on the class field of the attribute record. 
  1007. For example, the value field of an SGML class attribute record might be a 
  1008. pointer to meta information about the SGML element enclosed by the attribute 
  1009. record.  The interpretation of the value fields of the internally supported 
  1010. attribute classes are: 
  1011.  
  1012. AC_FONT   The value fields of AC_FONT attribute records is interpreted as a 
  1013.           font ID. (See pregister_font for further info about font ID's.) 
  1014.  
  1015. AC_HSPACE This attribute records are always interpreted has having point range 
  1016.           and their value field is interpreted as the amount of horizontal 
  1017.           white space that should be added at this point in the file when 
  1018.           rendered. 
  1019.  
  1020. AC_COLOR  The value fields of AC_COLOR attribute records is interpreted in the 
  1021.           same fashion that the attribute byte of CGA monitors was interpreted. 
  1022.           That is, the high nibble is the background color and the low nibble 
  1023.           is the foreground color. In the future this class may be broken down 
  1024.           into a foreground color class and a background color class so that 
  1025.           support can be added for more than 16 colors. 
  1026.  
  1027. In the current implementation the class field is only one byte long.  In 
  1028. addition, the classes below 64 are reserved for internal use.  This leaves only 
  1029. 192 classes for application use.  This is a relatively small domain, so it 
  1030. suggested that applications try to use as few classes as reasonable.  For 
  1031. example, if one were to implement a SGML tag set where each tag type was a 
  1032. class, one could easily consume most of the available classes.  In a situation 
  1033. like this it is suggested that the application just register a single SGML tag 
  1034. class and make the value field a pointer to a record that describes among other 
  1035. things, the type of SGML tag being represented by the attribute record. 
  1036.  
  1037. Each attribute record has a range field.  The range field indicates over what 
  1038. domain the attribute record rules.  That is, if the attribute record indicates 
  1039. that text should be colored red, the range value indicates what text should be 
  1040. colored red.  There are currently four types of range values supported in EPM: 
  1041. point, set, push, and pop. 
  1042.  
  1043. The "point" range is simply used to remember a location.  Attributes with this 
  1044. range might be used as book marks for example.  Attribute records with such a 
  1045. range effect no text, they just mark a location.  For example if one put a 
  1046. color attribute record with a point range into the document, no text would 
  1047. change color. 
  1048.  
  1049. The "set" range simply indicates that it's attribute record rules over all the 
  1050. text that follows until another set attribute record of the same class is 
  1051. encountered.  Attribute records of this class can easily be used to simulate 
  1052. character oriented attribute support much like that seen in most word 
  1053. processors. 
  1054.  
  1055. The "push" range simply indicates that it's attribute record rules over the the 
  1056. text that follows until suspended with another push attribute record of the 
  1057. same class or until a matching "pop" attribute record is encountered. 
  1058.  
  1059. The "pop" range indicates that the text that follows should be ruled by the 
  1060. attribute record (of the same class) that was suspended by "push" attribute 
  1061. record that currently rules the text to the left of this pop attribute record. 
  1062. Together the push and the pop attribute records are ideally suited implement a 
  1063. structured text system or to do GML and SGML like text tagging. 
  1064.  
  1065. The above definitions of push, pop, and set attribute records are a bit 
  1066. ambiguous on what is done if a file contains both push/pop and set attribute 
  1067. records of the same class.  In actuality the behavior is undefined.  In the 
  1068. current implementation, push and set are actually the same value so the editor 
  1069. can not distinguish between them.  In the future this may change in order to 
  1070. enable some optimizations.  Therefore one should stick to the AR_PUSH, AR_POP, 
  1071. AR_SET, and AR_POINT constant definitions provided in ATTR.E and ATTRIB.H, and 
  1072. one should not mix push/pop attributes with set attributes of the same class. 
  1073. It is anticipated that when one uses several modules/utilties at the same time, 
  1074. each utility might choose to use a different set a ranges for a given attribute 
  1075. class.  No solution to this problem has been adequately worked out at this 
  1076. point, but we don't expect this to be a major problem. 
  1077.  
  1078. Potential solutions might be to register each as being either push/pop or set 
  1079. and point. 
  1080.  
  1081.  
  1082. ΓòÉΓòÉΓòÉ 3. Definition Primitives ΓòÉΓòÉΓòÉ
  1083.  
  1084. The E language has a rich collection of primitives. These primitives are the 
  1085. building blocks of E programs since all E statements must occur within a 
  1086. definition construct. Definition primitives define procedures, commands, keys 
  1087. and initializations. Some definition primitives may be considered procedures. 
  1088. When distinguishing between these DEF procedures, one must consider three 
  1089. factors: how many of each type of definition may coexist in one program, when 
  1090. they are executed and what parameters they can be passed. The definition 
  1091. primitives are : 
  1092.  
  1093. o DEFINIT 
  1094.  
  1095.   These procedures may be multiply defined. All DEFINIT procedures are executed 
  1096.   first upon initialization of the EPM editor, one after another in the order 
  1097.   in which they were encountered during compilation.  (That's what we mean by 
  1098.   "may be multiply defined" - you can have several DEFINIT procedures and they 
  1099.   will be executed in sequence as if they were concatenated.) They take no 
  1100.   arguments and are typically used to initialize universal variables. 
  1101.  
  1102. o DEFEXIT 
  1103.  
  1104.   The converse of DEFINIT.  E executes all DEFEXIT procedures last, just before 
  1105.   it returns to the operating system.  DEFEXIT procedures are also called 
  1106.   during unlinking. Like DEFINITs, these procedures may be multiply defined and 
  1107.   take no arguments. 
  1108.  
  1109. o DEFMAIN 
  1110.  
  1111.   This procedure may be defined only once. DEFMAIN is executed after the 
  1112.   DEFINIT procedures are executed. This procedure is typically used to take 
  1113.   control of the editor's command dialog box arguments and options before the 
  1114.   editor. This can be particularly handy when you want the edit command to take 
  1115.   your own arguments or funky file names like "h:profile exec a". The 
  1116.   parameters that followed the epm command at the OS/2 prompt can be retrieved 
  1117.   by ARG(1), ARG(2), ARG(3), etc. function calls for as many arguments as are 
  1118.   passed. The number of arguments can be determined with the ARG() function. 
  1119.   This type of retrieval will be discussed in the next section. 
  1120.  
  1121. o DEFPROC 
  1122.  
  1123.   This kind of procedure is called by other procedures. It has a much more 
  1124.   sophisticated parameter passing capability to make the programming of other 
  1125.   procedures easier. Its capabilities include call by reference, call by value 
  1126.   and the ability to receive a variable number of arguments. 
  1127.  
  1128. o DEFC 
  1129.  
  1130.   This procedure allows the user to define new commands or redefine internal 
  1131.   editor commands as well as external commands. The command dialog box 
  1132.   arguments may be retrieved by an ARG(1) function call. 
  1133.  
  1134. o DEF 
  1135.  
  1136.   This defines the operation of a key.  It takes no arguments. 
  1137.  
  1138. o DEFKEYS 
  1139.  
  1140.   This is not a procedure and will be talked about in the key definitions 
  1141.   section of this document. This primitive allows KEY procedures to be grouped 
  1142.   into a keyset. 
  1143.  
  1144. o SET 
  1145.  
  1146.   This is not a procedure and will be talked about in the SET definitions 
  1147.   section of this document. This primitive is used for setting some of the 
  1148.   default configurations of the E editor. 
  1149.  
  1150. o CONST 
  1151.  
  1152.   This is not a procedure and will be talked about in the CONST section of this 
  1153.   document. This primitive is used for defining constants used by the E 
  1154.   translator. Constants do not change during execution of the E procs. 
  1155.  
  1156. o DEFMODIFY 
  1157.  
  1158.   DEFMODIFY, DEFLOAD and DEFSELECT are three "events". They are described more 
  1159.   fully later in this section.  DEFMODIFY is automatically triggered when the 
  1160.   file's number of modifications crosses certain threshold values. 
  1161.  
  1162. o DEFLOAD 
  1163.  
  1164.   DEFLOAD is invoked whenever a new file is created in the ring. 
  1165.  
  1166. o DEFSELECT 
  1167.  
  1168.   This event is automatically triggered whenever you switch files. 
  1169.  
  1170. The procedure definition primitives DEFINIT, DEFMAIN, DEFPROC, DEF and DEFC 
  1171. have no explicit termination keyword. Each definition is ended by the beginning 
  1172. of another DEFxxx. The rest of this chapter will explain each definition 
  1173. primitive in more detail. 
  1174.  
  1175.  
  1176. ΓòÉΓòÉΓòÉ 3.1. Parameter Retrieval using ARG(1) ΓòÉΓòÉΓòÉ
  1177.  
  1178. A DEFC or DEFMAIN receives only one argument/parameter: the command string. The 
  1179. command string consists of what was last typed at the command dialog box. The 
  1180. string may contain several words separated by spaces. In the case of DEFC, its 
  1181. sole argument will consist of all the characters typed at the E command dialog 
  1182. box after the name of the command. This argument is not declared as a parameter 
  1183. in the DEFC declaration. The DEFC construct does not allow for any parameter 
  1184. declarations. Instead, the argument can be retrieved via a function call, 
  1185. ARG(1). An example of this usage is: 
  1186.  
  1187.  
  1188.   defc test
  1189.     sayerror "arg(1) is " arg(1)
  1190.  
  1191. The user activates this command by typing test on the E command dialog box. 
  1192. This would result in the following being printed on the message area: arg(1) is 
  1193. . If the user added a parameter when calling test, for example test stuff, then 
  1194. the following string would be printed: arg(1) is stuff. 
  1195.  
  1196. In DEFMAIN, as with a DEFC, the only way to access the argument is to use an 
  1197. ARG(1) function call. DEFMAIN's argument/command string will consist of 
  1198. everything the user typed after the epm command at the OS/2 prompt. For 
  1199. example, assume that the following lines are added to the file MYMAIN.E: 
  1200.  
  1201.  
  1202.   defmain
  1203.     sayerror "arg(1) is " arg(1)
  1204.  
  1205. If the user invokes the editor with the command epm `list *.e', DEFMAIN will 
  1206. print arg(1) is  'list *.e' in the message area. 
  1207.  
  1208. A DEFPROC can receive multiple arguments separated by commas from the primitive 
  1209. that calls it. In a DEFPROC, ARG(1) is only the first parameter. An example of 
  1210. this usage is: 
  1211.  
  1212. defc test2
  1213.    call test2('actual param 1', 'actual param 2')
  1214.  
  1215. defproc test2(param1_decl, param2_decl)
  1216.    sayerror "arg(1) is " arg(1)
  1217. If the user types test2 at the command dialog box, the procedure will print 
  1218. arg(1) is actual param 1. 
  1219.  
  1220. For the exact syntax of the ARG() procedure, please refer to section Built-in 
  1221. Statements and Procedures. 
  1222.  
  1223.  
  1224. ΓòÉΓòÉΓòÉ 3.2. DEFINIT ΓòÉΓòÉΓòÉ
  1225.  
  1226. The DEFINIT keyword allows the initialization of variables for use by other E 
  1227. procedures. There is no limit to the number of DEFINIT definitions in an E 
  1228. source file. The order of execution of the DEFINIT definitions is the same as 
  1229. their compilation order. All DEFINIT definitions are executed before the 
  1230. DEFMAIN definition is executed. The general syntax is: 
  1231.  
  1232.   DEFINIT
  1233.   {UNIVERSAL variable  {,variable} }
  1234.   {statement}
  1235.  
  1236.  
  1237. ΓòÉΓòÉΓòÉ 3.3. DEFEXIT ΓòÉΓòÉΓòÉ
  1238.  
  1239. The DEFEXIT keyword allows for statements to be executed only when leaving the 
  1240. editor or unlinking a module. This is useful for any tasks the user wishes to 
  1241. perform once per session after any and all changes are made to a file. For 
  1242. example, this allows the user to keep files or communication channels open 
  1243. throughout the editing session for speed, and only close then when the user 
  1244. really exits from E. 
  1245.  
  1246. The syntax is the same as that of DEFINIT: 
  1247.  
  1248.   DEFEXIT
  1249.   {UNIVERSAL variable  {,variable} }
  1250.   {statement}
  1251.  
  1252.  
  1253. ΓòÉΓòÉΓòÉ 3.4. DEFMAIN ΓòÉΓòÉΓòÉ
  1254.  
  1255. The DEFMAIN construct allows the user to take control of the command line 
  1256. arguments, i.e. those arguments and options that the user specifies when 
  1257. invoking the editor at the OS/2 prompt. The command line arguments may be 
  1258. retrieved by an ARG(1) function call. The following example comes from the E 
  1259. editor's DEFMAIN in file MAIN.E: 
  1260.  
  1261. defmain
  1262.     os2cmdline = 'e 'arg(1)
  1263.  
  1264. The DEFMAIN definition is not required, and if present, it is executed after 
  1265. all DEFINIT definitions. To avoid an undefined state of the editor, a blank 
  1266. file is inserted in the top ring of the editor before DEFMAIN is executed. The 
  1267. general syntax is: 
  1268.  
  1269.   DEFMAIN
  1270.   {UNIVERSAL variable  {,variable} }
  1271.   statement  {statement}
  1272.  
  1273.  
  1274. ΓòÉΓòÉΓòÉ 3.5. Procedure Definitions (DEFPROC) ΓòÉΓòÉΓòÉ
  1275.  
  1276. The DEFPROC primitive is used to define new procedures (functions). The general 
  1277. syntax is: (See E language syntax for precise description). 
  1278.  
  1279.   DEFPROC  name [( [ [VAR] p1]  {, [VAR] p2})] [=]
  1280.      {UNIVERSAL variable  {,variable} }
  1281.      statement  {statement}
  1282.      [RETURN [expression] ].
  1283.  
  1284.    where name, p's and v's are valid E identifiers.
  1285.  
  1286. Procedures can return a string of 255 characters or less. If no string is 
  1287. returned, or if a simple RETURN statement with no value is issued, a null 
  1288. string is automatically returned when the procedure definition ends. 
  1289.  
  1290. The maximum number of DEFPROC arguments is 8. If parameters are specified (like 
  1291. p1 and p2 above) then the function is assumed to require a minimum of that many 
  1292. arguments. For example, if you've defined defproc myproc(x,y,z) but call it 
  1293. elsewhere with call myproc(a,b), you'll get an error when the call occurs (at 
  1294. run-time) "Procedure needs more arguments". But you can pass MORE than the 
  1295. minimum number of arguments. That is, call myproc(a,b,c,d) will work.  The 
  1296. number of arguments can be retrieved inside the procedure using arg(). You saw 
  1297. earlier how arg(1) retrieved the first parameter. Similarly, arg(2) retrieves 
  1298. the second parameter and arg(3) retrieves the third, etc. In the above example, 
  1299. the parameters c and d can be retrieved using the calls arg(3) and arg(4), 
  1300. respectively. For an illustration of this technique, see the file SORTE.E. 
  1301.  
  1302. If the keyword VAR prefaces a parameter name in the called procedure's 
  1303. parameter list, then the variable that the caller passes in the corresponding 
  1304. position may be changed (call by reference). If the caller passes a parameter 
  1305. in this position that is not a variable, the E interpreter will detect the 
  1306. error at run time and halt. 
  1307.  
  1308. In example 3, call by reference is demonstrated. If the user types test at the 
  1309. command dialog box, the defc test will call the defproc myproc() which will 
  1310. print: a and b are 1  2. After the procedure returns, defc test will print : a 
  1311. and b are 3  2. Variable b was permanently changed by the assignment in 
  1312. procedure myproc() because it had the var prefix. Variable a's value was 
  1313. unchanged once procedure myproc() returned. If defc test had made the following 
  1314. call: call myproc(a, 5*6), an invalid call by reference message would appear at 
  1315. run time. 
  1316.  
  1317.  
  1318. ΓòÉΓòÉΓòÉ 3.5.1. Example 1: ΓòÉΓòÉΓòÉ
  1319.  
  1320.      defproc  myproc               /* Define a new procedure */
  1321.        return  arg()               /* Return number of arguments */
  1322.                                    /* passed to procedure.*/
  1323.  
  1324.      def a_l                       /* Define the key Alt-L */
  1325.        call myproc()               /* Throw away 0 returned by myproc */
  1326.        Nofargs=myproc('a','b')     /* Sets Nofargs to 2 */
  1327.  
  1328.  
  1329. ΓòÉΓòÉΓòÉ 3.5.2. Example 2: ΓòÉΓòÉΓòÉ
  1330.  
  1331.      defproc  myproc               /* Define a new procedure */
  1332.        return  arg(1)              /* Return first argument  */
  1333.                                    /* passed to procedure.*/
  1334.  
  1335.      def a_l                       /* Define the key Alt-L */
  1336.        call myproc()               /* Throw away '' returned by myproc */
  1337.        Firstarg=myproc('a','b')    /* Sets Firstarg to 'a' */
  1338.        Firstarg=myproc()           /* Sets Firstarg to ''  */
  1339.  
  1340.  
  1341. ΓòÉΓòÉΓòÉ 3.5.3. Example 3: ΓòÉΓòÉΓòÉ
  1342.  
  1343.      definit
  1344.        universal  always_around    /* Define a global variable */
  1345.  
  1346.        always_around=0             /* set global variable to 0*/
  1347.  
  1348.  
  1349.      defc test
  1350.        a = 3
  1351.        b = 5
  1352.        call myproc(a, b)
  1353.        sayerror "a and b are " a b
  1354.  
  1355.      defproc  myproc(a,var b)      /* Define a new procedure */
  1356.        universal  always_around
  1357.  
  1358.        always_around=1             /* set global variable to 1*/
  1359.        a=1                         /* Change local parameter */
  1360.        b=2                         /* Change callers variable */
  1361.        i=10                        /* Set local variable */
  1362.        sayerror "a and b are " a b
  1363.  
  1364.  
  1365. ΓòÉΓòÉΓòÉ 3.6. Command Definitions (DEFC) ΓòÉΓòÉΓòÉ
  1366.  
  1367. The DEFC construct is used to define new commands. When a command is issued, E 
  1368. will search for the first word of the command as follows: 
  1369.  
  1370.  
  1371. ΓòÉΓòÉΓòÉ 3.6.1. Command search order: ΓòÉΓòÉΓòÉ
  1372.  
  1373.  1. Look for a DEFC command (i.e. one defined in a .E file) 
  1374.  2. Look for an internal editor command (e.g. MARGINS or EDIT) 
  1375.  3. Search the directories in the PATH environment variable for any executable 
  1376.     file, as follows: 
  1377.  
  1378.     a. a .EXE, .CMD, .EX file in current directory 
  1379.     b. a .EXE, .CMD, .EX file in the PATH or EPMPATH directories 
  1380.     c. a .EXE, .CMD, .EX file in the same directory as EPM.EXE. 
  1381.  
  1382. Because of the search order, user-defined commands with the same name as 
  1383. built-in commands can override internal editor commands. The XCOM command may 
  1384. be used to force execution of an internal editor command in the case of 
  1385. duplicates. 
  1386.  
  1387.  
  1388. ΓòÉΓòÉΓòÉ 3.6.2. Example: ΓòÉΓòÉΓòÉ
  1389.  
  1390.   defc   edit=              /* Redefine the edit command. */
  1391.     'xcom edit 'arg(1)      /* Pass command through to the editor  */
  1392. The general syntax is (See E language syntax for precise description): 
  1393.  
  1394.   DEFC  name {,name}  [=]
  1395.      {UNIVERSAL variable  {,variable} }
  1396.      statement  {statement}
  1397.      [RETURN [expression] ].
  1398.  
  1399.     where name is a valid E identifier.
  1400.  
  1401.  
  1402. ΓòÉΓòÉΓòÉ 3.7. Key Definitions (DEF and DEFKEYS) ΓòÉΓòÉΓòÉ
  1403.  
  1404. A keyset is a named collection of keys.  Typically, this collection defines a 
  1405. particular mode of editing. For example, you might want the keyboard to behave 
  1406. one way in a drawing mode and another way in an editing mode. Therefore, each 
  1407. of these modes would warrant its own keyset. You can have many keysets defined, 
  1408. but only one can be used at any time. 
  1409.  
  1410. The DEFKEYS keyword names the keyset. The KEYS statement activates a keyset. 
  1411. The DEF keyword defines a key or pseudo-key that belongs to the current keyset. 
  1412.  
  1413. Note:  Keys may be redefined.  If you create a DEF and the same DEF already 
  1414. exists in an earlier place in the compilation, the compiler will not issue an 
  1415. error.  It will forget the previous definition.  The penalty is that the 
  1416. previous code is not removed (difficult to do in a fast one-pass compiler), so 
  1417. a little memory will be wasted in the E.EX file. For a list of definable keys, 
  1418. see E-Definable Keys. 
  1419.  
  1420. DEF key_name|ch [-ch] {, key_name|ch [-ch]}[=] 
  1421.                     Define key. ch represents any printable character. A 
  1422.                     line-break (newline) is allowed after the comma, which can 
  1423.                     help readability if you're defining many keynames at once. 
  1424.  
  1425.                                         Example:
  1426.                                         /* Define 27 different keys to do same function,
  1427.                                                                                  pagedown. */
  1428.                                         def 'a'-'z', a_t = pagedown
  1429.  
  1430.                                         def '#' = 'add' /* define single key for add command */
  1431.  
  1432.                     Note that keys can only be defined to execute code.  If you 
  1433.                     want to remap the keyboard, you have to use the keyin 
  1434.                     statement for text characters, and for keys defined to 
  1435.                     execute code, either call the same routine as that key is 
  1436.                     defined to call or, for keys which don't have a simple 
  1437.                     definition and which you don't need to remap, define the 
  1438.                     new key to execute the old one using the executekey 
  1439.                     statement. 
  1440.  
  1441.                                           -- Define all alphabetic keys to type their upper-case equivalents
  1442.                                         def 'a' - 'z' = keyin upcase(lastkey())
  1443.  
  1444.                                           -- Define Alt+A to type a lower-case 'a'
  1445.                                         def a_A = keyin 'a'
  1446.  
  1447.                                           -- Define 'G' to enter an ASCII 234 (omega symbol)
  1448.                                         def 'G' = keyin \234
  1449.  
  1450.                                           -- Define Alt+0 to execute the same command executed by another key
  1451.                                         def a_0=    /* same as Alt+Equal, for sake of German keyboards */
  1452.                                            'dolines'
  1453.  
  1454.                                           -- Define Ctrl+P to execute whatever code the Alt+P key does
  1455.                                         def c_P = executekey a_p
  1456.  
  1457. DEFKEYS  name  [NEW | BASE | OVERLAY | CLEAR] 
  1458.                     Define keyset.  If the OVERLAY or no option is specified, 
  1459.                     then the last set of key definitions is copied onto the 
  1460.                     named set of keys.  The named keyset thus starts out with 
  1461.                     the same keys as the last one.  The NEW (or equivalent 
  1462.                     BASE) option starts a keyset with only the alphabetic, 
  1463.                     numeric and control characters. The CLEAR option starts an 
  1464.                     empty keyset. Please refer to section Keysets for more 
  1465.                     information on the BASE, OVERLAY and CLEAR options. 
  1466.  
  1467. A sample keyset named test_keys is defined below. This example shows the 
  1468. redefinition of the Enter and Space keys: 
  1469.  
  1470.                    defkeys test_keys
  1471.  
  1472.                    def ' '=
  1473.                       universal expand_on
  1474.                       if expand_on then
  1475.                          if  e_first_expansion()=0 then
  1476.                             keyin ' '
  1477.                          endif
  1478.                       else
  1479.                          keyin ' '
  1480.                       endif
  1481.  
  1482.                    def enter=
  1483.                       universal expand_on
  1484.  
  1485.                       if insertstate() then
  1486.                          insert
  1487.                       else
  1488.                          call maybe_autosave()
  1489.                          if expand_on then
  1490.                             if e_second_expansion()=0 then
  1491.                                call einsert_line()
  1492.                             endif
  1493.                          else
  1494.                             call einsert_line()
  1495.                          endif
  1496.                       endif
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ 3.8. SET Definitions ΓòÉΓòÉΓòÉ
  1500.  
  1501. The E editor has a set of configuration options which may be reconfigured by a 
  1502. SET definition. SET definitions are executed before the DEFINIT procedure 
  1503. definitions are executed.  For examples of these configuration options, refer 
  1504. to The EPM User's Guide. 
  1505.  
  1506. It can be seen that there isn't much need for the SET definition primitive 
  1507. since most editor options can be set in DEFINIT and DEFMAIN. (We hope to do 
  1508. away with them in the future, in favor of straightforward commands like 'tabs' 
  1509. and 'margins'.) 
  1510.  
  1511. Most users will care to change only insert_state. 
  1512.  
  1513.  
  1514. ΓòÉΓòÉΓòÉ 3.9. Constants ΓòÉΓòÉΓòÉ
  1515.  
  1516. The CONST keyword allows a user to define constants that the E translator 
  1517. remembers during the translation of the E procs. ET substitutes the value 
  1518. whenever it sees the constant name. Constants serve no purpose at run-time. 
  1519.  
  1520. Constants may be redefined to the same value without causing an error or loss 
  1521. of memory space.  This is useful if you wish to develop a package for 
  1522. distribution, since you can define the constants you need without worrying 
  1523. about conflict with other files installed by the user.  The syntax for defining 
  1524. constants is: 
  1525.  
  1526.    CONST
  1527.       c1 = exp1 [,]
  1528.       c2 = exp2 [,]
  1529.       ...
  1530.  
  1531.  example
  1532.     CONST
  1533.        a=3
  1534.        b=a * 2
  1535.  
  1536.  
  1537. ΓòÉΓòÉΓòÉ 3.10. DEFMODIFY ΓòÉΓòÉΓòÉ
  1538.  
  1539. The DEFMODIFY event is executed when a file's number of modifications: 
  1540.  
  1541. o goes from zero to nonzero (the first modification - we might want to change 
  1542.   the screen color); 
  1543. o goes from nonzero to zero (after a save - we might want to change the screen 
  1544.   color back again); 
  1545. o goes from less than .autosave to greater than or equal to .autosave (so we 
  1546.   can autosave). 
  1547.  
  1548. See the file MODIFY.E for more details. 
  1549.  
  1550.  
  1551. ΓòÉΓòÉΓòÉ 3.11. DEFLOAD ΓòÉΓòÉΓòÉ
  1552.  
  1553. DEFLOAD is invoked whenever a new file is created in the ring, whether loaded 
  1554. from disk or created by 'edit /n' or 'edit /c'. 
  1555.  
  1556. It is invoked at the end of all processing, the last thing before returning 
  1557. control to the user, so as not to be fooled by the file moving around in the 
  1558. ring or being renamed. If a file is loaded from disk and renamed, DEFLOAD gets 
  1559. the right filename. 
  1560.  
  1561. After all new files are defload-processed, the expected current file is 
  1562. restored.  Thus the command 'e one two' loads both files, invokes defload on 
  1563. 'one', then on 'two', and finally re-activates 'one'; the user is left looking 
  1564. at the same file as in the old days.  This is done internally so the defload 
  1565. procs don't have to worry about restoring fileids.  Understand this example: 
  1566.  
  1567.    defc rcedit
  1568.       'edit 'arg(1)
  1569.       if rc=sayerror('New file') then
  1570.          sayerror "It's a new file"
  1571.       endif
  1572.  
  1573.    defload  -- this defload procedure need not be close to the defc.
  1574.       sayerror "DEFLOAD for ".filename
  1575.  
  1576. When you type 'rcedit nosuch', the file nosuch (which doesn't exist on disk) is 
  1577. created in the ring.  DEFLOAD is not triggered until after all other procs are 
  1578. done, so RCEDIT runs to completion with the proper RC value.  You'll see 'It's 
  1579. a new file' and then 'DEFLOAD for nosuch'. For another example of a DEFLOAD 
  1580. definition statement see sample menu addition. 
  1581.  
  1582. It's not guaranteed that the files will be defload-processed in the same order 
  1583. as they're loaded.  They're processed in fileid order.  So 'two' might have 
  1584. been processed before 'one' if fileids are reused. 
  1585.  
  1586. The DEFLOAD event is also triggered whenever the name of the file changes. 
  1587. Typically a DEFLOAD will do things like set tabs and margins based on the 
  1588. filetype, so a name change is treated the same as a new load. 
  1589.  
  1590.  
  1591. ΓòÉΓòÉΓòÉ 3.12. DEFSELECT ΓòÉΓòÉΓòÉ
  1592.  
  1593. This event is automatically triggered whenever you switch files.  To be exact, 
  1594. it is invoked after all other command processing is done, if the then-current 
  1595. file is different from the current file before the command.  Thus if a command 
  1596. switches to a temporary file but switches back to the original file before 
  1597. ending, this event will not be triggered. 
  1598.  
  1599. This replaces the clumsy previous method, a procedure select_edit_keys() which 
  1600. had to be explicitly called at the end of any action that might have switched 
  1601. files. 
  1602.  
  1603. But there's not much work to be done in this event because most of the things 
  1604. that used to be done in select_edit_keys() are now done only once at file-load 
  1605. time, in the DEFLOAD event.  The keyset, tabs and margins stick with the file 
  1606. from then on.  In the standard macros nothing is done in the DEFSELECT. 
  1607.  
  1608. Starting with EPM 6, the DEFSELECT event is also triggered whenever the name of 
  1609. the file changes, just like the DEFLOAD. 
  1610.  
  1611. Note:  The order of events at start-up is:  definit, defmain, defload, 
  1612. defmodify and defselect.  The defmodify event would not normally occur at 
  1613. start-up, unless your defmain modified the newly-loaded file. 
  1614.  
  1615. These three events can be multiply defined.  You can have multiple procedures 
  1616. under the same name scattered throughout your macro set, and they'll be run in 
  1617. succession.  (As DEFINIT procedures have been scattered around the E files in 
  1618. the past.)  This helps keep the macros modular - if you're writing an editor 
  1619. application that needs to get control whenever a new file is loaded (the old 
  1620. BOOKMARK application comes to mind), you can write a DEFLOAD within your module 
  1621. without having to alter the base E files. 
  1622.  
  1623.  
  1624. ΓòÉΓòÉΓòÉ 4. Statements ΓòÉΓòÉΓòÉ
  1625.  
  1626. Procedures, commands and key definitions are composed of statements. Valid 
  1627. statements in the E language are: 
  1628.  
  1629. Construct:                          Example: 
  1630.  
  1631. assignment statements 
  1632.                                     temp = 36 
  1633.  
  1634. built-in statements 
  1635.                                     insertline "Written by the Yorktown E 
  1636.                                     group", 2 
  1637.  
  1638. conditional statements 
  1639.                                     to be discussed in section Conditional and 
  1640.                                     Loop Statements 
  1641.  
  1642. parse statements 
  1643.                                     to be discussed in section The Parse 
  1644.                                     Statement 
  1645.  
  1646. compiler directive statements 
  1647.                                     to be discussed in section Compiler 
  1648.                                     Directive Statements 
  1649.  
  1650. procedure calls 
  1651.                                     testproc(arg1, arg2) 
  1652.  
  1653. commands 
  1654.                                     to be discussed in section Using EPM 
  1655.                                     Commands in E Statements 
  1656.  
  1657.  
  1658. ΓòÉΓòÉΓòÉ 4.1. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  1659.  
  1660. In the following syntactic description the same symbolic conventions are used 
  1661. as in The EPM User's Guide section "E Commands". In addition, the word var 
  1662. followed by an argument means that the argument must be a variable, i.e. a 
  1663. number, string or expression is not acceptable. 
  1664.  
  1665. Most of the following statements can be optionally spelled with underscores 
  1666. between the words. Please refer to E Language Syntax for more information. 
  1667.  
  1668. Those commands followed by parentheses are procedures; those not followed by 
  1669. parentheses are statements. Each can be followed by arguments. Only procedures 
  1670. can return values. 
  1671.  
  1672.  
  1673. ΓòÉΓòÉΓòÉ 4.1.1. ABBREV(information, info [, length] ) ΓòÉΓòÉΓòÉ
  1674.  
  1675. Choose: 
  1676.  
  1677. o Syntax 
  1678. o Definition 
  1679. o Example 
  1680. o E Language Syntax 
  1681.  
  1682.  
  1683. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1684.  
  1685. ABBREV(information, info [, length]) 
  1686.  
  1687.  
  1688. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1689.  
  1690. ABBREV returns 1 if info is equal to the leading characters of information and 
  1691. the length of info is not less than length. ABBREV returns 0 if neither of 
  1692. these conditions is met. 
  1693.  
  1694. If specified, length must be a nonnegative whole number. The default for length 
  1695. is the number of characters in info. 
  1696.  
  1697.  
  1698. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1699.  
  1700. Here are some examples: 
  1701.  
  1702.  ABBREV('Print','Pri')      ->    1
  1703.  ABBREV('PRINT','Pri')      ->    0
  1704.  ABBREV('PRINT','PRI',4)    ->    0
  1705.  ABBREV('PRINT','PRY')      ->    0
  1706.  ABBREV('PRINT','')         ->    1
  1707.  ABBREV('PRINT','',1)       ->    0
  1708.  
  1709. Note:  A null string will always match if a length of 0 (or the default) is 
  1710.        used. This allows a default keyword to be selected automatically if 
  1711.        desired. For example:
  1712.  
  1713. option = entrybox('Enter option:')
  1714.         /* keyword1 is to be the default */
  1715. if abbrev('keyword1',option) then ...
  1716. elseif abbrev('keyword2',option) then ...
  1717.   ...
  1718. endif
  1719.  
  1720.  
  1721. ΓòÉΓòÉΓòÉ 4.1.2. ACTIVATEACCELTABLE var fileid ΓòÉΓòÉΓòÉ
  1722.  
  1723. Choose: 
  1724.  
  1725. o Syntax 
  1726. o Definition 
  1727. o E Language Syntax 
  1728.  
  1729.  
  1730. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1731.  
  1732. ACTIVATEACCELTABLE  table_name 
  1733.  
  1734.  
  1735. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1736.  
  1737. Makes the named accelerator table the active one. 
  1738.  
  1739. See also: 
  1740.  
  1741. o Building Accelerator Tables from the Macro Language 
  1742. o BUILDACCELTABLE 
  1743. o DELETEACCEL 
  1744. o QUERYACCELSTRING 
  1745.  
  1746.  
  1747. ΓòÉΓòÉΓòÉ 4.1.3. ACTIVATEFILE var fileid ΓòÉΓòÉΓòÉ
  1748.  
  1749. Choose: 
  1750.  
  1751. o Syntax 
  1752. o Definition 
  1753. o Example 
  1754. o E Language Syntax 
  1755.  
  1756.  
  1757. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1758.  
  1759. ACTIVATEFILE  fileid 
  1760.  
  1761.  
  1762. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1763.  
  1764. Makes the file identified by the variable fileid the current file. 
  1765.  
  1766. Fileid must be a simple variable (as indicated by the word var)  containing a 
  1767. valid file id number.  If you give an expression, the compiler will stop and 
  1768. complain, "Expression not assignment compatible." 
  1769.  
  1770.  
  1771. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1772.  
  1773.       Correct usage:
  1774.       ACTIVATEFILE myfileid
  1775.  
  1776.       The following expressions will not work:
  1777.       ACTIVATEFILE  fileid' '
  1778.       ACTIVATEFILE ARG(1)
  1779.  
  1780.  
  1781. ΓòÉΓòÉΓòÉ 4.1.4. ADDRESS(variable) ΓòÉΓòÉΓòÉ
  1782.  
  1783. Choose: 
  1784.  
  1785. o Syntax 
  1786. o Definition 
  1787. o Definition 
  1788. o E Language Syntax 
  1789.  
  1790.  
  1791. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1792.  
  1793. ADDRESS( variable ) 
  1794.  
  1795.  
  1796. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1797.  
  1798. Returns the address of a variable. Intended for use in dynalink calls, the 
  1799. format of the address depends on the version of EPM being used. 
  1800.  
  1801.  
  1802. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1803.  
  1804. In 16-bit versions (EPM 5.xx), 
  1805.  
  1806.   ADDRESS(varname) == SELECTOR(varname) || OFFSET(varname)
  1807.  
  1808. In 32-bit versions (EPM 6.xx), 
  1809.  
  1810.   ADDRESS(varname) ==  OFFSET(varname) || SELECTOR(varname)
  1811.  
  1812.  
  1813. ΓòÉΓòÉΓòÉ 4.1.5. ADJUSTBLOCK ΓòÉΓòÉΓòÉ
  1814.  
  1815. Choose: 
  1816.  
  1817. o Syntax 
  1818. o Definition 
  1819. o E Language Syntax 
  1820.  
  1821.  
  1822. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1823.  
  1824. ADJUSTBLOCK | ADJUST_BLOCK 
  1825.  
  1826.  
  1827. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1828.  
  1829. Overlays marked block at cursor, like the standard key definition Alt-A.  The 
  1830. source block is filled with spaces. 
  1831.  
  1832.  
  1833. ΓòÉΓòÉΓòÉ 4.1.6. ADJUSTMARK ΓòÉΓòÉΓòÉ
  1834.  
  1835. Choose: 
  1836.  
  1837. o Syntax 
  1838. o Definition 
  1839. o E Language Syntax 
  1840.  
  1841.  
  1842. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1843.  
  1844. ADJUSTMARK 
  1845.  
  1846.  
  1847. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1848.  
  1849. Moves marked text to the location of the cursor by overlaying. The old location 
  1850. is filled with blanks. 
  1851.  
  1852.  
  1853. ΓòÉΓòÉΓòÉ 4.1.7. ARG([numeric_expression]) ΓòÉΓòÉΓòÉ
  1854.  
  1855. Choose: 
  1856.  
  1857. o Syntax 
  1858. o Definition 
  1859. o Example 
  1860. o E Language Syntax 
  1861.  
  1862.  
  1863. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1864.  
  1865. ARG([numeric_expression]) 
  1866.  
  1867.  
  1868. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1869.  
  1870. May be used only in a DEFMAIN, DEFC or DEFPROC. In the case of a DEFPROC, if 
  1871. numeric_expression is not given, the number of arguments passed to the macro is 
  1872. returned.  Otherwise the expression is evaluated to a number and the 
  1873. corresponding argument is returned. If there are fewer arguments than specified 
  1874. by the expression, a null string is returned. 
  1875.  
  1876.  
  1877. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1878.  
  1879. For example: 
  1880.  
  1881.   numofargs = arg()
  1882.   argfour = arg(4)
  1883.  
  1884. In the first example, the number of arguments that were passed is returned in 
  1885. the variable numofargs. In the second example the four argument is returned in 
  1886. the variable argfour. 
  1887.  
  1888.  
  1889. ΓòÉΓòÉΓòÉ 4.1.8. ASC(character) ΓòÉΓòÉΓòÉ
  1890.  
  1891. Choose: 
  1892.  
  1893. o Syntax 
  1894. o Definition 
  1895. o Example 
  1896. o E Language Syntax 
  1897.  
  1898.  
  1899. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1900.  
  1901. ASC('character') 
  1902.  
  1903.  
  1904. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1905.  
  1906. Returns the ASCII decimal value of the character expression. 
  1907.  
  1908.  
  1909. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1910.  
  1911. For example: 
  1912.  
  1913.   ASC('A') = 65
  1914.  
  1915.  
  1916. ΓòÉΓòÉΓòÉ 4.1.9. ATOI(numeric_expression) ΓòÉΓòÉΓòÉ
  1917.  
  1918. Choose: 
  1919.  
  1920. o Syntax 
  1921. o Definition 
  1922. o Example 
  1923. o E Language Syntax 
  1924.  
  1925.  
  1926. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1927.  
  1928. ATOI('numeric_expression') 
  1929.  
  1930.  
  1931. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1932.  
  1933. Converts the E language representation of a number (as a string) to the C 
  1934. language representation of an integer (data type int). Since many functions 
  1935. that are available through the function DYNALINK() require input to be in 
  1936. binary numbers as opposed to ASCII strings, we provide functions to convert 
  1937. ASCII strings into binary numbers. For an example of this usage see the 
  1938. DYNALINK() entry in this section. 
  1939.  
  1940.  
  1941. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1942.  
  1943. The following shows the high-level strings and the equivalent machine 
  1944. representation: 
  1945.  
  1946. string     machine representation  (hexadecimal digits)
  1947. '40'           34 30    /* '4' is 0x34 & '0' is 0x30 */
  1948.  
  1949. atoi('40')     28 00    /* 28 00 is 40 decimal       */
  1950.                         /* since byte swapping       */
  1951.                         /* exists in the Intel       */
  1952.                         /* architecture              */
  1953.                         /* In reality the word       */
  1954.                         /* would be 0x0028           */
  1955.  
  1956.  
  1957. ΓòÉΓòÉΓòÉ 4.1.10. ATOL(numeric_expression) ΓòÉΓòÉΓòÉ
  1958.  
  1959. Choose: 
  1960.  
  1961. o Syntax 
  1962. o Definition 
  1963. o E Language Syntax 
  1964.  
  1965.  
  1966. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1967.  
  1968. ATOL('numeric_expression') 
  1969.  
  1970.  
  1971. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1972.  
  1973. Converts the E language representation of a number (as a string) to the C 
  1974. language representation of a long integer (data type long). For use with C 
  1975. functions that require numeric parameters, for example function calls via 
  1976. DYNALINK(). 
  1977.  
  1978.  
  1979. ΓòÉΓòÉΓòÉ 4.1.11. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var fileid] ΓòÉΓòÉΓòÉ
  1980.  
  1981. Choose: 
  1982.  
  1983. o Syntax 
  1984. o Definition 
  1985. o Example 
  1986. o E Language Syntax 
  1987.  
  1988.  
  1989. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1990.  
  1991. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var 
  1992. fileid] 
  1993.  
  1994.  
  1995. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1996.  
  1997. subop is one of the following: 
  1998.  
  1999. const
  2000.    FIND_NEXT_ATTR_SUBOP =  1
  2001.    FIND_PREV_ATTR_SUBOP =  2
  2002.    FIND_MATCH_ATTR_SUBOP = 3
  2003.    DELETE_ATTR_SUBOP =    16
  2004.  
  2005. The use of the remaining parameters varies with the operation to be performed. 
  2006.  
  2007. FIND_NEXT_ATTR_SUBOP This action finds the next occurance (not including the 
  2008.           specified location) of an attribute record of the specified class. 
  2009.  
  2010.    class   On input, this specifies the attribute class of the attribute 
  2011.            records of interest.  A value of ANY_CLASS (zero) indicates that the 
  2012.            position of the next attribute record of any class should be 
  2013.            returned. On output, the class of the found attribute.  A class of 
  2014.            zero indicates that no attribute record was found. 
  2015.    offset  On input, the location (non-inclusive) where the search is to begin. 
  2016.            On output, the location of the found attribute record.  If none was 
  2017.            found, then the parameter will not be modified. 
  2018.    column  On input, the location where the search is to begin. On output, the 
  2019.            location of the found attribute record.  If none was found, then the 
  2020.            parameter will not be modified. 
  2021.    line    On input, the location where the search is to begin. On output, the 
  2022.            location of the found attribute record.  If none was found, then the 
  2023.            parameter will not be modified. 
  2024.    fileid  The fileid of the file where the search is to occur.  The default is 
  2025.            the current file. 
  2026.  
  2027. FIND_PREV_ATTR_SUBOP This action is just like the FIND_NEXT_ATTR_SUBOP except 
  2028.           that it finds the previous occurance of an attribute record of the 
  2029.           specified class rather than the next occurance. 
  2030.  
  2031. FIND_MATCH_ATTR_SUBOP This action finds the (push/pop model) attribute record 
  2032.           that matches the specified attribute record. For example, if a push 
  2033.           attribute record was specified, the location of the corresponding pop 
  2034.           attribute record is returned. 
  2035.  
  2036.    class   Unused parameter 
  2037.    offset  On input, the location (non-inclusive) where the search for the 
  2038.            match is to begin.  An attribute record must exist at this location 
  2039.            or an error code will be flagged. On output, the location of the 
  2040.            found attribute record.  If none was found, then the parameter will 
  2041.            not be modified. 
  2042.    column  On input, the location where the search is to begin. On output, the 
  2043.            location of the found attribute record.  If none was found, then the 
  2044.            parameter will not be modified. 
  2045.    line    On input, the location where the search is to begin. On output, the 
  2046.            location of the found attribute record.  If none was found, then the 
  2047.            parameter will not be modified. 
  2048.    fileid  The fileid of the file where the search is to occur.  The default is 
  2049.            the current file. 
  2050.  
  2051. DELETE_ATTR_SUBOP Deletes the attribute record at the specified location.  If 
  2052.           attribute records exists at the specified character position having 
  2053.           an offset of the same sign as the specified attribute record but of 
  2054.           larger magnitude, then those attribute records will be shifted in 
  2055.           (their offset will be incremented or decremented) to fill in the 
  2056.           vacated location. 
  2057.  
  2058.    class   On input, this  is unused On output, the class of the deleted 
  2059.            attribute record.  Zero if no attribute record exists at the 
  2060.            specified location. 
  2061.    offset  The location of the attribute record to be deleted. 
  2062.    column  The location of the attribute record to be deleted. 
  2063.    line    The location of the attribute record to be deleted. 
  2064.    fileid  The fileid of the file where the specified attribute record is to be 
  2065.            found.  The default is the current file. 
  2066.  
  2067. See Attribute Pairs for additional information on attributes. 
  2068.  
  2069.  
  2070. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2071.  
  2072. class = 1         -- 1 = COLOR_CLASS
  2073. offst1 = -255
  2074. col = .col
  2075. line = .line
  2076. getfileid fileid
  2077. attribute_action 1, class, offst1, col, line, fileid -- 1=FIND NEXT ATTR
  2078. if class & col = .col & line = .line  then  -- Found one on this character.
  2079.    offst2 = offst1
  2080.    attribute_action 3, class, offst2, col, line, fileid -- 3=FIND MATCH ATTR
  2081.    if class then      -- Found a match; delete them both.
  2082.       attribute_action 16, class, offst1, .col, .line, fileid -- 16=DELETE ATTR
  2083.       attribute_action 16, class, offst2, col, line, fileid -- 16=DELETE ATTR
  2084.    endif
  2085. endif
  2086.  
  2087. This code checks for a color attribute on the current character.  If found, it 
  2088. checks for the matching attribute.  If both a Push and Pop exist, both are 
  2089. deleted. 
  2090.  
  2091.  
  2092. ΓòÉΓòÉΓòÉ 4.1.12. BACKTAB ΓòÉΓòÉΓòÉ
  2093.  
  2094. Choose: 
  2095.  
  2096. o Syntax 
  2097. o Definition 
  2098. o E Language Syntax 
  2099.  
  2100.  
  2101. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2102.  
  2103. BACKTAB 
  2104.  
  2105.  
  2106. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2107.  
  2108. Moves cursor to previous tab stop.  Like the standard Shift-Tab. 
  2109.  
  2110.  
  2111. ΓòÉΓòÉΓòÉ 4.1.13. BACKTABWORD ΓòÉΓòÉΓòÉ
  2112.  
  2113. Choose: 
  2114.  
  2115. o Syntax 
  2116. o Definition 
  2117. o E Language Syntax 
  2118.  
  2119.  
  2120. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2121.  
  2122. BACKTABWORD | BACKTAB_WORD 
  2123.  
  2124.  
  2125. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2126.  
  2127. Positions cursor on first character of previous word, like the standard 
  2128. Ctrl-Left. If there are no more previous words the cursor is positioned at 
  2129. beginning of line. 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ 4.1.14. BACKWARD ΓòÉΓòÉΓòÉ
  2133.  
  2134. Choose: 
  2135.  
  2136. o Syntax 
  2137. o Definition 
  2138. o E Language Syntax 
  2139.  
  2140.  
  2141. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2142.  
  2143. BACKWARD 
  2144.  
  2145.  
  2146. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2147.  
  2148. Same as page_up. 
  2149.  
  2150.  
  2151. ΓòÉΓòÉΓòÉ 4.1.15. BEEP([pitch [, duration] ]) ΓòÉΓòÉΓòÉ
  2152.  
  2153. Choose: 
  2154.  
  2155. o Syntax 
  2156. o Definition 
  2157. o Example 
  2158. o E Language Syntax 
  2159.  
  2160.  
  2161. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2162.  
  2163. BEEP( [ pitch [, duration] ] ) 
  2164.  
  2165.  
  2166. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2167.  
  2168. Sounds a beep defined by pitch (in Hertz) and duration (in milliseconds).  The 
  2169. default pitch is 900 and the defualt duration is 500. 
  2170.  
  2171.  
  2172. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2173.  
  2174.     BEEP(850,1000)
  2175.  
  2176. This example will produce a beep with a frequency of 850 Hertz for a duration 
  2177. of 1 second. 
  2178.  
  2179.  
  2180. ΓòÉΓòÉΓòÉ 4.1.16. BEGINLINE ΓòÉΓòÉΓòÉ
  2181.  
  2182. Choose: 
  2183.  
  2184. o Syntax 
  2185. o Definition 
  2186. o E Language Syntax 
  2187.  
  2188.  
  2189. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2190.  
  2191. BEGINLINE | BEGIN_LINE 
  2192.  
  2193.  
  2194. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2195.  
  2196. Moves cursor to beginning of current line, like the standard Home key. 
  2197.  
  2198.  
  2199. ΓòÉΓòÉΓòÉ 4.1.17. BINSEARCH( string [, fileid [, flags [, startcol]]]) ΓòÉΓòÉΓòÉ
  2200.  
  2201. New in EPM 6. 
  2202.  
  2203. Choose: 
  2204.  
  2205. o Syntax 
  2206. o Definition 
  2207. o E Language Syntax 
  2208.  
  2209.  
  2210. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2211.  
  2212. BINSEARCH( string [, fileid, [, flags [, start_col ]]] ) 
  2213.  
  2214.  
  2215. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2216.  
  2217. Performs a binary search in the current or specified file for the specified 
  2218. search_string.  Returns the line number on which a match was found, or 0 for 
  2219. failure.  The comparison starts at column start_col in the file (the default 
  2220. column is 1). The default value for flags is 0.  Possible values are any 
  2221. combination of: 
  2222.  
  2223. 1   Perform a case-insensitive comparison. 
  2224. 2   Compare only the first length(string) characters; don't require that the 
  2225.     entire line matches. 
  2226.  
  2227. Note:  The file to be searched must be sorted in the same way that the search 
  2228.        is being performed (case-sensitive or case-insensitive).
  2229.  
  2230.  
  2231. ΓòÉΓòÉΓòÉ 4.1.18. BOTTOM, BOT ΓòÉΓòÉΓòÉ
  2232.  
  2233. Choose: 
  2234.  
  2235. o Syntax 
  2236. o Definition 
  2237. o E Language Syntax 
  2238.  
  2239.  
  2240. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2241.  
  2242. BOTTOM | BOT 
  2243.  
  2244.  
  2245. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2246.  
  2247. Moves cursor to last line of file, like the standard Ctrl-End. 
  2248.  
  2249.  
  2250. ΓòÉΓòÉΓòÉ 4.1.19. BROWSE( 0 | 1 ) ΓòÉΓòÉΓòÉ
  2251.  
  2252. Choose: 
  2253.  
  2254. o Syntax 
  2255. o Definition 
  2256. o E Language Syntax 
  2257.  
  2258.  
  2259. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2260.  
  2261. BROWSE([0 | 1]) 
  2262.  
  2263.  
  2264. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2265.  
  2266. Turns browse mode on for the current file. Browse mode is a read-only mode. 0 
  2267. turns the browse mode off; 1 turns it on.  If no argument is given BROWSE 
  2268. returns the current mode. 
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ 4.1.20. BUFFER( subfunction_number, parameters... ) ΓòÉΓòÉΓòÉ
  2272.  
  2273. Choose: 
  2274.  
  2275. o Syntax 
  2276. o Definition 
  2277. o E Language Syntax 
  2278.  
  2279.  
  2280. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2281.  
  2282. BUFFER() 
  2283.  
  2284.  
  2285. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2286.  
  2287. Is for developers of advanced applications who want to share text with external 
  2288. processes.  It allows an E application to create a shared memory buffer of a 
  2289. specified name and copy text to it, so that other processes can open the buffer 
  2290. and read the text from E. (For those interested in OS/2 internals, the buffer 
  2291. creation calls DosAllocShrSeg().) 
  2292.  
  2293. The buffer function provides several subfunctions:  create a new buffer; open 
  2294. an existing buffer; free a buffer; get and put text; query the allocated and 
  2295. used size of a buffer.  You specify the subfunction you want with the first 
  2296. argument, one of: CREATEBUF, OPENBUF, FREEBUF, GETBUF, PUTBUF, MAXSIZEBUF, or 
  2297. USEDSIZEBUF. (These are only numeric constants from 0 to 6, as defined in 
  2298. STDCONST.E.)  The meaning of the remaining arguments to buffer() depends on the 
  2299. subfunction, as shown in the seven cases below. 
  2300.  
  2301. The maximum buffer size is 65535 bytes.  E uses the first 32 bytes of the 
  2302. buffer for status information: 
  2303.  
  2304.    2 bytes:  bufsize available for text,
  2305.                    without the header
  2306.    2 bytes:  amount of buffer filled, <= bufsize
  2307.    2 bytes:  format (explained below)
  2308.    2 bytes:  number of lines if known
  2309.                    (E fills this in on a PUT)
  2310.   26 bytes:  reserved for anything
  2311.                    the application might want.
  2312. Thus the maximum space available for text is 65535-32 = 65503 bytes. 
  2313.  
  2314. bufhndl = buffer( CREATEBUF, name [,size [,private]])
  2315.  
  2316. CREATEBUF allocates a shared memory segment of name "\SHAREMEM\name". The 
  2317. prefix "\SHAREMEM\" is automatic and shouldn't be supplied. The size 
  2318. specification is optional.  If it's zero or omitted, it defaults to the maximum 
  2319. size of 65503. 
  2320.  
  2321. A last optional argument, private, can be supplied with a nonzero value if you 
  2322. do not want want the buffer to be shared by other processes.  You might wish to 
  2323. create a memory buffer for use by your application only, in which case you 
  2324. should specify private to avoid using one of the limited number of OS/2 shared 
  2325. buffers.  (Technically, a private buffer is created with DosAllocSeg() rather 
  2326. than DosAllocShrSeg().) 
  2327.  
  2328. The return value from CREATEBUF is a handle or ID, to be used by the other 
  2329. subfunctions.  (Actually the handle is the buffer segment selector, in string 
  2330. form like that returned by seg(), ready for use by peek and poke.)  A return 
  2331. value of 0 means an error; RC will contain the error code given by OS/2. 
  2332.  
  2333. bufhndl = buffer( OPENBUF, name)
  2334.  
  2335. OPENBUF shares a buffer created by another process.  Again, bufhndl is 
  2336. returned; zero means a system error is returned in RC.  It is expected that the 
  2337. other process has put the format and size into the first 2 words of the buffer, 
  2338. and starts the data at offset 32. 
  2339.  
  2340. success = buffer( FREEBUF, bufhndl)
  2341.  
  2342. FREEBUF frees the buffer.  It's not required if you're exiting from E, but 
  2343. recommended.  The return value is zero if an error occurred, for consistency; 
  2344. zero means an error for all these subfunctions. 
  2345.  
  2346. noflines= buffer( GETBUF, bufhndl)
  2347.  
  2348. GETBUF loads all of a buffer into the current file at the current location, in 
  2349. the same manner as a GET command.  You have no control over the number of 
  2350. lines; normally you'll do the GETBUF into a new empty file.  The return value 
  2351. is the number of lines transferred. A zero value along with a zero RC means the 
  2352. buffer was empty. (Note:  RC is automatically zeroed at the start of any 
  2353. buffer() function.) 
  2354.  
  2355. noflines= buffer( PUTBUF, bufhndl, startline
  2356.           [,endline [,format]])
  2357.  
  2358. PUTBUF copies the current file's text from startline through endline. If 
  2359. endline is omitted, or specified as zero or a huge value, as many whole lines 
  2360. are copied as will fit, stopping at the end of file of course. The return value 
  2361. is the number of lines transferred. 
  2362.  
  2363. size    = buffer( MAXSIZEBUF, bufhndl)
  2364.  
  2365. MAXSIZEBUF returns the buffer capacity, in case some other process created it 
  2366. and you don't know its size.  (This subfunction gives the same value as 
  2367. peek(bufhndl,0,2).) 
  2368.  
  2369. size    = buffer( USEDSIZEBUF, bufhndl)
  2370.  
  2371. USEDSIZEBUF returns the size of data in the buffer. (This gives the same value 
  2372. as peek(bufhndl,2,2).) 
  2373.  
  2374. The format word in the header determines how the lines are formatted. It's a 
  2375. bit string so you can mix and match options: 
  2376.  
  2377. APPENDCR     1   append ASCII 13 after each line
  2378. APPENDLF     2   append ASCII 10 after the CR if any
  2379. APPENDNULL   4   append ASCII  0 after the CR-LF if any
  2380. TABCOMPRESS  8   tab-compress the line
  2381. STRIPSPACES 16   remove trailing spaces as usual in a save
  2382. FINALNULL   32   append a null at end of the buffer
  2383. The default format if unspecified is 19, for CR-LF and remove trailing spaces. 
  2384.  
  2385. Note:  The format is ignored on a GET.  E handles whatever characters it finds, 
  2386. in the same manner as loading a disk file.  CR-LF's are dropped, tabs are 
  2387. expanded. 
  2388.  
  2389. Note 2:  if an external process fills a buffer, it should make sure that the 
  2390. last line is properly terminated with the appropriate end-of-line.  E will 
  2391. double-check for this to protect against overrunning the end of the buffer.  E 
  2392. will deposit an end-of-line if needed and restore whatever character was there, 
  2393. but this might not be what the other process expected. 
  2394.  
  2395. For sample usages, see the file BUFF.E. 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ 4.1.21. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  2399.  
  2400. Choose: 
  2401.  
  2402. o Syntax 
  2403. o Definition 
  2404. o E Language Syntax 
  2405.  
  2406.  
  2407. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2408.  
  2409. BUILDACCELTABLE table_name, command, accel_flags, key, index 
  2410.  
  2411.  
  2412. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2413.  
  2414. Adds an entry to an accelerator table. 'tablename' is the name of the 
  2415. accelerator table being built (and is later passed as a parameter to the 
  2416. activateacceltable statement), 'command' is the command to be executed when the 
  2417. accelerator key is pressed, accel_flags is the sum of some AF_ constants from 
  2418. STDCONST.E, 'key' is as ASCII value for AF_CHAR, a VK_ constant for 
  2419. AF_VIRTUALKEY, etc., and 'index' is a unique index number for that table.  You 
  2420. can reuse an index value to replace an entry in the accelerator table. 
  2421.  
  2422. Note:  Index values must be unique in both the current accelerator table and 
  2423. the current action bar. 
  2424.  
  2425. Some of the VK_ constants are defined in STDCONST.E; the full set can be found 
  2426. in PMWIN.H in the OS/2 toolkit. 
  2427.  
  2428. See also: 
  2429.  
  2430. o Building Accelerator Tables from the Macro Language 
  2431. o ACTIVATEACCELTABLE 
  2432. o DELETEACCEL 
  2433. o QUERYACCELSTRING 
  2434.  
  2435.  
  2436. ΓòÉΓòÉΓòÉ 4.1.22. BUILDMENUITEM ΓòÉΓòÉΓòÉ
  2437.  
  2438. Choose: 
  2439.  
  2440. o Syntax 
  2441. o Definition 
  2442. o E Language Syntax 
  2443.  
  2444.  
  2445. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2446.  
  2447. BUILDMENUITEM 
  2448.  
  2449.  
  2450. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2451.  
  2452. Is used to build entries on the action bar menu. See Building Menus from the 
  2453. Macro Language for more information on the BUILDMENUITEM statement. 
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ 4.1.23. BUILDSUBMENU ΓòÉΓòÉΓòÉ
  2457.  
  2458. Choose: 
  2459.  
  2460. o Syntax 
  2461. o Definition 
  2462. o E Language Syntax 
  2463.  
  2464.  
  2465. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2466.  
  2467. BUILDSUBMENU 
  2468.  
  2469.  
  2470. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2471.  
  2472. Is used to build sub menu entries on the action bar menu. 
  2473.  
  2474.  
  2475. ΓòÉΓòÉΓòÉ 4.1.24. CALL  procedurename() ΓòÉΓòÉΓòÉ
  2476.  
  2477. Choose: 
  2478.  
  2479. o Syntax 
  2480. o Definition 
  2481. o E Language Syntax 
  2482.  
  2483.  
  2484. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2485.  
  2486. CALL  procedurename 
  2487.  
  2488.  
  2489. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2490.  
  2491. Throws away the result of the procedure call. You could substitute any 
  2492. expression for procedurename, e.g. call 2*2, but typically it will be a 
  2493. procedure call such as "call machine()". 
  2494.  
  2495. Throwing away the result of a procedure call is often necessary because 
  2496. otherwise the result is executed.  If a procedure returns 0, the valid command 
  2497. '0' is executed which takes the cursor to the "Top of File" header (line 0). 
  2498.  
  2499. Generally is always advisable to use the call statement unless the returned 
  2500. value is used in some manner. 
  2501.  
  2502.  
  2503. ΓòÉΓòÉΓòÉ 4.1.25. CENTER(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2504.  
  2505. Choose: 
  2506.  
  2507. o Syntax 
  2508. o Definition 
  2509. o Example 
  2510. o E Language Syntax 
  2511.  
  2512.  
  2513. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2514.  
  2515. CENTER( string, length [, pad] ) 
  2516.  
  2517.  
  2518. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2519.  
  2520. Returns a string of length length with string centered in it, with pad 
  2521. characters added as necessary to make up length. The default pad character is a 
  2522. space. If the string is longer than length, it will be truncated at both ends 
  2523. to fit. If an odd number of characters are truncated or added, the right hand 
  2524. end loses or gains one more character than the left hand end. 
  2525.  
  2526.  
  2527. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2528.  
  2529. Here are some examples: 
  2530.  
  2531.  CENTER(abc,7)               ->    '  ABC  '
  2532.  CENTER(abc,8,'-')           ->    '--ABC---'
  2533.  CENTRE('The blue sky',8)    ->    'e blue s'
  2534.  CENTRE('The blue sky',7)    ->    'e blue '
  2535.  
  2536.  
  2537. ΓòÉΓòÉΓòÉ 4.1.26. CENTRE(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2538.  
  2539. Choose: 
  2540.  
  2541. o Syntax 
  2542. o Definition 
  2543. o Example 
  2544. o E Language Syntax 
  2545.  
  2546.  
  2547. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2548.  
  2549. CENTRE( string, length [, pad] ) 
  2550.  
  2551.  
  2552. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2553.  
  2554. (same as CENTER) 
  2555.  
  2556.  
  2557. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2558.  
  2559. (same as CENTER) 
  2560.  
  2561.  
  2562. ΓòÉΓòÉΓòÉ 4.1.27. CHR(numeric_expression) ΓòÉΓòÉΓòÉ
  2563.  
  2564. Choose: 
  2565.  
  2566. o Syntax 
  2567. o Definition 
  2568. o Example 
  2569. o E Language Syntax 
  2570.  
  2571.  
  2572. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2573.  
  2574. CHR( value ) 
  2575.  
  2576.  
  2577. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2578.  
  2579. Is the inverse of ASC(), CHR() returns the character corresponding to the ASCII 
  2580. value. 
  2581.  
  2582.  
  2583. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2584.  
  2585. For example, 
  2586.  
  2587. CHR( ASC('A') ) = 'A'
  2588. CHR(65)='A'
  2589.  
  2590.  
  2591. ΓòÉΓòÉΓòÉ 4.1.28. CIRCLEIT ΓòÉΓòÉΓòÉ
  2592.  
  2593. Choose: 
  2594.  
  2595. o Syntax 
  2596. o Definition 
  2597. o E Language Syntax 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2601.  
  2602. CIRCLEIT style, line, col1, col2, attribute1, attribute2 
  2603.  
  2604.  
  2605. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2606.  
  2607. Draws a circle on the screen for highlighting a section of text. The circle 
  2608. goes away when the screen is refreshed.  'line' is the line number of the file 
  2609. to be highlighted, and col1 and col2 are the first and last columns.  There are 
  2610. five styles of circle; only the first two are available to EPM 5.51. 
  2611.  
  2612.  1. a perfect circle or oval. 
  2613.  
  2614.  2. a rougher version with the ends crossing rather than meeting, and drawn 
  2615.     using 2 different colors. 
  2616.  
  2617.  3. a wider version of (1). 
  2618.  
  2619.  4. a wider version of (2). 
  2620.  
  2621.  5. a perfect, solid (filled-in) circle or oval. 
  2622.  
  2623. In EPM 5.51, the highlighting is added by XORing onto the screen, so the color 
  2624. displayed is a function of the screen background color and can not be directly 
  2625. controlled.  ('Attribute' is currently unused.)  The two styles use different 
  2626. XOR masks. 
  2627.  
  2628. In EPM 6, the color of the highlighting is specified by attribute1 (and by 
  2629. attribute2 for the styles which use 2 colors).  The value for each can either 
  2630. be a number 0 to 15, corresponding to one of the foreground colors defined in 
  2631. COLORS.E, or it can be an XOR mask (indicated by adding 16,777,216 to the value 
  2632. of the desired mask).  An XOR mask is generally preferable, since the color 
  2633. will automatically be adjusted according to the background - a specific color 
  2634. might not show up if the background or mark color is the same color.  The 
  2635. values corresponding to the built-in defaults of EPM 5.51 are 16777220 for 
  2636. attribute1 and 16777218 for attribute2. 
  2637.  
  2638.  
  2639. ΓòÉΓòÉΓòÉ 4.1.29. COMPARE(string1, string2 [, pad] ) ΓòÉΓòÉΓòÉ
  2640.  
  2641. Choose: 
  2642.  
  2643. o Syntax 
  2644. o Definition 
  2645. o Example 
  2646. o E Language Syntax 
  2647.  
  2648.  
  2649. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2650.  
  2651. COMPARE( string1, string2 [, pad] ) 
  2652.  
  2653.  
  2654. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2655.  
  2656. Returns 0 if the strings, string1 and string2, are identical. If they are not, 
  2657. the returned number is non-zero and is the position of the first character that 
  2658. does not match. The shorter string is padded on the right with pad if 
  2659. necessary. The default pad character is a space. 
  2660.  
  2661.  
  2662. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2663.  
  2664. Here are some examples: 
  2665.  
  2666.  COMPARE('abc','abc')         ->    0
  2667.  COMPARE('abc','ak')          ->    2
  2668.  COMPARE('ab ','ab')          ->    0
  2669.  COMPARE('ab ','ab',' ')      ->    0
  2670.  COMPARE('ab ','ab','x')      ->    3
  2671.  COMPARE('ab-- ','ab','-')    ->    5
  2672.  
  2673.  
  2674. ΓòÉΓòÉΓòÉ 4.1.30. COPIES(string, n) ΓòÉΓòÉΓòÉ
  2675.  
  2676. Choose: 
  2677.  
  2678. o Syntax 
  2679. o Definition 
  2680. o Example 
  2681. o E Language Syntax 
  2682.  
  2683.  
  2684. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2685.  
  2686. COPIES( string, n ) 
  2687.  
  2688.  
  2689. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2690.  
  2691. Returns n concatenated copies of string. n must be positive or 0. 
  2692.  
  2693.  
  2694. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2695.  
  2696. Examples: 
  2697.  
  2698.     COPIES('abc',3)      ->    'abcabcabc'
  2699.     COPIES('abc',0)      ->    ''
  2700.  
  2701.  
  2702. ΓòÉΓòÉΓòÉ 4.1.31. COPYMARK ΓòÉΓòÉΓòÉ
  2703.  
  2704. Choose: 
  2705.  
  2706. o Syntax 
  2707. o Definition 
  2708. o E Language Syntax 
  2709.  
  2710.  
  2711. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2712.  
  2713. COPYMARK | COPY_MARK 
  2714.  
  2715.  
  2716. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2717.  
  2718. Copies marked text to cursor position, like standard Alt-C. 
  2719.  
  2720.  
  2721. ΓòÉΓòÉΓòÉ 4.1.32. COUNT(string1, string2) ΓòÉΓòÉΓòÉ
  2722.  
  2723. Choose: 
  2724.  
  2725. o Syntax 
  2726. o Definition 
  2727. o Definition 
  2728. o E Language Syntax 
  2729.  
  2730.  
  2731. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2732.  
  2733. COUNT( string1, string2 ) 
  2734.  
  2735.  
  2736. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2737.  
  2738. Returns the number of occurrances of string1 that appear in string2. 
  2739.  
  2740. Note:  This procedure is only available in EPM 5.60 or above.
  2741.  
  2742.  
  2743. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2744.  
  2745.  COUNT('abc','abcdef')     == 1
  2746.  COUNT('abc','abcabc')     == 2
  2747.  COUNT('abc','abxc')       == 0
  2748.  COUNT('xx ','xxx')        == 2
  2749.  
  2750.  
  2751. ΓòÉΓòÉΓòÉ 4.1.33. CURSOR_DIMENSIONS ΓòÉΓòÉΓòÉ
  2752.  
  2753. Choose: 
  2754.  
  2755. o Syntax 
  2756. o Definition 
  2757. o E Language Syntax 
  2758.  
  2759.  
  2760. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2761.  
  2762. CURSOR_DIMENSIONS cursorw, cursorh 
  2763.  
  2764.  
  2765. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2766.  
  2767. Queries or sets the cursor dimensions. 'cursorw' and 'cursorh' must be 
  2768. variables. If their values are question marks, they will be changed to reflect 
  2769. the current dimensions. If their values are numbers, this will set the size of 
  2770. the text cursor. A positive number represents that number of pixels; a negative 
  2771. number represents a proportional value of the size of the current character. 
  2772. The absolute value of that number is used as the number of 128ths of the height 
  2773. or width of the current character that the cursor should be drawn. 
  2774.  
  2775.  
  2776. ΓòÉΓòÉΓòÉ 4.1.34. C2X(string) ΓòÉΓòÉΓòÉ
  2777.  
  2778. Choose: 
  2779.  
  2780. o Syntax 
  2781. o Definition 
  2782. o Definition 
  2783. o E Language Syntax 
  2784.  
  2785.  
  2786. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2787.  
  2788. C2X( string ) 
  2789.  
  2790.  
  2791. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2792.  
  2793. Returns a printable hexadecimal representation of the binary string string. 
  2794.  
  2795.  
  2796. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2797.  
  2798.  C2X('abc123')       == '616263313233'
  2799.  C2X( \15' '\240 )   == '0f20f0'
  2800.  C2X( atoi(255) )    == 'ff00'
  2801.  
  2802.  
  2803. ΓòÉΓòÉΓòÉ 4.1.35. DELETE ΓòÉΓòÉΓòÉ
  2804.  
  2805. Choose: 
  2806.  
  2807. o Syntax 
  2808. o Definition 
  2809. o E Language Syntax 
  2810.  
  2811.  
  2812. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2813.  
  2814. DELETE 
  2815.  
  2816.  
  2817. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2818.  
  2819. Deletes the line the cursor is located on. Note that the statement DELETELINE 
  2820. allows parameters, but DELETE does not. 
  2821.  
  2822. Note:  Previously, DELETE_LINE was a synonym for DELETE. This was dropped 
  2823.        because it was felt that it was too confusing to have two statements, 
  2824.        DELETE_LINE and DELETELINE, with different behaviors.
  2825.  
  2826.  
  2827. ΓòÉΓòÉΓòÉ 4.1.36. DELETEACCEL ΓòÉΓòÉΓòÉ
  2828.  
  2829. Choose: 
  2830.  
  2831. o Syntax 
  2832. o Definition 
  2833. o E Language Syntax 
  2834.  
  2835.  
  2836. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2837.  
  2838. DELETEACCEL tablename 
  2839.  
  2840.  
  2841. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2842.  
  2843. Deletes the named accelerator table. 
  2844.  
  2845. See also: 
  2846.  
  2847. o Building Accelerator Tables from the Macro Language 
  2848. o ACTIVATEACCELTABLE 
  2849. o BUILDACCELTABLE 
  2850. o QUERYACCELSTRING 
  2851.  
  2852.  
  2853. ΓòÉΓòÉΓòÉ 4.1.37. DELETECHAR ΓòÉΓòÉΓòÉ
  2854.  
  2855. Choose: 
  2856.  
  2857. o Syntax 
  2858. o Definition 
  2859. o E Language Syntax 
  2860.  
  2861.  
  2862. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2863.  
  2864. DELETECHAR | DELETE_CHAR 
  2865.  
  2866.  
  2867. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2868.  
  2869. Deletes character under cursor, like standard Del. 
  2870.  
  2871.  
  2872. ΓòÉΓòÉΓòÉ 4.1.38. DELETELINE  [line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  2873.  
  2874. Choose: 
  2875.  
  2876. o Syntax 
  2877. o Definition 
  2878. o E Language Syntax 
  2879.  
  2880.  
  2881. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2882.  
  2883. DELETELINE  line_number [, {;}  fileid] 
  2884.  
  2885.  
  2886. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2887.  
  2888. Deletes a specified line from a specified file. Defaulted values for omitted 
  2889. parameters are line_number = current line, and fileid = current file. 
  2890.  
  2891. This is NOT the same as DELETE_LINE: see the clarification above, under DELETE. 
  2892.  
  2893.  
  2894. ΓòÉΓòÉΓòÉ 4.1.39. DELETEMARK ΓòÉΓòÉΓòÉ
  2895.  
  2896. Choose: 
  2897.  
  2898. o Syntax 
  2899. o Definition 
  2900. o E Language Syntax 
  2901.  
  2902.  
  2903. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2904.  
  2905. DELETEMARK | DELETE_MARK 
  2906.  
  2907.  
  2908. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2909.  
  2910. Deletes marked text, like standard Alt-D. 
  2911.  
  2912.  
  2913. ΓòÉΓòÉΓòÉ 4.1.40. DELETEMENU ΓòÉΓòÉΓòÉ
  2914.  
  2915. Choose: 
  2916.  
  2917. o Syntax 
  2918. o Definition 
  2919. o E Language Syntax 
  2920.  
  2921.  
  2922. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2923.  
  2924. DELETEMENU (stmt) 
  2925.  
  2926.  
  2927. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2928.  
  2929. Deletes a menu option or submenu option from the action bar. For more 
  2930. information on DELETEMENU see Building Menus from the Macro Language. 
  2931.  
  2932.  
  2933. ΓòÉΓòÉΓòÉ 4.1.41. DELSTR(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2934.  
  2935. Choose: 
  2936.  
  2937. o Syntax 
  2938. o Definition 
  2939. o Example 
  2940. o E Language Syntax 
  2941.  
  2942.  
  2943. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2944.  
  2945. DELSTR( string, n [, length] ) 
  2946.  
  2947.  
  2948. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2949.  
  2950. Deletes the substring of string that begins at the nth character, and is of 
  2951. length length, and returns the result. If length is not specified, the rest of 
  2952. string is deleted. If n is greater than the length of string, the string is 
  2953. returned unchanged. n must be positive. 
  2954.  
  2955.  
  2956. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2957.  
  2958. Here are some examples: 
  2959.  
  2960.  DELSTR('abcd',3)       ->    'ab'
  2961.  DELSTR('abcde',3,2)    ->    'abe'
  2962.  DELSTR('abcde',6)      ->    'abcde'
  2963.  
  2964.  
  2965. ΓòÉΓòÉΓòÉ 4.1.42. DELWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2966.  
  2967. Choose: 
  2968.  
  2969. o Syntax 
  2970. o Definition 
  2971. o Example 
  2972. o E Language Syntax 
  2973.  
  2974.  
  2975. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2976.  
  2977. DELWORD( string, n [,  length] ) 
  2978.  
  2979.  
  2980. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2981.  
  2982. Deletes the substring of string that begins at the nth word, and is of length 
  2983. length blank-delimited words, and returns the result. If length is not 
  2984. specified, the rest of string is deleted. n must be positive. If n is greater 
  2985. than the number of words in string, the string is returned unchanged. The 
  2986. string deleted includes any blanks following the final word involved. 
  2987.  
  2988.  
  2989. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2990.  
  2991. Here are some examples: 
  2992.  
  2993.  DELWORD('Now is the  time',2,2)  ->  'Now time'
  2994.  DELWORD('Now is the time ',3)    ->  'Now is '
  2995.  DELWORD('Now is the  time',5)    ->  'Now is the  time'
  2996.  
  2997.  
  2998. ΓòÉΓòÉΓòÉ 4.1.43. DIRECTORY([path]) ΓòÉΓòÉΓòÉ
  2999.  
  3000. Choose: 
  3001.  
  3002. o Syntax 
  3003. o Definition 
  3004. o Example 
  3005. o E Language Syntax 
  3006.  
  3007.  
  3008. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3009.  
  3010. DIRECTORY( [string_expression] ) 
  3011.  
  3012.  
  3013. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3014.  
  3015. Returns current directory. If path parameter is given, the current drive and 
  3016. path are changed accordingly. 
  3017.  
  3018. Note:  The drive and path are changed before the current directory is returned. 
  3019.  
  3020.  
  3021. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3022.  
  3023. This provides a way of verifying that a user-supplied path is valid. 
  3024.  
  3025. current_dir = directory()                                -- Save current
  3026. if upcase(directory(user_dir)) <> upcase(user_dir) then  -- Try user's
  3027.    sayerror 'Directory 'user_dir' is invalid.'           -- Warn
  3028. endif
  3029. call directory(current_dir)                              -- Restore
  3030.  
  3031.  
  3032. ΓòÉΓòÉΓòÉ 4.1.44. DISPLAY  '-4' | '-2' | '-1' | '1' | '2' | '4' ΓòÉΓòÉΓòÉ
  3033.  
  3034. Choose: 
  3035.  
  3036. o Syntax 
  3037. o Definition 
  3038. o Example 
  3039. o E Language Syntax 
  3040.  
  3041.  
  3042. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3043.  
  3044. DISPLAY -4|-2|-1|1|2|4 
  3045.  
  3046.  
  3047. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3048.  
  3049. Allows screen updates to be turned off (-1) or on (1); non-critical messages to 
  3050. be turned off (-2) or on (2); and errors to be forced to the message box (-4) 
  3051. or to the default messageline (4). 
  3052.  
  3053. These numbers can be combined. (DISPLAY -3 would turn off the screen updates 
  3054. and the error messages.) 
  3055.  
  3056. DISPLAY -1 prevents the screen from begin updated until a DISPLAY 1 statement 
  3057. is issued. This can eliminate files being flashed on the screen briefly while 
  3058. an application loads and manipulates files. 
  3059.  
  3060. When a DISPLAY 4 is in effect, all messages (unless explicitly sent to a dialog 
  3061. box) will be sent to: 
  3062.  
  3063.  1. first to the message line, unless toggled off; 
  3064.  2. next to the status line, unless toggled off; 
  3065.  3. or else overwrites the first line of text temporarily. 
  3066.  
  3067.  
  3068. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3069.  
  3070. An sample usage of DISPLAY is: 
  3071.  
  3072.   display -3            -- turn off display updates
  3073.   getfileid startfid    --      and error messages
  3074.   'xcom e profile.xxx'  -- load the profile
  3075.   getfileid profile_fid --      won't show on screen
  3076.   .visible = 0          -- make a hidden file
  3077.   'xcom 1 /define'      -- if not found, no error message
  3078.   activatefile startfid -- activate the file
  3079.   display 3             -- turn updates & messages on
  3080.  
  3081. In this example the user would see no screen flashing or "Not found" error 
  3082. message. 
  3083.  
  3084.  
  3085. ΓòÉΓòÉΓòÉ 4.1.45. DO ΓòÉΓòÉΓòÉ
  3086.  
  3087. Choose: 
  3088.  
  3089. o Syntax 
  3090. o Definition 
  3091. o E Language Syntax 
  3092.  
  3093.  
  3094. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3095.  
  3096. Is described in the section Conditional and Loop Statements. 
  3097.  
  3098.  
  3099. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3100.  
  3101. Is described in the section Conditional and Loop Statements. 
  3102.  
  3103.  
  3104. ΓòÉΓòÉΓòÉ 4.1.46. DO_ARRAY ΓòÉΓòÉΓòÉ
  3105.  
  3106. Choose: 
  3107.  
  3108. o Syntax 
  3109. o Definition 
  3110. o E Language Syntax 
  3111.  
  3112.  
  3113. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3114.  
  3115. DO_ARRAY 
  3116.  
  3117.  
  3118. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3119.  
  3120. Handles arrays in E. The DO_ARRAY statement can create an array, add to the 
  3121. array, and lookup information from the array. The syntax for these functions 
  3122. is: 
  3123.  
  3124. do_array 1, array_id, arrayname 
  3125.                                    Creates an array of arrayname and returns 
  3126.                                    the array_id in the variable array_id. 
  3127. do_array 2, array_id, index, value 
  3128.                                    Adds the value to the array under the index 
  3129.                                    in the array denoted by array_id. 
  3130. do_array 3, array_id, index, result 
  3131.                                    Looks up the contents of the index entry of 
  3132.                                    the array specified by array_id and places 
  3133.                                    the value into result.  If the index is not 
  3134.                                    found, an error message is given (Invalid 
  3135.                                    third parameter), the return code is set to 
  3136.                                    -330, and the result variable is set to the 
  3137.                                    null string. 
  3138. do_array 4, array_id, index 
  3139.                                    This will delete an entry specified, by 
  3140.                                    INDEX, from the array. 
  3141. do_array 6, array_id, array_name 
  3142.                                    Returns the array_id associated with the 
  3143.                                    array name specified by array_name 
  3144. do_array 7, array_id, index, result 
  3145.                                    (32-bit EPM only.)  Looks up the contents of 
  3146.                                    the index entry of the array specified by 
  3147.                                    array_id and places the value into result. 
  3148.                                    If the index is not found, the value of the 
  3149.                                    array's .userstring is returned, and no 
  3150.                                    error message is given, nor is the return 
  3151.                                    code set. 
  3152.  
  3153. See Arrays in EPM for more information on arrays and the DO_ARRAY statement. 
  3154.  
  3155.  
  3156. ΓòÉΓòÉΓòÉ 4.1.47. DO_OVERLAYWINDOWS ΓòÉΓòÉΓòÉ
  3157.  
  3158. Choose: 
  3159.  
  3160. o Syntax 
  3161. o Definition 
  3162. o E Language Syntax 
  3163.  
  3164.  
  3165. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3166.  
  3167. DO_OVERLAYWINDOWS 
  3168.  
  3169.  
  3170. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3171.  
  3172. Provides various functions for the manipulation of graphics within a document. 
  3173. Further information on graphics within EPM and the E Toolkit will be made 
  3174. available. 
  3175.  
  3176.  
  3177. ΓòÉΓòÉΓòÉ 4.1.48. DOWN ΓòÉΓòÉΓòÉ
  3178.  
  3179. Choose: 
  3180.  
  3181. o Syntax 
  3182. o Definition 
  3183. o E Language Syntax 
  3184.  
  3185.  
  3186. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3187.  
  3188. DOWN 
  3189.  
  3190.  
  3191. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3192.  
  3193. Moves the cursor down 1 line, like the standard Down key. 
  3194.  
  3195.  
  3196. ΓòÉΓòÉΓòÉ 4.1.49. DYNAFREE(library_name) ΓòÉΓòÉΓòÉ
  3197.  
  3198. Choose: 
  3199.  
  3200. o Syntax 
  3201. o Definition 
  3202. o E Language Syntax 
  3203.  
  3204.  
  3205. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3206.  
  3207. DYNAFREE( number ) 
  3208.  
  3209.  
  3210. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3211.  
  3212. Releases a dynalink library that has been previously called using the dynalink 
  3213. statment. Also see the DYNALINK and DYNALINKC statements for more information. 
  3214.  
  3215.  
  3216. ΓòÉΓòÉΓòÉ 4.1.50. DYNALINK(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3217.  
  3218. Choose: 
  3219.  
  3220. o Syntax 
  3221. o Definition 
  3222. o Example 
  3223. o E Language Syntax 
  3224.  
  3225.  
  3226. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3227.  
  3228. DYNALINK( library_name, function_name, parameter_stack [, 
  3229. number_of_return_words ]) 
  3230.  
  3231.  
  3232. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3233.  
  3234. Provides an interface between an E language program and external functions 
  3235. stored in a dynamic link library. The operating system functions are 
  3236. implemented via dynamic linking, and therefore DYNALINK() provides you with the 
  3237. full power of the operating system calls such as DosDelete, DosQFileMode, 
  3238. DosDevIOCtl, and video input/output calls such as VioWrtTty, VioWrtCharStrAtt, 
  3239. and much more. DYNALINK() allows you to call any dynamic link library that 
  3240. exists (files with a .DLL extension). Since application writers can develop 
  3241. general purpose dynamic link libraries, E programs can call functions written 
  3242. in other languages. For example, let us say that the "C" library functions are 
  3243. available via a dynamic link library, then we may call the library functions 
  3244. from an E program; or suppose that a spell checking dynamic link library 
  3245. exists, DYNALINK() allows you to use the spell checking. 
  3246.  
  3247. This procedure is the protect-mode equivalent of the INT86X() function of E3. 
  3248. For more information on the system functions or dynamic link libraries, please 
  3249. refer to The OS/2 Technical Reference. 
  3250.  
  3251. In order to make a system call, you must provide the following parameters to 
  3252. dynalink(): 
  3253.  
  3254. library_name             the name of the dynalink library (e.g. file 
  3255.                          library_name.DLL) which contains the function you wish 
  3256.                          to call. 
  3257.  
  3258. function_name             this is a string containing the function name in most 
  3259.                          cases. However if you are making calls to some DOS 
  3260.                          functions (DOS functions being those whose names begin 
  3261.                          with 'Dos') that are contained within the DOSCALLS.DLL 
  3262.                          library, the function name is actually the ordinal 
  3263.                          value of the DOS function, preceded by a '#'. These 
  3264.                          numbers can be found in Ordinal Values of Functions 
  3265.                          Accessed via DOSCALLS.DLL. 
  3266.  
  3267. parameter_stack          a string consisting of all of the parameters expected 
  3268.                          by the function, concatenated together into one 
  3269.                          string. Those parameters that the function requires to 
  3270.                          be pushed on the parameter stack first should appear 
  3271.                          first when concatenating. Parameter information is 
  3272.                          dependent upon the function to be called, and can be 
  3273.                          found in The OS/2 Technical Reference. 
  3274.  
  3275. number_of_return_words   an optional parameter that allows one to set the size 
  3276.                          of the return code variable that the system should 
  3277.                          expect to receive from the dynamic link function. This 
  3278.                          parameter is provided for those dynalink library 
  3279.                          functions whose return code is a long int rather than 
  3280.                          simply an int. If the user simply uses DYNALINK() for 
  3281.                          system calls to DOS and OS/2 functions, this parameter 
  3282.                          need never be specified. The default value is 1. 
  3283.  
  3284.  
  3285. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3286.  
  3287. The numeric parameters passed by the E program must be converted from string 
  3288. form to the proper C data type via E functions like ATOI(), ATOL(), SELECTOR(), 
  3289. and OFFSET(), as shown below: 
  3290.  
  3291. defc hello =
  3292. string = 'hello'
  3293. result = dynalink( 'VIOCALLS',       /* library name   */
  3294.                    'VIOWRTTTY',      /* function name  */
  3295.                    selector(string) ||    /* address of */
  3296.                    offset(string) ||      /*   string   */
  3297.                    atoi(length(string)) ||/* length     */
  3298.                    atoi(0) )         /* vio handle     */
  3299.  
  3300. defc curdir2 =
  3301. /* create empty strings for DosQCurDir() to fill */
  3302. string = atoi(80) || substr('',1,80)
  3303. stringlen_b = substr('',1,2)
  3304. result = dynalink( 'DOSCALLS',  /* library name */
  3305.                    '#71',       /* ordinal of DosQCurDir */
  3306.                    atoi(0) ||          /* drive number    */
  3307.                    selector(string) || /* address of      */
  3308.                    offset(string) ||   /*  DirPath buffer */
  3309.                    selector(stringlen_b) || /* address of */
  3310.                    offset(stringlen_b) )   /* buf length */
  3311. stringlen = itoa(stringlen_b,10);
  3312. sayerror 'The current directory is "' ||
  3313.          substr(string,1,stringlen) || '".'
  3314.  
  3315. defc beep =
  3316. result = dynalink( 'DOSCALLS',  /* library name          */
  3317.                    '#50',       /* ordinal of Dos Beep() */
  3318.                    atoi(3000) ||  /* frequency of beep    */
  3319.                    atoi(1000) )  /* duration of beep     */
  3320.  
  3321. defc clear_semaphore =
  3322. result = dynalink( 'DOSCALL1',    /* library name     */
  3323.                    'DOSSEMCLEAR', /* function name    */
  3324.                    atol(handle) ) /* semaphore handle */
  3325.  
  3326.  
  3327. ΓòÉΓòÉΓòÉ 4.1.51. DYNALINKC(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3328.  
  3329. Choose: 
  3330.  
  3331. o Syntax 
  3332. o Definition 
  3333. o E Language Syntax 
  3334.  
  3335.  
  3336. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3337.  
  3338. DYNALINKC( library_name, function_name, parameter_stack [, 
  3339. number_of_return_words ]) 
  3340.  
  3341.  
  3342. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3343.  
  3344. Is used to load and pass information to a dynalink library. It is like the 
  3345. DYNALINK() procedure except that it passes its parameters using the C language 
  3346. parameter passing convention rather than the Pascal convention. See the file 
  3347. DYNATEST.E for examples of the use of DYNALINKC(). Also see DYNAFREE() for 
  3348. information about releasing a dynalink library and DYNALINK() for information 
  3349. about calling a dynalink library procedure using standard Pascal parameter 
  3350. passing conventions. 
  3351.  
  3352.  
  3353. ΓòÉΓòÉΓòÉ 4.1.52. DYNALINK32(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3354.  
  3355. Choose: 
  3356.  
  3357. o Syntax 
  3358. o Definition 
  3359. o E Language Syntax 
  3360.  
  3361.  
  3362. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3363.  
  3364. DYNALINK32( library_name, function_name, parameter_stack [, 
  3365. number_of_return_words ]) 
  3366.  
  3367.  
  3368. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3369.  
  3370. Is used to load and pass information to a dynalink library. It is like the 
  3371. DYNALINKC() procedure except that it is used for calling 32-bit DLLs. 
  3372.  
  3373. Note:  This procedure is only available in EPM 5.60 or above.
  3374.  
  3375.  
  3376. ΓòÉΓòÉΓòÉ 4.1.53. ECHO( 'on'|'off' ) ΓòÉΓòÉΓòÉ
  3377.  
  3378. Choose: 
  3379.  
  3380. o Syntax 
  3381. o Definition 
  3382. o E Language Syntax 
  3383.  
  3384.  
  3385. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3386.  
  3387. ECHO( [ON | OFF] ) 
  3388.  
  3389.  
  3390. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3391.  
  3392. Displays the command about to be executed. This is useful for debugging E code. 
  3393.  
  3394.  
  3395. ΓòÉΓòÉΓòÉ 4.1.54. ENDLINE ΓòÉΓòÉΓòÉ
  3396.  
  3397. Choose: 
  3398.  
  3399. o Syntax 
  3400. o Definition 
  3401. o E Language Syntax 
  3402.  
  3403.  
  3404. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3405.  
  3406. ENDLINE | END_LINE 
  3407.  
  3408.  
  3409. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3410.  
  3411. Positions the cursor at end of current line, like standard End. 
  3412.  
  3413.  
  3414. ΓòÉΓòÉΓòÉ 4.1.55. ERASEENDLINE ΓòÉΓòÉΓòÉ
  3415.  
  3416. Choose: 
  3417.  
  3418. o Syntax 
  3419. o Definition 
  3420. o E Language Syntax 
  3421.  
  3422.  
  3423. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3424.  
  3425. ERASEENDLINE | ERASE_END_LINE 
  3426.  
  3427.  
  3428. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3429.  
  3430. Erases the rest of current line starting at cursor position, like standard 
  3431. Ctrl-E. 
  3432.  
  3433.  
  3434. ΓòÉΓòÉΓòÉ 4.1.56. EXECUTE ΓòÉΓòÉΓòÉ
  3435.  
  3436. Choose: 
  3437.  
  3438. o Syntax 
  3439. o Definition 
  3440. o E Language Syntax 
  3441.  
  3442.  
  3443. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3444.  
  3445. EXECUTE 
  3446.  
  3447.  
  3448. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3449.  
  3450. Executes the contents of the command dialog box. 
  3451.  
  3452.  
  3453. ΓòÉΓòÉΓòÉ 4.1.57. EXECUTEKEY key ΓòÉΓòÉΓòÉ
  3454.  
  3455. Choose: 
  3456.  
  3457. o Syntax 
  3458. o Definition 
  3459. o E Language Syntax 
  3460.  
  3461.  
  3462. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3463.  
  3464. EXECUTEKEY keyname | identifier 
  3465.  
  3466.  
  3467. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3468.  
  3469. Interprets key as if typed by user; key may be any valid expression. This is 
  3470. very similar to the KEY statement, except that KEY can take only a literal key 
  3471. name as in KEY A_L.  EXECUTEKEY can take a variable, as in k=page_down; 
  3472. executekey k.  In fact the KEY statement is superfluous, since EXECUTEKEY can 
  3473. be given a literal key name. 
  3474.  
  3475.  
  3476. ΓòÉΓòÉΓòÉ 4.1.58. EXIT ΓòÉΓòÉΓòÉ
  3477.  
  3478. Choose: 
  3479.  
  3480. o Syntax 
  3481. o Definition 
  3482. o E Language Syntax 
  3483.  
  3484.  
  3485. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3486.  
  3487. EXIT [return_code] 
  3488.  
  3489.  
  3490. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3491.  
  3492. Exits the current E macro and all calling macros. This is useful to halt a 
  3493. macro execution if a fatal error is generated. See the RETURN statement to exit 
  3494. only the current macro. 
  3495.  
  3496. A return code can be given as an argument. 
  3497.  
  3498.  
  3499. ΓòÉΓòÉΓòÉ 4.1.59. FILECOMPARE( fileid1, fileid2 [, flag] ) ΓòÉΓòÉΓòÉ
  3500.  
  3501. New in EPM 6. 
  3502.  
  3503. Choose: 
  3504.  
  3505. o Syntax 
  3506. o Definition 
  3507. o Example 
  3508. o E Language Syntax 
  3509.  
  3510.  
  3511. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3512.  
  3513. FILECOMPARE( fileid1, fileid2, [, flags ] ) 
  3514.  
  3515.  
  3516. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3517.  
  3518. Compares the 2 files, starting at the current line of each, and stopping on the 
  3519. first mismatch or when the end of one file is reached. The return value is 0 if 
  3520. there were no differences, 1 if a mismatch occurred, and 2 if the end of only 
  3521. one file was reached. The default value for flags is 0.  Possible values are 
  3522. any combination of: 
  3523.  
  3524. 1   Ignore differences in the number of leading and trailing spaces on each 
  3525.     line. 
  3526. 2   Perform a case-insensitive comparison. 
  3527. 4   Compare only a single pair of lines. 
  3528.  
  3529.  
  3530. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3531.  
  3532. See EPMCOMP.E for an example of the use of this function. 
  3533.  
  3534.  
  3535. ΓòÉΓòÉΓòÉ 4.1.60. FILESINRING( [number] ) ΓòÉΓòÉΓòÉ
  3536.  
  3537. Choose: 
  3538.  
  3539. o Syntax 
  3540. o Definition 
  3541. o E Language Syntax 
  3542.  
  3543.  
  3544. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3545.  
  3546. FILESINRING( [ number ] ) 
  3547.  
  3548.  
  3549. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3550.  
  3551. Returns the number of files in the ring. If number is 0 or missing, the number 
  3552. of normal files in the ring is returned. If number is 1 the total number of 
  3553. files is returned, including hidden files and arrays. If number is 2 the 
  3554. maximum number of files currently allocated is returned. This corresponds to 
  3555. the size of an internal structure, and in the current release will always be a 
  3556. power of 2. An attempt to load more than this number of files will result in a 
  3557. new structure being allocated, with room for twice as many files. 
  3558.  
  3559.  
  3560. ΓòÉΓòÉΓòÉ 4.1.61. FILESIZE() ΓòÉΓòÉΓòÉ
  3561.  
  3562. Choose: 
  3563.  
  3564. o Syntax 
  3565. o Definition 
  3566. o E Language Syntax 
  3567.  
  3568.  
  3569. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3570.  
  3571. FILESIZE() 
  3572.  
  3573.  
  3574. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3575.  
  3576. Returns sum of the lengths of each line in the file. 
  3577.  
  3578.  
  3579. ΓòÉΓòÉΓòÉ 4.1.62. FILLMARK [character] ΓòÉΓòÉΓòÉ
  3580.  
  3581. Choose: 
  3582.  
  3583. o Syntax 
  3584. o Definition 
  3585. o E Language Syntax 
  3586.  
  3587.  
  3588. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3589.  
  3590. FILLMARK [ 'character' ] | FILL_MARK [ 'character' ] 
  3591.  
  3592.  
  3593. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3594.  
  3595. If a character is given, fills the marked area with character. If no character 
  3596. is specified, the user is asked to type a character for the fill.  Like the 
  3597. standard Alt-F. 
  3598.  
  3599.  
  3600. ΓòÉΓòÉΓòÉ 4.1.63. FINDFILE  destfilename, filename [,environment_path_variable, ('P'|'D') ] ΓòÉΓòÉΓòÉ
  3601.  
  3602. Choose: 
  3603.  
  3604. o Syntax 
  3605. o Definition 
  3606. o Example 
  3607. o E Language Syntax 
  3608.  
  3609.  
  3610. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3611.  
  3612. FINDFILE filename , destfilename [, environment_path_variable, (P|D)] 
  3613.  
  3614.  
  3615. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3616.  
  3617. Searches for filename in the current directory and returns its entire pathname 
  3618. in destfilename. 
  3619.  
  3620. Note:  This statement depends upon the program FILEFIND.EXE, which is available 
  3621. on the PCTOOLS disk. You must download this into a directory which is in your 
  3622. PATH environment variable (or the same directory as the E files) before this 
  3623. statement will work properly. 
  3624.  
  3625. The 'P' option specifies program searching. It forces a search for a file with 
  3626. the extension .EXE or .CMD in each directory named in the 
  3627. environment_path_variable.  If environment_path_variable is "PATH", the effect 
  3628. is the same as a normal OS/2 program search.  Some variable other than path can 
  3629. be specified, for example "EPMPATH", and that string will be looked up in the 
  3630. environment.  (The area where OS/2 keeps strings SET by the user.) 
  3631.  
  3632. The 'P' option also checks whether the filename is an internal OS/2 command. 
  3633. If so, destfilename is set up for invocation of the command processor, with 
  3634. "COMMAND.COM /C" at the start. 
  3635.  
  3636. If the 'D' option is used, the third parameter (environment_path_variable) is 
  3637. ignored (although at least a null string must be passed in anyway). The 'D' 
  3638. option will cause filename to be searched for in the following directories: 
  3639.  
  3640.  1. the current directory, and then 
  3641.  
  3642.  2. the directories listed in the EPMPATH environment variable (if it is 
  3643.     defined), and then 
  3644.  
  3645.  3. the directories in the DPATH environment variable, and then 
  3646.  
  3647.  4. the same directory as the file EPM.EXE. 
  3648.  
  3649. An example of usage is: 
  3650.  
  3651. findfile complete_filespec, 'e3help.hlp', '', 'D'
  3652.  
  3653.  
  3654. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3655.  
  3656. Examples: 
  3657.  
  3658.    findfile cmdline,'dir','','P'
  3659.       If rc is zero (no error) then cmdline could
  3660.       be 'C:\COMMAND.COM /C dir'
  3661.  
  3662.    findfile cmdline,'subdir','PATH','P'
  3663.       If rc is zero then cmdline could
  3664.       be 'C:\UTIL\subdir.com'
  3665.  
  3666.  
  3667. ΓòÉΓòÉΓòÉ 4.1.64. FOR ΓòÉΓòÉΓòÉ
  3668.  
  3669. Choose: 
  3670.  
  3671. o Syntax 
  3672. o Definition 
  3673. o E Language Syntax 
  3674.  
  3675.  
  3676. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3677.  
  3678. Is described in section Conditional and Loop Statements. 
  3679.  
  3680.  
  3681. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3682.  
  3683. Is described in section Conditional and Loop Statements. 
  3684.  
  3685.  
  3686. ΓòÉΓòÉΓòÉ 4.1.65. GETFILEID ΓòÉΓòÉΓòÉ
  3687.  
  3688. Choose: 
  3689.  
  3690. o Syntax 
  3691. o Definition 
  3692. o E Language Syntax 
  3693.  
  3694.  
  3695. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3696.  
  3697. GETFILEID  identifier [ ',' {';'} string_expression] 
  3698.  
  3699.  
  3700. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3701.  
  3702. Is described in the section Fileid Structure. 
  3703.  
  3704.  
  3705. ΓòÉΓòÉΓòÉ 4.1.66. GETKEYSTATE( virtual_key_code ) ΓòÉΓòÉΓòÉ
  3706.  
  3707. Choose: 
  3708.  
  3709. o Syntax 
  3710. o Definition 
  3711. o E Language Syntax 
  3712.  
  3713.  
  3714. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3715.  
  3716. GETKEYSTATE(number ) 
  3717.  
  3718.  
  3719. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3720.  
  3721. Is used to test the shift state of the shift keys. This statement replaces E's 
  3722. previous statements of: GETSHIFTSTATE and SETSHIFTSTATE. The syntax for EPM's 
  3723. GETKEYSTATE is: 
  3724.  
  3725.   keystate = getshiftstate( virtual_key_code)
  3726.  
  3727. where the virtual_key_code is one of the VK codes from PMWIN.H. For 
  3728. convenience, the returned test states of VK codes (like PositiveOdd and 
  3729. NegativeEven) have been converted to single values as follows: 
  3730.  
  3731.   KS_DOWN       1  (NegativeEven; key is down)
  3732.   KS_DOWNTOGGLE 2  (NEgativeOdd; key is down + toggled)
  3733.   KS_UP         3  (PositiveEven; key is up)
  3734.   KS_UPTOGGLE   4  (PostiveOdd; key is up + toggled)
  3735.  
  3736.  
  3737. ΓòÉΓòÉΓòÉ 4.1.67. GETLINE  var line [, line_number  [, var fileid] ] ΓòÉΓòÉΓòÉ
  3738.  
  3739. Choose: 
  3740.  
  3741. o Syntax 
  3742. o Definition 
  3743. o Example 
  3744. o E Language Syntax 
  3745.  
  3746.  
  3747. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3748.  
  3749. GETLINE   line [, {;} line_number [ , {;} fileid] ] 
  3750.  
  3751.  
  3752. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3753.  
  3754. Gets a specified line from a specified file into the variable line. Defaulted 
  3755. values for omitted parameters are line_number = current line, and fileid = 
  3756. current file. 
  3757.  
  3758.  
  3759. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3760.  
  3761. For example: 
  3762.  
  3763. GETLINE line
  3764. /* line = current line of current file */
  3765.  
  3766. GETLINE  line, 7
  3767. /* line = line 7 of current file */
  3768.  
  3769. GETLINE  line, 3, ThatFile
  3770. /* line = line 3 of file whose fileid
  3771.      is in variable ThatFile */
  3772. The statement: 
  3773.  
  3774. GETLINE line, 0
  3775. results in the variable line being set to null. 
  3776.  
  3777.  
  3778. ΓòÉΓòÉΓòÉ 4.1.68. GETMARK var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3779.  
  3780. Choose: 
  3781.  
  3782. o Syntax 
  3783. o Definition 
  3784. o Example 
  3785. o E Language Syntax 
  3786.  
  3787.  
  3788. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3789.  
  3790. GETMARK first_line [, {;} last_line [, {;} first_col [, {;} last_col [ , {;} 
  3791. mark_fileid ] ] ] 
  3792.  
  3793.  
  3794. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3795.  
  3796. Returns the current mark coordinates and fileid. If no mark exists, the values 
  3797. returned are meaningless; use the function MARKTYPE() to precheck whether a 
  3798. mark exists. 
  3799.  
  3800.  
  3801. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3802.  
  3803. IF MARKTYPE()<>'' THEN /* text marked? */
  3804.    /* Get active mark coordinates and fileid */
  3805.    GETMARK  first_line, last_line,first_col,
  3806.             last_col, mark_fileid
  3807. ENDIF
  3808.  
  3809.  
  3810. ΓòÉΓòÉΓòÉ 4.1.69. GETMARKG var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3811.  
  3812. Choose: 
  3813.  
  3814. o Syntax 
  3815. o Definition 
  3816. o E Language Syntax 
  3817.  
  3818.  
  3819. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3820.  
  3821. GETMARKG  first_line [, {;} last_line [, {;} first_col [, {;} last_col [, {;} 
  3822. mark_fileid ] ] ] 
  3823.  
  3824.  
  3825. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3826.  
  3827. Like GETMARK in that it returns the current mark coordinates and fileid, but 
  3828. unlike GETMARK, the last_col parameter of GETMARKG represents the right edge of 
  3829. the mark as opposed to the last column in the mark. 
  3830.  
  3831.  
  3832. ΓòÉΓòÉΓòÉ 4.1.70. GETPMINFO (function ) ΓòÉΓòÉΓòÉ
  3833.  
  3834. Choose: 
  3835.  
  3836. o Syntax 
  3837. o Definition 
  3838. o E Language Syntax 
  3839.  
  3840.  
  3841. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3842.  
  3843. GETPMINFO( parameter ) 
  3844.  
  3845.  
  3846. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3847.  
  3848. The following are constants values that are to be used as parameters to the 
  3849. getpminfo internal function: 
  3850.  
  3851.   HAB             0      EDITORMSGAREA       8
  3852.   OWNERCLIENT     1      EDITORVSCROLL       9
  3853.   OWNERFRAME      2      EDITORHSCROLL      10
  3854.   PARENTCLIENT    3      EDITORINTERPRETER  11
  3855.   PARENTFRAME     4      EDITVIOPS          12
  3856.   EDITCLIENT      5      EDITTITLEBAR       13
  3857.   EDITFRAME       6      EDITCURSOR         14
  3858.   EDITSTATUSAREA  7
  3859.  
  3860. Depending on the parameter passed, certain PM information will be returned. See 
  3861. the OS/2 Reference Manual for more information on the meanings of these 
  3862. constants and the meaning of the information returned. 
  3863.  
  3864. Also the the file STDCTRL.E for sample usage of the GETPMINFO command. 
  3865.  
  3866.  
  3867. ΓòÉΓòÉΓòÉ 4.1.71. GETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  3868.  
  3869. Choose: 
  3870.  
  3871. o Syntax 
  3872. o Definition 
  3873. o E Language Syntax 
  3874.  
  3875.  
  3876. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3877.  
  3878. GETSEARCH identifier 
  3879.  
  3880.  
  3881. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3882.  
  3883. Saves last search command in string variable search_cmd. See the SETSEARCH 
  3884. command for retrieving such a command, and examples of usage. 
  3885.  
  3886.  
  3887. ΓòÉΓòÉΓòÉ 4.1.72. HEX( character ) ΓòÉΓòÉΓòÉ
  3888.  
  3889. Choose: 
  3890.  
  3891. o Syntax 
  3892. o Definition 
  3893. o Example 
  3894. o E Language Syntax 
  3895.  
  3896.  
  3897. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3898.  
  3899. HEX( 'character' ) 
  3900.  
  3901.  
  3902. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3903.  
  3904. Returns the hexadecimal value associated with the ASCII representation of 
  3905. character. 
  3906.  
  3907.  
  3908. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3909.  
  3910. HEX('A') = 41
  3911.  
  3912.  
  3913. ΓòÉΓòÉΓòÉ 4.1.73. IF - THEN - ELSE ΓòÉΓòÉΓòÉ
  3914.  
  3915. Choose: 
  3916.  
  3917. o Syntax 
  3918. o Definition 
  3919. o E Language Syntax 
  3920.  
  3921.  
  3922. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3923.  
  3924. Is described in Conditional and Loop Statements. 
  3925.  
  3926.  
  3927. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3928.  
  3929. Is described in Conditional and Loop Statements. 
  3930.  
  3931.  
  3932. ΓòÉΓòÉΓòÉ 4.1.74. INCLUDE ΓòÉΓòÉΓòÉ
  3933.  
  3934. Choose: 
  3935.  
  3936. o Syntax 
  3937. o Definition 
  3938. o E Language Syntax 
  3939.  
  3940.  
  3941. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3942.  
  3943. Is described in section Compiler Directive Statements and in The EPM User's 
  3944. Guide. 
  3945.  
  3946.  
  3947. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3948.  
  3949. Is described in section Compiler Directive Statements and in The EPM User's 
  3950. Guide. 
  3951.  
  3952.  
  3953. ΓòÉΓòÉΓòÉ 4.1.75. INSERT ΓòÉΓòÉΓòÉ
  3954.  
  3955. Choose: 
  3956.  
  3957. o Syntax 
  3958. o Definition 
  3959. o E Language Syntax 
  3960.  
  3961.  
  3962. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3963.  
  3964. INSERT 
  3965.  
  3966.  
  3967. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3968.  
  3969. Inserts a new line after the current line and position cursor in same column of 
  3970. new line as the first non-empty column of the previous line. 
  3971.  
  3972. Note:  Previously, INSERT_LINE was a synonym for INSERT. This was dropped 
  3973.        because it was felt that it was too confusing to have two statements, 
  3974.        INSERT_LINE and INSERTLINE, with different behaviors.
  3975.  
  3976.  
  3977. ΓòÉΓòÉΓòÉ 4.1.76. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] ΓòÉΓòÉΓòÉ
  3978.  
  3979. Choose: 
  3980.  
  3981. o Syntax 
  3982. o Definition 
  3983. o Example 
  3984. o E Language Syntax 
  3985.  
  3986.  
  3987. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3988.  
  3989. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] 
  3990.  
  3991.  
  3992. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3993.  
  3994. This statement (non destructively) inserts an attribute record at the specified 
  3995. location. 
  3996.  
  3997. Class   The class of the attribute record to be inserted. 
  3998.  
  3999. Value   The value field of the attribute record to be inserted. 
  4000.  
  4001. IsPush  The support field of the attribute to insert. 
  4002.  
  4003. Offset  The offset of the position being queried.  Offsets must be negative, 
  4004.         and indicate a position before the specified character location. 
  4005.  
  4006.                  ...[ar-2][ar-1][char]...
  4007.         If a negative offset is specified that is less (more negative) than the 
  4008.         smallest offset of an attribute record at the specified column, then 
  4009.         the new attribute record is placed at an offset that is one less than 
  4010.         the smallest offset. 
  4011.  
  4012.         If an attribute record already exists at the specified offset, then the 
  4013.         old attribute record (and any attribute records at an offset of larger 
  4014.         magnitude) is shifted to an offset of greater magnitude to vacate the 
  4015.         specified offset for the new attribute record. 
  4016.  
  4017. Column  The column number where the new attribute record should be placed.  If 
  4018.         this parameter is omitted, the current column of the cursor is assumed. 
  4019.  
  4020. Line    The line number where the new attribute record should be placed.  If 
  4021.         this parameter is omitted, the current line number of the cursor is 
  4022.         assumed. 
  4023.  
  4024. Fileid  The fileid of the file where the new attribute record should be placed. 
  4025.         If this parameter is omitted, the active file is assumed. 
  4026.  
  4027. See Attribute Pairs for additional information on attributes. 
  4028.  
  4029.  
  4030. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4031.  
  4032.    class = 1  -- COLOR_CLASS
  4033.    val = Red + WhiteB  -- Red on a white background
  4034.    insert_attribute class, val, 1, -1, 1
  4035.    insert_attribute class, val, 0, -1, length(textline(.line))+1
  4036.    if not (.levelofattributesupport // 2) then  -- Turn on mixed color support
  4037.       .levelofattributesupport = .levelofattributesupport + 1
  4038.    endif
  4039.  
  4040. This will color the current line red.  Note that the pop attribute is put at 
  4041. the end of the line + 1, since it attaches to the left side of a character, and 
  4042. we want the last character to be colored as well. 
  4043.  
  4044.  
  4045. ΓòÉΓòÉΓòÉ 4.1.77. INSERTLINE new_line [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  4046.  
  4047. Choose: 
  4048.  
  4049. o Syntax 
  4050. o Definition 
  4051. o Example 
  4052. o E Language Syntax 
  4053.  
  4054.  
  4055. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4056.  
  4057. INSERTLINE  new_line [,{;} line_number [, {;} fileid] ] 
  4058.  
  4059.  
  4060. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4061.  
  4062. Inserts contents of variable new_line just before the designated line of a 
  4063. specified file. Defaulted values for omitted parameters are line_number = 
  4064. current line, and fileid = current file. Without arguments INSERTLINE is 
  4065. identical to the INSERT statement. 
  4066.  
  4067.  
  4068. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4069.  
  4070. INSERTLINE line
  4071. /* inserts line before current line of current file */
  4072.  
  4073. INSERTLINE  line, 7
  4074. /* inserts line before line 7 of current file */
  4075.  
  4076. INSERTLINE  line, 3, ThatFile
  4077. /* inserts line before line 3 of file whose fileid
  4078.      is in variable ThatFile */
  4079.  
  4080.  
  4081. ΓòÉΓòÉΓòÉ 4.1.78. INSERTSTATE() ΓòÉΓòÉΓòÉ
  4082.  
  4083. Choose: 
  4084.  
  4085. o Syntax 
  4086. o Definition 
  4087. o E Language Syntax 
  4088.  
  4089.  
  4090. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4091.  
  4092. INSERTSTATE() 
  4093.  
  4094.  
  4095. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4096.  
  4097. Returns the insert state of EPM. A 1 means insert mode is active; 0 means 
  4098. overwrite mode is active. 
  4099.  
  4100.  
  4101. ΓòÉΓòÉΓòÉ 4.1.79. INSERTSTR(new, target [, n [, length [, pad ]]]) ΓòÉΓòÉΓòÉ
  4102.  
  4103. Choose: 
  4104.  
  4105. o Syntax 
  4106. o Definition 
  4107. o E Language Syntax 
  4108.  
  4109.  
  4110. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4111.  
  4112. INSERTSTR( new , target   [,  n [,  length   [,  pad]]] ) 
  4113.  
  4114.  
  4115. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4116.  
  4117. Inserts the string new, padded to length length, into the string target after 
  4118. the nth character. length and n must be non-negative. If n is greater than the 
  4119. length of the target string, padding is added there also. The default pad 
  4120. character is a blank. The default value for n is 0, which means insert before 
  4121. the beginning of the string. 
  4122.  
  4123.  
  4124. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4125.  
  4126. Here are some examples: 
  4127.  
  4128.  INSERTSTR(' ','abcdef',3)         ->    'abc def'
  4129.  INSERTSTR('123','abc',5,6)        ->    'abc  123   '
  4130.  INSERTSTR('123','abc',5,6,'+')    ->    'abc++123+++'
  4131.  INSERTSTR('123','abc')            ->    '123abc'
  4132.  INSERTSTR('123','abc',,5,'-')     ->    '123--abc'
  4133.  
  4134.  
  4135. ΓòÉΓòÉΓòÉ 4.1.80. INSERTTOGGLE ΓòÉΓòÉΓòÉ
  4136.  
  4137. Choose: 
  4138.  
  4139. o Syntax 
  4140. o Definition 
  4141. o E Language Syntax 
  4142.  
  4143.  
  4144. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4145.  
  4146. INSERTTOGGLE | INSERT_TOGGLE 
  4147.  
  4148.  
  4149. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4150.  
  4151. Toggles cursor from insert mode to replace mode and vice versa.  Like pressing 
  4152. the standard Ins key. 
  4153.  
  4154.  
  4155. ΓòÉΓòÉΓòÉ 4.1.81. ISADEFC ΓòÉΓòÉΓòÉ
  4156.  
  4157. Choose: 
  4158.  
  4159. o Syntax 
  4160. o Definition 
  4161. o Example 
  4162. o E Language Syntax 
  4163.  
  4164.  
  4165. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4166.  
  4167. ISADEFC ( expression ) 
  4168.  
  4169.  
  4170. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4171.  
  4172. Boolean function that tells whether or not a macro-defined command with the 
  4173. given name exists. 
  4174.  
  4175.  
  4176. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4177.  
  4178. if isadefc('mysave') then
  4179.    'mysave' arg(1)
  4180. endif
  4181.  
  4182.  
  4183. ΓòÉΓòÉΓòÉ 4.1.82. ISADEFPROC ΓòÉΓòÉΓòÉ
  4184.  
  4185. Choose: 
  4186.  
  4187. o Syntax 
  4188. o Definition 
  4189. o Example 
  4190. o E Language Syntax 
  4191.  
  4192.  
  4193. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4194.  
  4195. ISADEFPROC ( expression ) 
  4196.  
  4197.  
  4198. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4199.  
  4200. Boolean function that tells whether or not a macro-defined procedure with the 
  4201. given name exists. 
  4202.  
  4203.  
  4204. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4205.  
  4206. if ISADEFPROC('myfunction') then
  4207.    call myfunction('Exiting')
  4208. endif
  4209.  
  4210.  
  4211. ΓòÉΓòÉΓòÉ 4.1.83. ISADIRTYLINE ΓòÉΓòÉΓòÉ
  4212.  
  4213. Choose: 
  4214.  
  4215. o Syntax 
  4216. o Definition 
  4217. o E Language Syntax 
  4218.  
  4219.  
  4220. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4221.  
  4222. ISADIRTYLINE() 
  4223.  
  4224.  
  4225. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4226.  
  4227. Boolean function that tells whether or not the current line has been modified 
  4228. but not yet "checked in".  This corresponds to whether or not the undo opcode 
  4229. will change the line; the function was added in order to enable the Undo menu 
  4230. item to be greyed if not applicable. 
  4231.  
  4232.  
  4233. ΓòÉΓòÉΓòÉ 4.1.84. ITERATE ΓòÉΓòÉΓòÉ
  4234.  
  4235. Choose: 
  4236.  
  4237. o Syntax 
  4238. o Definition 
  4239. o E Language Syntax 
  4240.  
  4241.  
  4242. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4243.  
  4244. Is described in section Conditional and Loop Statements. 
  4245.  
  4246.  
  4247. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4248.  
  4249. Is described in section Conditional and Loop Statements. 
  4250.  
  4251.  
  4252. ΓòÉΓòÉΓòÉ 4.1.85. ITOA(variable, radix) ΓòÉΓòÉΓòÉ
  4253.  
  4254. Choose: 
  4255.  
  4256. o Syntax 
  4257. o Definition 
  4258. o E Language Syntax 
  4259.  
  4260.  
  4261. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4262.  
  4263. ITOA( variable,  radix ) 
  4264.  
  4265.  
  4266. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4267.  
  4268. Converts a two byte binary representation of an integer stored in variable to a 
  4269. string representation of the integer, so that the E language can understand it. 
  4270. radix specifies the base of the number (i.e. base 10 = decimal; base 16 = 
  4271. hexadecimal) to be converted to a string representation. This function is often 
  4272. used to convert integers returned by dynalink library functions from binary 
  4273. representation to ASCII string representation. See DYNALINK() for an example of 
  4274. the use of ITOA(). 
  4275.  
  4276.  
  4277. ΓòÉΓòÉΓòÉ 4.1.86. JOIN ΓòÉΓòÉΓòÉ
  4278.  
  4279. Choose: 
  4280.  
  4281. o Syntax 
  4282. o Definition 
  4283. o E Language Syntax 
  4284.  
  4285.  
  4286. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4287.  
  4288. JOIN 
  4289.  
  4290.  
  4291. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4292.  
  4293. Joins the next line with current line, with an intervening space. Like the 
  4294. standard a_J key combination. 
  4295.  
  4296.  
  4297. ΓòÉΓòÉΓòÉ 4.1.87. KEYIN expression ΓòÉΓòÉΓòÉ
  4298.  
  4299. Choose: 
  4300.  
  4301. o Syntax 
  4302. o Definition 
  4303. o Example 
  4304. o E Language Syntax 
  4305.  
  4306.  
  4307. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4308.  
  4309. KEYIN expression 
  4310.  
  4311.  
  4312. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4313.  
  4314. Types expression at current cursor position as if typed from the keyboard 
  4315. without translation or execution. expression is most often a quoted command, 
  4316. although it can also be a numeric expression. 
  4317.  
  4318.  
  4319. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4320.  
  4321. For example, one could enter the current date: 
  4322.  
  4323. parse value getdate(1) with today';' .  /* Discard MonthNum. */
  4324. keyin 'Today is' today'.'
  4325. One could also type graphics characters in the text by placing the cursor at 
  4326. the desired location and issuing the statement: 
  4327.  
  4328. keyin \24
  4329.  
  4330.  
  4331. ΓòÉΓòÉΓòÉ 4.1.88. KEYS name ΓòÉΓòÉΓòÉ
  4332.  
  4333. Choose: 
  4334.  
  4335. o Syntax 
  4336. o Definition 
  4337. o Example 
  4338. o E Language Syntax 
  4339.  
  4340.  
  4341. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4342.  
  4343. KEYS name 
  4344.  
  4345.  
  4346. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4347.  
  4348. Changes to the keyset name. The keyset is created by the DEFKEYS statement Key 
  4349. Definitions (DEF and DEFKEYS).  The KEYS statement can be used in conjunction 
  4350. with DEFLOAD DEFLOAD. 
  4351.  
  4352.  
  4353. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4354.  
  4355. The following example changes to a keyset that enhances keys such that the C 
  4356. programming language syntax could be recognized: 
  4357.  
  4358. defload
  4359.   ext=filetype(name)  -- get file extention
  4360.   if ext='C' then     -- test file is a c file
  4361.  
  4362.      keys c_keys      -- change to new keyset
  4363.  
  4364.   endif
  4365.  
  4366.  
  4367. ΓòÉΓòÉΓòÉ 4.1.89. LASTERROR() ΓòÉΓòÉΓòÉ
  4368.  
  4369. Choose: 
  4370.  
  4371. o Syntax 
  4372. o Definition 
  4373. o Example 
  4374. o E Language Syntax 
  4375.  
  4376.  
  4377. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4378.  
  4379. LASTERROR() 
  4380.  
  4381.  
  4382. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4383.  
  4384. Returns the last error code. The example illustrates its usage. 
  4385.  
  4386.  
  4387. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4388.  
  4389. 'tabs 0'
  4390. 'ma 75 1'
  4391. if lasterror() = -271 then
  4392.     sayerror "margin setting error"
  4393. elseif lasterror() = -272 then
  4394.     sayerror "tabs setting error"
  4395. else
  4396.     sayerror "no error"
  4397. endif
  4398.  
  4399. In the above example, an error would occur while trying to set both tabs and 
  4400. margins. LASTERROR() would return -271, and margin setting error would be 
  4401. printed. Assume the following two lines were substituted for the first two 
  4402. lines of the above example: 
  4403.  
  4404. 'tabs 0'
  4405. 'margins 1 75'
  4406. The result of LASTERROR() would be -272, and tabs setting error would be 
  4407. printed. In this way, you can retain the error code returned by a command even 
  4408. after a second command completes successfully. 
  4409.  
  4410.  
  4411. ΓòÉΓòÉΓòÉ 4.1.90. LASTKEY([key_number]) ΓòÉΓòÉΓòÉ
  4412.  
  4413. Choose: 
  4414.  
  4415. o Syntax 
  4416. o Definition 
  4417. o Example 
  4418. o E Language Syntax 
  4419.  
  4420.  
  4421. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4422.  
  4423. LASTKEY( [0 | 1 | 2 | 3] ) 
  4424.  
  4425.  
  4426. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4427.  
  4428. Returns the user's last keystroke, whether typed manually or executed by a 
  4429. KEYIN or EXECUTEKEY statement.  The only values that are valid for the 
  4430. parameter key_number are 0 to3.  The LASTKEY(0) call has the same effect as a 
  4431. LASTKEY() call, which has the same behavior as it always has, namely, to return 
  4432. the most recent keystroke.  This procedure call is not useful for checking for 
  4433. prefix keys.  (See the example.) LASTKEY(1) returns the next-to-last keystroke. 
  4434. LASTKEY(2) returns an 8-byte string representing the last WM_CHAR message 
  4435. received (see the example), and LASTKEY(3) returns the next-to-last WM_CHAR. 
  4436.  
  4437. Note:  The WM_CHAR data can be used to check scan codes and differentiate 
  4438.        between the numeric keypad and other keys (for example).  If a character 
  4439.        is being processed from a KEYIN or EXECUTEKEY statement, then the 
  4440.        WM_CHAR data will consist of 8 bytes of ASCII zeros. 
  4441.  
  4442.  
  4443. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4444.  
  4445. You might expect that the following example would check for the two-key 
  4446. sequence Esc followed by F5: 
  4447.  
  4448.    def f6=
  4449.       if lastkey()=esc then
  4450.          /* do the new code for Esc-F6 */
  4451.       else
  4452.          /* do the normal F5 (in this case the draw command) */
  4453.          'draw'
  4454.       endif
  4455. However, this is not the case. This definition is executed only if F5 is 
  4456. pressed, and once F5 has been pressed, it becomes the value of LASTKEY(). 
  4457. Therefore the if condition in the example never holds true. 
  4458.  
  4459. The procedure could be useful in the following case: 
  4460.  
  4461. def f5, a_f5, esc =
  4462.     if lastkey() = f5 then
  4463.         /* do something for F5 case */
  4464.     elseif lastkey() = a_f5 then
  4465.         /* do something for A_F5 case */
  4466.     else
  4467.         /* do something for Esc case */
  4468.     endif
  4469.     /* do something for all of the keys */
  4470. In this case, one DEF is defined for multiple keys. By using the LASTKEY() 
  4471. procedure, you can determine which of these keys was pressed. 
  4472.  
  4473. The procedure call LASTKEY(1) returns the key before last, and will handle the 
  4474. problem discussed in the first example.  By substituting LASTKEY(1) calls for 
  4475. the LASTKEY() calls in the first example, this piece of code will work as 
  4476. expected: trapping the Esc followed by F5 key sequence. 
  4477.  
  4478. Example of WM_CHAR usage: 
  4479.  
  4480. def left = -- Note:  the following are all binary:
  4481.    parse value lastkey(2) with flags 3 repeat 4 scancode 5 charcode 7 vk_code 9
  4482.    left
  4483.    if scancode = \75 then  -- x'4b'; keyboard-specific
  4484.       sayerror 'Pad left'
  4485.    else
  4486.       sayerror 'Cursor key left'
  4487.    endif
  4488.  
  4489.  
  4490. ΓòÉΓòÉΓòÉ 4.1.91. LASTPOS (needle, haystack [,startpos [,flags]]) ΓòÉΓòÉΓòÉ
  4491.  
  4492. Choose: 
  4493.  
  4494. o Syntax 
  4495. o Definition 
  4496. o Example 
  4497. o E Language Syntax 
  4498.  
  4499.  
  4500. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4501.  
  4502. LASTPOS( needle,  haystack   [, startpos [, flags]] ) 
  4503.  
  4504.  
  4505. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4506.  
  4507. Searches backwards for needle in haystack from startpos to beginning of string. 
  4508. If startpos is not present, the search begins from the end of string. If needle 
  4509. is not found, zero is returned. needle and haystack must be strings. 
  4510.  
  4511. See the description of the POS function for an explanation of flags, and for 
  4512. examples using them. 
  4513.  
  4514.  
  4515. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4516.  
  4517.    LASTPOS(' ','abc def ghi')   ==8
  4518.    LASTPOS(' ','abcdefghi')     ==0
  4519.    LASTPOS(' ','abc def ghi',7) ==4
  4520.  
  4521.  
  4522. ΓòÉΓòÉΓòÉ 4.1.92. LASTWORD(string) ΓòÉΓòÉΓòÉ
  4523.  
  4524. Choose: 
  4525.  
  4526. o Syntax 
  4527. o Definition 
  4528. o Example 
  4529. o E Language Syntax 
  4530.  
  4531.  
  4532. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4533.  
  4534. LASTWORD( string ) 
  4535.  
  4536.  
  4537. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4538.  
  4539. returns the last space-delimited word in string. 
  4540.  
  4541. Note:  This procedure is only available in EPM 5.60 or above.
  4542.  
  4543.  
  4544. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4545.  
  4546.    LASTWORD(string) == WORD(string, WORDS(string))
  4547.  
  4548.  
  4549. ΓòÉΓòÉΓòÉ 4.1.93. LEAVE ΓòÉΓòÉΓòÉ
  4550.  
  4551. Choose: 
  4552.  
  4553. o Syntax 
  4554. o Definition 
  4555. o E Language Syntax 
  4556.  
  4557.  
  4558. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4559.  
  4560. Is described in section Conditional and Loop Statements. 
  4561.  
  4562.  
  4563. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4564.  
  4565. Is described in section Conditional and Loop Statements. 
  4566.  
  4567.  
  4568. ΓòÉΓòÉΓòÉ 4.1.94. LEFT ΓòÉΓòÉΓòÉ
  4569.  
  4570. Choose: 
  4571.  
  4572. o Syntax 
  4573. o Definition 
  4574. o E Language Syntax 
  4575.  
  4576.  
  4577. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4578.  
  4579. LEFT 
  4580.  
  4581.  
  4582. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4583.  
  4584. Moves cursor 1 character to the left, like the standard Left. 
  4585.  
  4586.  
  4587. ΓòÉΓòÉΓòÉ 4.1.95. LEFTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  4588.  
  4589. Choose: 
  4590.  
  4591. o Syntax 
  4592. o Definition 
  4593. o Example 
  4594. o E Language Syntax 
  4595.  
  4596.  
  4597. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4598.  
  4599. LEFTSTR( string,  length   [, pad] ) 
  4600.  
  4601.  
  4602. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4603.  
  4604. Returns a string of length length containing the left-most length characters of 
  4605. string. That is, padded with pad characters (or truncated) on the right as 
  4606. needed. The default pad character is a blank. length must be non-negative. 
  4607. Exactly equivalent to SUBSTR(string,1,length[,pad]). 
  4608.  
  4609.  
  4610. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4611.  
  4612. Here are some examples: 
  4613.  
  4614.  LEFTSTR('abc d',8)        ->    'abc d   '
  4615.  LEFTSTR('abc d',8,'.')    ->    'abc d...'
  4616.  LEFTSTR('abc  def',7)     ->    'abc  de'
  4617.  
  4618.  
  4619. ΓòÉΓòÉΓòÉ 4.1.96. LENGTH(expression) ΓòÉΓòÉΓòÉ
  4620.  
  4621. Choose: 
  4622.  
  4623. o Syntax 
  4624. o Definition 
  4625. o Example 
  4626. o E Language Syntax 
  4627.  
  4628.  
  4629. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4630.  
  4631. LENGTH( expression ) 
  4632.  
  4633.  
  4634. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4635.  
  4636. Returns length of expression. 
  4637.  
  4638.  
  4639. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4640.  
  4641. Here are some examples: 
  4642.  
  4643.  LENGTH('abcdefgh')    ->    8
  4644.  LENGTH('abc defg')    ->    8
  4645.  LENGTH('')            ->    0
  4646.  
  4647.  
  4648. ΓòÉΓòÉΓòÉ 4.1.97. LEXAM( functionname ) ΓòÉΓòÉΓòÉ
  4649.  
  4650. Choose: 
  4651.  
  4652. o Syntax 
  4653. o Definition 
  4654. o E Language Syntax 
  4655.  
  4656.  
  4657. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4658.  
  4659. LEXAM( numeric_expression ) 
  4660.  
  4661.  
  4662. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4663.  
  4664. Provides spell checking and synonym support for the EPM. 
  4665.  
  4666. The LEXAM opcode allows word verification and word/dictionary lookup. The LEXAM 
  4667. opcode can take on the following syntax: 
  4668.  
  4669.     lexam('Initialize')
  4670.     lexam('Terminate')
  4671.     lexam('PIckup Dictionary',dictionary_name)
  4672.     lexam('DRop Dictionary',dictionary_name)
  4673.     lexam('SEt Addenda Language Type',addenda_type)
  4674.     lexam('Add to Transient Addenda',addenda_name)
  4675.     lexam('Read from Transient Addenda',addenda_name)
  4676.     lexam('Verification',word)
  4677.     lexam('SPelling Aid',word)
  4678.     lexam('Hyphenation',word)
  4679.     lexam('DEhyphenation',word)
  4680.     lexam('SYnonym',word)
  4681.     lexam('GRAMmar Aid',word)
  4682.     lexam('GRADe level',word)
  4683.     lexam('PArt-of-speech',word)
  4684.  
  4685.  
  4686. ΓòÉΓòÉΓòÉ 4.1.98. LINK ΓòÉΓòÉΓòÉ
  4687.  
  4688. Choose: 
  4689.  
  4690. o Syntax 
  4691. o Definition 
  4692. o E Language Syntax 
  4693.  
  4694.  
  4695. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4696.  
  4697. LINK string_expression 
  4698.  
  4699.  
  4700. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4701.  
  4702. Is described in section Linkable External Modules. 
  4703.  
  4704.  
  4705. ΓòÉΓòÉΓòÉ 4.1.99. LINKED ΓòÉΓòÉΓòÉ
  4706.  
  4707. Choose: 
  4708.  
  4709. o Syntax 
  4710. o Definition 
  4711. o Example 
  4712. o E Language Syntax 
  4713.  
  4714.  
  4715. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4716.  
  4717. LINKED( module ) 
  4718.  
  4719.  
  4720. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4721.  
  4722. Queries whether a module is linked.  The return value is: 
  4723.  
  4724. o module number (a small positive integer) if linked 
  4725. o -1 if found on disk but not currently linked 
  4726. o -307 if module can't be found on disk.  This RC value -307 is the same as 
  4727.   sayerror("Link: file not found"). 
  4728. o -308 if the expression is a bad module name that cannot be expanded into a 
  4729.   proper filename.  Same as sayerror("Link: invalid filename"). 
  4730.  
  4731.  
  4732. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4733.  
  4734. Sample usage:  result = linked("draw"). 
  4735.  
  4736. Note:  If you wish to make sure a module is linked, you can always just repeat 
  4737. the link command.  E won't reload the file from disk if it's already linked, 
  4738. but it will rerun the module's DEFINIT which might not be desirable. 
  4739.  
  4740.  
  4741. ΓòÉΓòÉΓòÉ 4.1.100. LONGESTLINE ΓòÉΓòÉΓòÉ
  4742.  
  4743. Choose: 
  4744.  
  4745. o Syntax 
  4746. o Definition 
  4747. o E Language Syntax 
  4748.  
  4749.  
  4750. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4751.  
  4752. LONGESTLINE() 
  4753.  
  4754.  
  4755. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4756.  
  4757. Returns the length of the longest line in the current file. 
  4758.  
  4759.  
  4760. ΓòÉΓòÉΓòÉ 4.1.101. LOOP ΓòÉΓòÉΓòÉ
  4761.  
  4762. Choose: 
  4763.  
  4764. o Syntax 
  4765. o Definition 
  4766. o E Language Syntax 
  4767.  
  4768.  
  4769. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4770.  
  4771. Is described in section Conditional and Loop Statements. 
  4772.  
  4773.  
  4774. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4775.  
  4776. Is described in section Conditional and Loop Statements. 
  4777.  
  4778.  
  4779. ΓòÉΓòÉΓòÉ 4.1.102. LOWCASE(expression) ΓòÉΓòÉΓòÉ
  4780.  
  4781. Choose: 
  4782.  
  4783. o Syntax 
  4784. o Definition 
  4785. o E Language Syntax 
  4786.  
  4787.  
  4788. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4789.  
  4790. LOWCASE( expression ) 
  4791.  
  4792.  
  4793. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4794.  
  4795. Returns the lower-case conversion of the expression.  (In versions earlier than 
  4796. 4.12, the input string was converted in place.  Now the input is left alone and 
  4797. the converted string is returned as the result.) 
  4798.  
  4799.  
  4800. ΓòÉΓòÉΓòÉ 4.1.103. LTOA(variable, radix) ΓòÉΓòÉΓòÉ
  4801.  
  4802. Choose: 
  4803.  
  4804. o Syntax 
  4805. o Definition 
  4806. o E Language Syntax 
  4807.  
  4808.  
  4809. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4810.  
  4811. LTOA( variable,  radix ) 
  4812.  
  4813.  
  4814. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4815.  
  4816. Converts the C representation of a long integer (data type long) stored in 
  4817. variable to a string representation of the same number, so that the E language 
  4818. can understand the number. radix specifies the base of the number (i.e. base 10 
  4819. = decimal; base 16 = hexadecimal) to be converted to a string representation. 
  4820. For use in converting numbers returned by C functions, for example function 
  4821. calls via DYNALINK(). 
  4822.  
  4823.  
  4824. ΓòÉΓòÉΓòÉ 4.1.104. MACHINE() ΓòÉΓòÉΓòÉ
  4825.  
  4826. Choose: 
  4827.  
  4828. o Syntax 
  4829. o Definition 
  4830. o E Language Syntax 
  4831.  
  4832.  
  4833. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4834.  
  4835. MACHINE() 
  4836.  
  4837.  
  4838. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4839.  
  4840. Returns operating system and machine information string.  Return values are 
  4841. "PCDOS" or "OS2REAL" or "OS2PROTECT". 
  4842.  
  4843.  
  4844. ΓòÉΓòÉΓòÉ 4.1.105. MAP_POINT ΓòÉΓòÉΓòÉ
  4845.  
  4846. Choose: 
  4847.  
  4848. o Syntax 
  4849. o Definition 
  4850. o Example 
  4851. o E Language Syntax 
  4852.  
  4853.  
  4854. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4855.  
  4856. MAP_POINT subop, op2, op3 [, op4 [, comment ] ] 
  4857.  
  4858.  
  4859. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4860.  
  4861. Everything other than subop must be a variable. This opcode is used to map 
  4862. between a pixel-offset in the window, a pixel-offset in the document, and a 
  4863. line, column and offset within the file. 
  4864.  
  4865. subop          op2_in  op3_in  op4_in  op2_out  op3_out  op4_out
  4866. 1  WindowToDoc   x       y       -       x        y        =
  4867. 2  DocToLCO      x       y       -       Line     Col      Off
  4868. 3  LCOToDoc      Line    Col     Off     x        y        =
  4869. 4  Doc2Win       x       y       -       x        y        =
  4870. 5  Win2LCO       x       y       -       Line     Col      Off
  4871. 6  LCO2Win       Line    Col     Off     x        y        =
  4872. The comment field is an extra field that eventually will be used to indicate if 
  4873. the special processing had to occur.  For example, a requested point was beyond 
  4874. the EOF and the returned values are based on extrapolation. 
  4875.  
  4876. Note:  When mapping to Line/Column/Offset, the mapping is to the nearest 
  4877.        interstitial space - i.e., the transition between two characters, two 
  4878.        attributes, or an attribute and a character.  This means that if you map 
  4879.        a coordinate that's on the left side of a character, it will return the 
  4880.        column of that character, but if you map a coordinate on the right side 
  4881.        of a character, you'll get back the column of the following character.
  4882.  
  4883.  
  4884. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4885.  
  4886. The following example maps the mouse position to the character under the mouse 
  4887. pointer. 
  4888.  
  4889. xxx = .mousex; mx = xxx
  4890. yyy = .mousey
  4891.  
  4892. map_point 5, xxx, yyy, off, comment;  -- map screen to line
  4893.  
  4894. MouseLine = min(max(xxx, 0), .last)  -- Want line to be between 0 & .last
  4895. lne = yyy
  4896. map_point 6, xxx, lne, off, comment;  -- map line/col/offset to screen
  4897. if xxx>mx then  -- The intersection selected is to right of mouse pointer;
  4898.    yyy = yyy - 1  -- the character clicked on is the one to the left.
  4899. endif             -- Note:  could get col. 0 this way, but the following
  4900.                   --        takes care of that.
  4901. MouseCol  = min(max(yyy, 1), MAXCOL)
  4902.  
  4903.  
  4904. ΓòÉΓòÉΓòÉ 4.1.106. MARKBLOCK ΓòÉΓòÉΓòÉ
  4905.  
  4906. Choose: 
  4907.  
  4908. o Syntax 
  4909. o Definition 
  4910. o E Language Syntax 
  4911.  
  4912.  
  4913. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4914.  
  4915. MARKBLOCK | MARK_BLOCK 
  4916.  
  4917.  
  4918. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4919.  
  4920. Starts or changes coordinates of a block mark, like the standard Alt-B. 
  4921.  
  4922.  
  4923. ΓòÉΓòÉΓòÉ 4.1.107. MARKBLOCKG ΓòÉΓòÉΓòÉ
  4924.  
  4925. Choose: 
  4926.  
  4927. o Syntax 
  4928. o Definition 
  4929. o E Language Syntax 
  4930.  
  4931.  
  4932. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4933.  
  4934. MARKBLOCKG 
  4935.  
  4936.  
  4937. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4938.  
  4939. Like MARKBLOCK, but right column must be specified one beyond the desired right 
  4940. column. 
  4941.  
  4942.  
  4943. ΓòÉΓòÉΓòÉ 4.1.108. MARKCHAR ΓòÉΓòÉΓòÉ
  4944.  
  4945. Choose: 
  4946.  
  4947. o Syntax 
  4948. o Definition 
  4949. o E Language Syntax 
  4950.  
  4951.  
  4952. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4953.  
  4954. MARKCHAR | MARK_CHAR 
  4955.  
  4956.  
  4957. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4958.  
  4959. Starts or changes coordinates of a character mark, like the standard Alt-Z. 
  4960.  
  4961.  
  4962. ΓòÉΓòÉΓòÉ 4.1.109. MARKCHARG ΓòÉΓòÉΓòÉ
  4963.  
  4964. Choose: 
  4965.  
  4966. o Syntax 
  4967. o Definition 
  4968. o E Language Syntax 
  4969.  
  4970.  
  4971. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4972.  
  4973. MARKCHARG 
  4974.  
  4975.  
  4976. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4977.  
  4978. Like MARKCHAR, but column numbers represent edges rather than characters, so 
  4979. that they can be between attributes (and right column will generally be one 
  4980. higher that it would be for MARKCHAR). 
  4981.  
  4982.  
  4983. ΓòÉΓòÉΓòÉ 4.1.110. MARKLINE ΓòÉΓòÉΓòÉ
  4984.  
  4985. Choose: 
  4986.  
  4987. o Syntax 
  4988. o Definition 
  4989. o E Language Syntax 
  4990.  
  4991.  
  4992. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4993.  
  4994. MARKLINE | MARK_LINE 
  4995.  
  4996.  
  4997. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4998.  
  4999. Starts or changes coordinates of a line mark, like the standard Alt-L. 
  5000.  
  5001.  
  5002. ΓòÉΓòÉΓòÉ 4.1.111. MARKLINEG ΓòÉΓòÉΓòÉ
  5003.  
  5004. Choose: 
  5005.  
  5006. o Syntax 
  5007. o Definition 
  5008. o E Language Syntax 
  5009.  
  5010.  
  5011. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5012.  
  5013. MARKLINEG 
  5014.  
  5015.  
  5016. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5017.  
  5018. Same as MARKLINE. 
  5019.  
  5020.  
  5021. ΓòÉΓòÉΓòÉ 4.1.112. MARKSIZE() ΓòÉΓòÉΓòÉ
  5022.  
  5023. New in EPM 6. 
  5024.  
  5025. Choose: 
  5026.  
  5027. o Syntax 
  5028. o Definition 
  5029. o Example 
  5030. o E Language Syntax 
  5031.  
  5032.  
  5033. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5034.  
  5035. MARKSIZE() 
  5036.  
  5037.  
  5038. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5039.  
  5040. Returns the number of marked characters.  Useful when allocating a buffer into 
  5041. which to copy the marked text. 
  5042.  
  5043.  
  5044. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5045.  
  5046. if marktype() then
  5047.    getmark firstline, lastline
  5048.    -- size of marked text + CR/LF for each line + 32 bytes buffer header
  5049.    buff_size = marksize() + 2 * (lastline - firstline + 1) + 32
  5050.    bufhndl = buffer(CREATEBUF, 'TempBuf', buff_size, 1 )
  5051.    call buffer(PUTMARKBUF, bufhndl, firstline, lastline, APPENDCR+APPENDLF)
  5052. endif
  5053.  
  5054.  
  5055. ΓòÉΓòÉΓòÉ 4.1.113. MARKTYPE() ΓòÉΓòÉΓòÉ
  5056.  
  5057. Choose: 
  5058.  
  5059. o Syntax 
  5060. o Definition 
  5061. o E Language Syntax 
  5062.  
  5063.  
  5064. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5065.  
  5066. MARKTYPE() 
  5067.  
  5068.  
  5069. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5070.  
  5071. Returns 'BLOCK', 'LINE', or 'CHAR'.  ' ' is returned if no text is highlighted. 
  5072.  
  5073.  
  5074. ΓòÉΓòÉΓòÉ 4.1.114. MEMCPYX(destination, source, length) ΓòÉΓòÉΓòÉ
  5075.  
  5076. Choose: 
  5077.  
  5078. o Syntax 
  5079. o Definition 
  5080. o E Language Syntax 
  5081.  
  5082.  
  5083. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5084.  
  5085. MEMCPYX( hexadecimal_address , hexadecimal_address   , length ) 
  5086.  
  5087.  
  5088. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5089.  
  5090. Copies length bytes from source to destination. Both source and destination are 
  5091. binary far pointers; e.g. 
  5092.  
  5093. call memcpyx(atoi(ptr1) || atoi(seg1), atoi(ptr2) || atoi(seg2), len)
  5094.  
  5095.  
  5096. ΓòÉΓòÉΓòÉ 4.1.115. MOUSE_SETPOINTER type ΓòÉΓòÉΓòÉ
  5097.  
  5098. Choose: 
  5099.  
  5100. o Syntax 
  5101. o Definition 
  5102. o E Language Syntax 
  5103.  
  5104.  
  5105. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5106.  
  5107. MOUSE_SETPOINTER 
  5108.  
  5109.  
  5110. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5111.  
  5112. Sets the mouse pointer to the figure specified by type. Mouse figures are: 
  5113.  
  5114. 1 = arrow pointer (can also user the constant SYSTEM_POINTER) 
  5115. 2 = a vertical bar (like those used to request text in a dialog box) 
  5116. 3 = an hour glass 
  5117. 4 = invisible 
  5118. 5 = four way arrows 
  5119. 6 = two way arrow (upper left/lower right) 
  5120. 7 = two way arrow (upper right/lower left) 
  5121. 8 = horizontal arrow 
  5122. 9 = vertical arrow 
  5123. 10 = an outlined box 
  5124. 11 = a stop octagon with a hand in a box 
  5125. 12 = the browse question mark in a box 
  5126. 13 = an explanation point in box 
  5127. 14 = an asterisk in a box 
  5128. 15 = cropping lines (as defined by the constant MARK_POINTER) 
  5129.  
  5130. For instance, when entering browse mode the mouse pointer can be changed to 
  5131. indicate that no text can be entered. 
  5132.  
  5133.  
  5134. ΓòÉΓòÉΓòÉ 4.1.116. MOVEMARK ΓòÉΓòÉΓòÉ
  5135.  
  5136. Choose: 
  5137.  
  5138. o Syntax 
  5139. o Definition 
  5140. o E Language Syntax 
  5141.  
  5142.  
  5143. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5144.  
  5145. MOVEMARK | MOVE_MARK 
  5146.  
  5147.  
  5148. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5149.  
  5150. Moves marked text to cursor position, like the standard Alt-M. 
  5151.  
  5152.  
  5153. ΓòÉΓòÉΓòÉ 4.1.117. NEXTFILE ΓòÉΓòÉΓòÉ
  5154.  
  5155. Choose: 
  5156.  
  5157. o Syntax 
  5158. o Definition 
  5159. o E Language Syntax 
  5160.  
  5161.  
  5162. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5163.  
  5164. NEXTFILE | NEXT_FILE 
  5165.  
  5166.  
  5167. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5168.  
  5169. Activates the next file in the active ring, like the standard F12 or Ctrl-N. 
  5170.  
  5171.  
  5172. ΓòÉΓòÉΓòÉ 4.1.118. OFFSET(variable) ΓòÉΓòÉΓòÉ
  5173.  
  5174. Choose: 
  5175.  
  5176. o Syntax 
  5177. o Definition 
  5178. o E Language Syntax 
  5179.  
  5180.  
  5181. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5182.  
  5183. OFFSET( variable ) 
  5184.  
  5185.  
  5186. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5187.  
  5188. Returns the offset of the memory address of variable in the form of a binary 
  5189. word. To be used with C functions like those made via DYNALINK(). 
  5190.  
  5191.  
  5192. ΓòÉΓòÉΓòÉ 4.1.119. OFS(variable) ΓòÉΓòÉΓòÉ
  5193.  
  5194. Choose: 
  5195.  
  5196. o Syntax 
  5197. o Definition 
  5198. o E Language Syntax 
  5199.  
  5200.  
  5201. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5202.  
  5203. OFS( variable ) 
  5204.  
  5205.  
  5206. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5207.  
  5208. Returns a string representation of the offset of the actual memory address of 
  5209. variable. See SEG() for an example of usage. 
  5210.  
  5211.  
  5212. ΓòÉΓòÉΓòÉ 4.1.120. OVERLAY(new, target[, n [, k [,pad] ] ]) ΓòÉΓòÉΓòÉ
  5213.  
  5214. Choose: 
  5215.  
  5216. o Syntax 
  5217. o Definition 
  5218. o Example 
  5219. o E Language Syntax 
  5220.  
  5221.  
  5222. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5223.  
  5224. OVERLAY(new,  target   [, n  [, length   [, pad] ] ]) 
  5225.  
  5226.  
  5227. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5228.  
  5229. overlays the string new, padded  to length k, onto the string target starting 
  5230. at the nth character. k must be zero or positive. If n is greater than the 
  5231. length of the target string, padding is added there also. The default pad 
  5232. character is the blank, and the default value for n is 1. n must be greater 
  5233. than 0. 
  5234.  
  5235.  
  5236. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5237.  
  5238. Examples are: 
  5239.  
  5240.   OVERLAY(' ','abcdef',3)      == 'ab def'
  5241.   OVERLAY('.','abcdef',3,2)    == 'ab. ef'
  5242.   OVERLAY('qq','abcd')         == 'qqcd'
  5243.   OVERLAY('qq','abcd',4)       == 'abcqq'
  5244.   OVERLAY('123','abc',5,6,'+') == 'abc+123+++'
  5245.  
  5246. Although E's OVERLAY procedure is similar to REXX's, they are not identical. E 
  5247. requires that each field be filled with a string, even if it is only a null 
  5248. string. REXX allows a field to be skipped. For example: 
  5249.  
  5250.   OVERLAY('qq',,5,6,'+')
  5251.  
  5252. This would be legal syntax in REXX, but would cause errors in E. The E 
  5253. equivalent would be: 
  5254.  
  5255.   OVERLAY('qq','',5,6,'+')
  5256.  
  5257.  
  5258. ΓòÉΓòÉΓòÉ 4.1.121. OVERLAYBLOCK ΓòÉΓòÉΓòÉ
  5259.  
  5260. Choose: 
  5261.  
  5262. o Syntax 
  5263. o Definition 
  5264. o E Language Syntax 
  5265.  
  5266.  
  5267. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5268.  
  5269. OVERLAYBLOCK | OVERLAY_BLOCK 
  5270.  
  5271.  
  5272. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5273.  
  5274. Copies marked text to cursor position without inserting, like standard Alt-O. 
  5275.  
  5276.  
  5277. ΓòÉΓòÉΓòÉ 4.1.122. PAGEDOWN ΓòÉΓòÉΓòÉ
  5278.  
  5279. Choose: 
  5280.  
  5281. o Syntax 
  5282. o Definition 
  5283. o E Language Syntax 
  5284.  
  5285.  
  5286. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5287.  
  5288. PAGEDOWN | PAGE_DOWN 
  5289.  
  5290.  
  5291. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5292.  
  5293. Moves cursor to next page of current file, like standard PgDn. 
  5294.  
  5295.  
  5296. ΓòÉΓòÉΓòÉ 4.1.123. PAGEUP ΓòÉΓòÉΓòÉ
  5297.  
  5298. Choose: 
  5299.  
  5300. o Syntax 
  5301. o Definition 
  5302. o E Language Syntax 
  5303.  
  5304.  
  5305. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5306.  
  5307. PAGEUP | PAGE_UP 
  5308.  
  5309.  
  5310. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5311.  
  5312. Moves cursor to previous page of current file, like standard PgUp. 
  5313.  
  5314.  
  5315. ΓòÉΓòÉΓòÉ 4.1.124. PARSE ΓòÉΓòÉΓòÉ
  5316.  
  5317. Choose: 
  5318.  
  5319. o Syntax 
  5320. o Definition 
  5321. o E Language Syntax 
  5322.  
  5323.  
  5324. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5325.  
  5326. See The Parse Statement. 
  5327.  
  5328.  
  5329. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5330.  
  5331. See The Parse Statement. 
  5332.  
  5333.  
  5334. ΓòÉΓòÉΓòÉ 4.1.125. PEEK(segment, offset, count) ΓòÉΓòÉΓòÉ
  5335.  
  5336. Choose: 
  5337.  
  5338. o Syntax 
  5339. o Definition 
  5340. o Example 
  5341. o E Language Syntax 
  5342.  
  5343.  
  5344. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5345.  
  5346. PEEK( segment ,  offset   ,  count ) 
  5347.  
  5348.  
  5349. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5350.  
  5351. Returns string of length count starting at the address  segment:offset.  The 
  5352. segment and offset values are used just as they are in assembler programs. See 
  5353. also POKE in the section Built-in Statement and Procedure Summary. 
  5354.  
  5355. A PEEK() call is often necessary to access the string pointed to by a pointer 
  5356. returned by a DYNALINK() function call. 
  5357.  
  5358.  
  5359. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5360.  
  5361. The following example of this type of usage is based on the procedure get_env() 
  5362. in DOSUTIL.E. 
  5363.  
  5364. seg_ptr = 1234       /* 4-byte place to put a far ptr   */
  5365. cmd_ptr = 1234
  5366. call dynalink('DOSCALLS',  /* dynamic link library name */
  5367.                '#91',       /* ordinal val for DOSGETENV */
  5368.                selector(seg_ptr) ||  /* ptr to env. seg   */
  5369.                offset(seg_ptr)   ||
  5370.                selector(cmd_ptr) || /* ptr to ofs after   */
  5371.                offset(cmd_ptr)    )/*  COMSPEC: unneeded */
  5372. env_seg = itoa(seg_ptr,10)
  5373. env_ofs = 0
  5374. start = env_ofs
  5375. do while peek(env_seg,env_ofs,1) /== \0
  5376.    env_ofs = env_ofs + 1
  5377. end
  5378. setting = peek(env_seg,start,env_ofs-start)
  5379.  
  5380. PEEK() allows us to determine where the end of the string is (marked by a null 
  5381. character: \0), and thereby determine the length of the string. 
  5382.  
  5383. WARNING: Attempts to PEEK to an area not owned by your process will cause a 
  5384. TRAP-D error. 
  5385.  
  5386.  
  5387. ΓòÉΓòÉΓòÉ 4.1.126. PEEK32(address, offset, count) ΓòÉΓòÉΓòÉ
  5388.  
  5389. Choose: 
  5390.  
  5391. o Syntax 
  5392. o Definition 
  5393. o E Language Syntax 
  5394.  
  5395.  
  5396. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5397.  
  5398. PEEK32( address ,  offset   ,  count ) 
  5399.  
  5400.  
  5401. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5402.  
  5403. Returns string of length count starting at the address address + offset. Like 
  5404. Peek, but takes a full 32-bit address instead of a selector as the first 
  5405. argument. See also POKE32 in the section Built-in Statement and Procedure 
  5406. Summary. 
  5407.  
  5408. WARNING: Attempts to PEEK32 to an area not owned by your process will cause a 
  5409. TRAP-D error. 
  5410.  
  5411.  
  5412. ΓòÉΓòÉΓòÉ 4.1.127. PEEKZ(segment, offset) ΓòÉΓòÉΓòÉ
  5413.  
  5414. Choose: 
  5415.  
  5416. o Syntax 
  5417. o Definition 
  5418. o Example 
  5419. o E Language Syntax 
  5420.  
  5421.  
  5422. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5423.  
  5424. PEEKZ( hexadecimal_address ) | PEEKZ( numeric_expression ,  numeric_expression 
  5425.  
  5426.  
  5427. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5428.  
  5429. Like PEEK, but for an ASCIIZ string. Returns the contents of storage starting 
  5430. with the address given and ending with the character before the next null 
  5431. character. 
  5432.  
  5433.  
  5434. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5435.  
  5436. This lets us simplify the PEEK example to: 
  5437.  
  5438. env_seg = itoa(seg_ptr,10)
  5439. setting = peekz(env_seg,0)
  5440.  
  5441. An alternate format supported is PEEKZ(address), where address is the 4-byte 
  5442. hex address of the storage. This is useful when calling an external routine 
  5443. that returns a far pointer to an ASCIIZ string. 
  5444.  
  5445.  
  5446. ΓòÉΓòÉΓòÉ 4.1.128. PEEKZ32(address, offset) ΓòÉΓòÉΓòÉ
  5447.  
  5448. New in EPM 6. 
  5449.  
  5450. Choose: 
  5451.  
  5452. o Syntax 
  5453. o Definition 
  5454. o E Language Syntax 
  5455.  
  5456.  
  5457. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5458.  
  5459. PEEKZ32( numeric_expression ,  numeric_expression ) 
  5460.  
  5461.  
  5462. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5463.  
  5464. Like PEEKZ, but takes a 32-bit address instead of a selector. 
  5465.  
  5466.  
  5467. ΓòÉΓòÉΓòÉ 4.1.129. POKE segment, offset, string ΓòÉΓòÉΓòÉ
  5468.  
  5469. Choose: 
  5470.  
  5471. o Syntax 
  5472. o Definition 
  5473. o Example 
  5474. o E Language Syntax 
  5475.  
  5476.  
  5477. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5478.  
  5479. POKE( segment , offset   ,  string ) 
  5480.  
  5481.  
  5482. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5483.  
  5484. Writes string to the address segment:offset. The segment and offset values are 
  5485. used just as they are in assembler programs. 
  5486.  
  5487. WARNING: Attempts to POKE to an area not owned by your process will cause a 
  5488. TRAP-D error and crash. 
  5489.  
  5490.  
  5491. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5492.  
  5493.     -- put greeting at beginning of segment.
  5494.     SelOfSharedSeg = itoa(Selector1, 10);
  5495.     poke SelOfSharedSeg , 0 , "Bonjour"\0;
  5496.  
  5497.  
  5498. ΓòÉΓòÉΓòÉ 4.1.130. POKE32 address, offset, string ΓòÉΓòÉΓòÉ
  5499.  
  5500. New in EPM 6. 
  5501.  
  5502. Choose: 
  5503.  
  5504. o Syntax 
  5505. o Definition 
  5506. o E Language Syntax 
  5507.  
  5508.  
  5509. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5510.  
  5511. POKE32( address , offset   ,  string ) 
  5512.  
  5513.  
  5514. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5515.  
  5516. Writes string to the address address + offset. Like Poke, but takes a full 
  5517. 32-bit address instead of a selector as the first argument. 
  5518.  
  5519. WARNING: Attempts to POKE32 to an area not owned by your process will cause a 
  5520. TRAP-D error and crash. 
  5521.  
  5522.  
  5523. ΓòÉΓòÉΓòÉ 4.1.131. POS(needle, haystack [,start [,flags]]) ΓòÉΓòÉΓòÉ
  5524.  
  5525. Choose: 
  5526.  
  5527. o Syntax 
  5528. o Definition 
  5529. o Example 
  5530. o E Language Syntax 
  5531.  
  5532.  
  5533. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5534.  
  5535. POS( needle,  haystack   [, start [, flags]] ) 
  5536.  
  5537.  
  5538. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5539.  
  5540. Returns the position of one string, needle, in another, haystack. (See also the 
  5541. LASTPOS function.)  If the string needle is not found, 0 is returned.  By 
  5542. default the search starts at the first character of haystack (that is, start is 
  5543. of the value 1).  This may be overridden by specifying start (which must be a 
  5544. positive whole number), the point at which to start the search. 
  5545.  
  5546. flags is allowed only in EPM version 6 and above.  It is used to indicate that 
  5547. an extended GREP search is desired.  (See The EPM User's Guide or the EPM 6 
  5548. online help for a description of extended GREP searching.) It can contain any 
  5549. combination of: 
  5550.  
  5551. X   Indicate that an eXtended GREP search is desired. 
  5552.  
  5553. G   Same as 'X'. 
  5554.  
  5555. M   Indicate that, if the EGREP search is successful, the result should contain 
  5556.     all the match columns rather than just the start column.  I.e., the result 
  5557.     will contain pairs of numbers, the first pair indicating the first and last 
  5558.     column of the entire matched string, and subsequent pairs indicating the 
  5559.     first and last columns which matched each parenthesized subexpression (in 
  5560.     the order in which the open parens were seen). 
  5561.  
  5562. P   Indicate that needle is a pointer to a pre-compiled EGREP program, rather 
  5563.     than an EGREP search string. 
  5564.  
  5565.  
  5566. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5567.  
  5568. POS('day', 'Saturday')       -->    6
  5569. POS('x', 'abc def ghi')      -->    0
  5570. POS(' ', 'abc def ghi')      -->    4
  5571. POS(' ', 'abc def ghi', 5)   -->    8
  5572. POS('a.*t', 'This is a test', 1, 'X')  -->    9
  5573.  
  5574. prog = '(q:a*) (:c)'  -- 11111112222222222333333333344444
  5575. ;            12345678901234567890123456789012345678901234
  5576. searchstr = 'The quick brown fox jumps over the lazy dog.'
  5577. res = pos(prog, searchstr, 1, 'XM')   -->   5 15 5 9 11 15
  5578.  
  5579. In the last example above, the EGREP search was matched by columns 5 to 15; the 
  5580. first parenthesized expression (matching a word starting with 'q') was matched 
  5581. in columns 5 to 9, and the second parenthesized expression (the following word) 
  5582. was matched in columns 11 to 15. 
  5583.  
  5584. prog = '(q:a*) (:c)'  -- 11111112222222222333333333344444
  5585. ;            12345678901234567890123456789012345678901234
  5586. searchstr = 'The quick brown fox jumps over the lazy dog.'
  5587. regprog = RegExpComp(prog)
  5588. res = pos(regprog, searchstr, 1, 'XMP')       -->   5 15 5 9 11 15
  5589. call dynalink32(E_DLL,         -- E_DLL is defined in STDCONST.E.
  5590.                 'myfree',      -- We must free the
  5591.                 atol(regprog)) -- program, when done with it.
  5592.  
  5593. The above example is just like the previous one, except that the EGREP search 
  5594. is precompiled.  In actual use, this would only be done when repeated searches 
  5595. are being done in a loop, in order to avoid the overhead of compiling the EGREP 
  5596. search on every call to POS() (or to LASTPOS() ). 
  5597.  
  5598. See also: 
  5599.  
  5600. o LastPos function 
  5601. o RegExpComp function, to pre-compile an EGREP program 
  5602. o RegExpExec function, to execute a pre-compiled EGREP program 
  5603.  
  5604.  
  5605. ΓòÉΓòÉΓòÉ 4.1.132. PREVFILE ΓòÉΓòÉΓòÉ
  5606.  
  5607. Choose: 
  5608.  
  5609. o Syntax 
  5610. o Definition 
  5611. o E Language Syntax 
  5612.  
  5613.  
  5614. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5615.  
  5616. PREVFILE | PREV_FILE 
  5617.  
  5618.  
  5619. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5620.  
  5621. Activates the previous file in the active ring, like the standard Alt-F11 or 
  5622. Ctrl-P key combinations. 
  5623.  
  5624.  
  5625. ΓòÉΓòÉΓòÉ 4.1.133. QPRINT ΓòÉΓòÉΓòÉ
  5626.  
  5627. Choose: 
  5628.  
  5629. o Syntax 
  5630. o Definition 
  5631. o E Language Syntax 
  5632.  
  5633.  
  5634. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5635.  
  5636. QPRINT printername 
  5637.  
  5638.  
  5639. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5640.  
  5641. Performs a WYSIWYG print of the current file to the print queue associated with 
  5642. the named printer. 
  5643.  
  5644.  
  5645. ΓòÉΓòÉΓòÉ 4.1.134. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  5646.  
  5647. Choose: 
  5648.  
  5649. o Syntax 
  5650. o Definition 
  5651. o Example 
  5652. o E Language Syntax 
  5653.  
  5654.  
  5655. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5656.  
  5657. QUERYACCELSTRING (table_name, id) 
  5658.  
  5659.  
  5660. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5661.  
  5662. Returns the string associated with identifier 'id' in the accelerator table 
  5663. named 'table_name'. 
  5664.  
  5665.  
  5666. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5667.  
  5668.       accelstr=queryaccelstring(activeaccel, menuid)
  5669.       if accelstr <> '' then
  5670.          sayerror 'menu id' menuid 'would execute command' accelstr
  5671.       endif
  5672.  
  5673. See also: 
  5674.  
  5675. o Building Accelerator Tables from the Macro Language 
  5676. o QUERYACCELSTRING 
  5677. o BUILDACCELTABLE 
  5678. o DELETEACCEL 
  5679.  
  5680.  
  5681. ΓòÉΓòÉΓòÉ 4.1.135. QUERY_ATTRIBUTE var class, var value, var ispush, offset, column, line [, fileid] ΓòÉΓòÉΓòÉ
  5682.  
  5683. Choose: 
  5684.  
  5685. o Syntax 
  5686. o Definition 
  5687. o E Language Syntax 
  5688.  
  5689.  
  5690. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5691.  
  5692. QUERY_ATTRIBUTE class, value, ispush, offset, column, line [, fileid] 
  5693.  
  5694.  
  5695. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5696.  
  5697. This statement allows a macro program to deterine what attribute record can be 
  5698. found at the specified location. 
  5699.  
  5700. Class   returns the class of the found attribute record.  A value of zero is 
  5701.         returned if no attribute was found.  A value between 1 and 63 is 
  5702.         returned if an internally supported attribute record was found.  A 
  5703.         value from 64 to 255 is returned if an application supported attribute 
  5704.         record was found.  The meaning of an application supported attribute 
  5705.         record is not predictable at compile time.  Some administrative macros 
  5706.         will be provided for determining the meaning of a macro during runtime. 
  5707.  
  5708. Value   returns the value of the found attribute record.  Its value is 
  5709.         unchanged if no attribute record was found at the specified location. 
  5710.  
  5711. IsPush  returns the value of the support field of the found attribute.  This 
  5712.         parameter's value is unchanged if no attribute record was found at the 
  5713.         specified location. 
  5714.  
  5715. Offset  The offset of the position being queried.  Must be a negative value, 
  5716.         indicating a position before the specified character location. 
  5717.  
  5718. Column  The column number of the position being queried. 
  5719.  
  5720. Line    The line number of the position being queried. 
  5721.  
  5722. FileID  The fileid of the position being queried.  If unspecified, the current 
  5723.         file will be assumed. 
  5724.  
  5725. See Attribute Pairs for additional information on attributes. 
  5726.  
  5727.  
  5728. ΓòÉΓòÉΓòÉ 4.1.136. QUERYFONT ΓòÉΓòÉΓòÉ
  5729.  
  5730. Choose: 
  5731.  
  5732. o Syntax 
  5733. o Definition 
  5734. o E Language Syntax 
  5735.  
  5736.  
  5737. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5738.  
  5739. QUERYFONT (font_id) 
  5740.  
  5741.  
  5742. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5743.  
  5744. Returns the font description associated with font_id, in the form 
  5745. fontname.fontsize.fontsel - e.g. 
  5746.  
  5747.    Courier.DD100WW9HH8BB.0
  5748.    Times New Roman.DD240WW0HH0.0
  5749. In fontsize, the numbers following DD are the size of the font in decipoints 
  5750. for a proportional font, and the numbers following WW and HH are the width and 
  5751. height of the font in pixels for a monospaced font.  The BB is present at the 
  5752. end if the font is a bitmapped font.  'fontsel' is any combination of 
  5753.  
  5754.   1 = Italic
  5755.   2 = Underscore
  5756.   8 = Outline
  5757.  16 = Strikeout
  5758.  32 = Bold
  5759.  
  5760.  
  5761. ΓòÉΓòÉΓòÉ 4.1.137. QUERYMENUSTRING(menuname, id) ΓòÉΓòÉΓòÉ
  5762.  
  5763. Choose: 
  5764.  
  5765. o Syntax 
  5766. o Definition 
  5767. o E Language Syntax 
  5768.  
  5769.  
  5770. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5771.  
  5772. QUERYMENUSTRING( menuname , id ) 
  5773.  
  5774.  
  5775. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5776.  
  5777. Determines the command to be executed by the menu specified by the menuname and 
  5778. by id. See Building Menus from the Macro Language for more information on the 
  5779. QUERYMENUSTRING statement. 
  5780.  
  5781.  
  5782. ΓòÉΓòÉΓòÉ 4.1.138. QUERYPROFILE(application, key_name) ΓòÉΓòÉΓòÉ
  5783.  
  5784. Choose: 
  5785.  
  5786. o Syntax 
  5787. o Definition 
  5788. o E Language Syntax 
  5789.  
  5790.  
  5791. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5792.  
  5793. QUERYPROFILE( file_handle, application , key_name ) 
  5794.  
  5795.  
  5796. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5797.  
  5798. Returns the value for key key_name listed under the application application, 
  5799. found in the .INI file given by the file_handle or the null string if not 
  5800. found.  file_handle. can be any of 
  5801.  
  5802. HINI_USERPROFILE (a constant)  Indicates the user profile (OS2.INI) should be 
  5803.           used. 
  5804.  
  5805. HINI_SYSTEMPROFILE (a constant)  Indicates the system profile (OS2SYS.INI) 
  5806.           should be used. 
  5807.  
  5808. HINI_PROFILE (a constant)  Indicates that both the user and system profiles 
  5809.           should be searched. 
  5810.  
  5811. APP_HINI  (a universal variable)  Indicates that the application profile should 
  5812.           be used.  For EPM, this is EPM.INI.  Other users of the E Toolkit can 
  5813.           have other application profiles. 
  5814.  
  5815.  
  5816. ΓòÉΓòÉΓòÉ 4.1.139. QUIETSHELL  string_expression ΓòÉΓòÉΓòÉ
  5817.  
  5818. Choose: 
  5819.  
  5820. o Syntax 
  5821. o Definition 
  5822. o Example 
  5823. o E Language Syntax 
  5824.  
  5825.  
  5826. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5827.  
  5828. QUIETSHELL | QUIET_SHELL string_expression 
  5829.  
  5830.  
  5831. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5832.  
  5833. Executes string_expression. string_expression is to be an OS/2 command. If 
  5834. string_expression is an external program, the screen and cursor are not touched 
  5835. before or after the program is executed. 
  5836.  
  5837.  
  5838. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5839.  
  5840. Use this when you know the external program will not write to the screen, and 
  5841. you prefer not to see the screen clear and to be asked to press a key. Normally 
  5842. this is used to keep redirected utilities invisible, for example quietshell 
  5843. "subdir *.* >etemp". 
  5844.  
  5845. If the command DOES write to the screen, say after an unexpected error, its 
  5846. message will appear on top of E's text screen. The text will appear messy until 
  5847. the next time E refreshes the screen.  You can manually force a screen refresh 
  5848. by pressing ESC a couple of times. 
  5849.  
  5850. Another example is quietshell "mc2", which runs Richard Redpath's MC2 
  5851. calculator. This is an unusual example because MC2 does write to the screen, 
  5852. but it takes responsibility for restoring the screen contents it found. The 
  5853. effect is that of a pop-up calculator on top of the text screen. 
  5854.  
  5855.  
  5856. ΓòÉΓòÉΓòÉ 4.1.140. REFLOW ΓòÉΓòÉΓòÉ
  5857.  
  5858. Choose: 
  5859.  
  5860. o Syntax 
  5861. o Definition 
  5862. o E Language Syntax 
  5863.  
  5864.  
  5865. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5866.  
  5867. REFLOW 
  5868.  
  5869.  
  5870. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5871.  
  5872. Reformats marked text using current margin settings, like the standard Alt-P. 
  5873.  
  5874.  
  5875. ΓòÉΓòÉΓòÉ 4.1.141. REFRESH ΓòÉΓòÉΓòÉ
  5876.  
  5877. Choose: 
  5878.  
  5879. o Syntax 
  5880. o Definition 
  5881. o E Language Syntax 
  5882.  
  5883.  
  5884. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5885.  
  5886. REFRESH 
  5887.  
  5888.  
  5889. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5890.  
  5891. Activates the active file in the top level ring. Activates the top level ring 
  5892. and updates portions of screen which need to be updated. 
  5893.  
  5894.  
  5895. ΓòÉΓòÉΓòÉ 4.1.142. REGEXPCOMP(grep_string) ΓòÉΓòÉΓòÉ
  5896.  
  5897. New in EPM 6.02. 
  5898.  
  5899. Choose: 
  5900.  
  5901. o Syntax 
  5902. o Definition 
  5903. o Example 
  5904. o E Language Syntax 
  5905.  
  5906.  
  5907. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5908.  
  5909. REGEXPCOMP( grep_string ) 
  5910.  
  5911.  
  5912. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5913.  
  5914. Compiles the extended GREP search string into an EGREP program, and returns a 
  5915. pointer to that program. 
  5916.  
  5917.  
  5918. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5919.  
  5920. regprog = RegExpComp('Dos(Alloc|Free)~Seg')
  5921.  
  5922. See also: 
  5923.  
  5924. o Pos function 
  5925. o RegExpExec function, to execute a pre-compiled EGREP program 
  5926.  
  5927.  
  5928. ΓòÉΓòÉΓòÉ 4.1.143. REGEXPEXEC(grep_prog, search_string) ΓòÉΓòÉΓòÉ
  5929.  
  5930. New in EPM 6.02. 
  5931.  
  5932. Choose: 
  5933.  
  5934. o Syntax 
  5935. o Definition 
  5936. o Example 
  5937. o E Language Syntax 
  5938.  
  5939.  
  5940. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5941.  
  5942. REGEXPEXEC( grep_program search_string ) 
  5943.  
  5944.  
  5945. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5946.  
  5947. Searches the search string using the EGREP program, and returns the starting 
  5948. position of a successful match, or 0 if no match could be found. 
  5949.  
  5950.  
  5951. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5952.  
  5953. regprog = RegExpComp('Dos(Alloc|Free)~Seg')
  5954. result = RegExpExec(regprog, textline(.line))
  5955. if result then
  5956.    sayerror 'Found at' substr(textline(.line), result)
  5957. else
  5958.    sayerror 'Not found.'
  5959. endif
  5960. call dynalink32(E_DLL,         -- E_DLL is defined in STDCONST.E.
  5961.                 'myfree',      -- We must free the
  5962.                 atol(regprog)) -- program, when done with it.
  5963.  
  5964. See also: 
  5965.  
  5966. o Pos function 
  5967. o RegExpComp function, to pre-compile an EGREP program 
  5968.  
  5969.  
  5970. ΓòÉΓòÉΓòÉ 4.1.144. REGISTERFONT ΓòÉΓòÉΓòÉ
  5971.  
  5972. Choose: 
  5973.  
  5974. o Syntax 
  5975. o Definition 
  5976. o Example 
  5977. o E Language Syntax 
  5978.  
  5979.  
  5980. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5981.  
  5982. REGISTERFONT (fontname, fontsize,fontsel) 
  5983.  
  5984.  
  5985. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5986.  
  5987. Loads the font specified and returns an identifier that can be set in the .font 
  5988. field or which can be used as the value of a font attribute. 
  5989.  
  5990. 'fontsel' is any combination of 
  5991.  
  5992.   1 = Italic
  5993.   2 = Underscore
  5994.   8 = Outline
  5995.  16 = Strikeout
  5996.  32 = Bold
  5997.  
  5998.  
  5999. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6000.  
  6001. Examples: 
  6002.  
  6003.   .font = registerfont('Times New Roman', 24, 0)  -- Set a 24-point font.
  6004.   .font = registerfont('System Monospaced','WW8HH16',0)  -- 8 x 16 font
  6005.  
  6006.  
  6007. ΓòÉΓòÉΓòÉ 4.1.145. RELINK ΓòÉΓòÉΓòÉ
  6008.  
  6009. Choose: 
  6010.  
  6011. o Syntax 
  6012. o Definition 
  6013. o E Language Syntax 
  6014.  
  6015.  
  6016. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6017.  
  6018. Is described in section Linkable External Modules. 
  6019.  
  6020.  
  6021. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6022.  
  6023. Is described in section Linkable External Modules. 
  6024.  
  6025.  
  6026. ΓòÉΓòÉΓòÉ 4.1.146. REPEATFIND ΓòÉΓòÉΓòÉ
  6027.  
  6028. Choose: 
  6029.  
  6030. o Syntax 
  6031. o Definition 
  6032. o E Language Syntax 
  6033.  
  6034.  
  6035. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6036.  
  6037. REPEATFIND | REPEAT_FIND 
  6038.  
  6039.  
  6040. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6041.  
  6042. Repeats find of last string searched, like the standard Ctrl-F. The previous 
  6043. search options are preserved. (Note: If the cursor is currently at the 
  6044. beginning of a target search string, it skips to the next occurrence.) 
  6045.  
  6046.  
  6047. ΓòÉΓòÉΓòÉ 4.1.147. REPLACELINE new_line  [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  6048.  
  6049. Choose: 
  6050.  
  6051. o Syntax 
  6052. o Definition 
  6053. o Example 
  6054. o E Language Syntax 
  6055.  
  6056.  
  6057. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6058.  
  6059. REPLACELINE new_line [, {;} line_number   [, {;} fileid] ] 
  6060.  
  6061.  
  6062. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6063.  
  6064. Replaces a specified line in the specified file with the contents of variable 
  6065. new_line Defaulted values for omitted parameters are line_number = current 
  6066. line, and fileid = current file. See example under GETLINE. 
  6067.  
  6068.  
  6069. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6070.  
  6071. For example: 
  6072.  
  6073. REPLACELINE line
  6074. /* Replaces current line of current file with line */
  6075.  
  6076. REPLACELINE  line, 7
  6077. /* Replaces line 7 of current file with line */
  6078.  
  6079. REPLACELINE  line, 3, ThatFile
  6080. /* Replace line 3 of file whose fileid
  6081.      is in variable ThatFile with line */
  6082.  
  6083.  
  6084. ΓòÉΓòÉΓòÉ 4.1.148. RETURN [expression] ΓòÉΓòÉΓòÉ
  6085.  
  6086. Choose: 
  6087.  
  6088. o Syntax 
  6089. o Definition 
  6090. o E Language Syntax 
  6091.  
  6092.  
  6093. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6094.  
  6095. RETURN [expression] 
  6096.  
  6097.  
  6098. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6099.  
  6100. Returns expression to caller. If no expression is supplied, a null value is 
  6101. returned to the caller. From a procedure, the returned value is passed back to 
  6102. the caller as a function value (as in x=myproc()). From a command the returned 
  6103. value is assigned to RC. 
  6104.  
  6105. When returning from a key (DEF), an expression is not allowed.  A return from a 
  6106. key DEF is unusual, since keys do not return values, but a return is sometimes 
  6107. used as an easy early exit from a key's program. A return is better than a STOP 
  6108. in case some other procedure was "calling" the key with an executekey; a STOP 
  6109. prevents the caller from regaining control. 
  6110.  
  6111.  
  6112. ΓòÉΓòÉΓòÉ 4.1.149. REVERSE(string) ΓòÉΓòÉΓòÉ
  6113.  
  6114. Choose: 
  6115.  
  6116. o Syntax 
  6117. o Definition 
  6118. o Example 
  6119. o E Language Syntax 
  6120.  
  6121.  
  6122. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6123.  
  6124. REVERSE( string_expression ) 
  6125.  
  6126.  
  6127. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6128.  
  6129. Returns the reverse of the string string. 
  6130.  
  6131.  
  6132. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6133.  
  6134. Here are some examples: 
  6135.  
  6136.     REVERSE('BACKWORDS') --> 'SDROWKCAB'
  6137.     REVERSE('seluR MPE') --> 'EPM Rules'
  6138.  
  6139.  
  6140. ΓòÉΓòÉΓòÉ 4.1.150. RIGHT ΓòÉΓòÉΓòÉ
  6141.  
  6142. Choose: 
  6143.  
  6144. o Syntax 
  6145. o Definition 
  6146. o E Language Syntax 
  6147.  
  6148.  
  6149. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6150.  
  6151. RIGHT 
  6152.  
  6153.  
  6154. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6155.  
  6156. Moves cursor one character to the right, like the standard key Right. 
  6157.  
  6158.  
  6159. ΓòÉΓòÉΓòÉ 4.1.151. RIGHTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  6160.  
  6161. Choose: 
  6162.  
  6163. o Syntax 
  6164. o Definition 
  6165. o Example 
  6166. o E Language Syntax 
  6167.  
  6168.  
  6169. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6170.  
  6171. RIGHTSTR( string,  length   [, pad] ) 
  6172.  
  6173.  
  6174. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6175.  
  6176. Returns a string of length length containing the right-most length characters 
  6177. of string. That is, padded with pad characters (or truncated) on the left as 
  6178. needed. The default pad character is a blank. length must be non-negative. 
  6179.  
  6180.  
  6181. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6182.  
  6183. Here are some examples: 
  6184.  
  6185.     RIGHTSTR('abc  d',8)   -->  '  abc  d'
  6186.     RIGHTSTR('abc def',5)  -->  'c def'
  6187.     RIGHTSTR('12',5,'0')   -->  '00012'
  6188.  
  6189.  
  6190. ΓòÉΓòÉΓòÉ 4.1.152. RUBOUT ΓòÉΓòÉΓòÉ
  6191.  
  6192. Choose: 
  6193.  
  6194. o Syntax 
  6195. o Definition 
  6196. o E Language Syntax 
  6197.  
  6198.  
  6199. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6200.  
  6201. RUBOUT 
  6202.  
  6203.  
  6204. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6205.  
  6206. Deletes character to left of cursor, like the standard key Backspace. 
  6207.  
  6208.  
  6209. ΓòÉΓòÉΓòÉ 4.1.153. SAYAT string, row, column, attribute [,length][,window] ΓòÉΓòÉΓòÉ
  6210.  
  6211. Choose: 
  6212.  
  6213. o Syntax 
  6214. o Definition 
  6215. o Example 
  6216. o E Language Syntax 
  6217.  
  6218.  
  6219. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6220.  
  6221. SAYAT string, row, column,   attribute [, length] 
  6222.  
  6223.  
  6224. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6225.  
  6226. Writes string at the screen location specified by row (any number included in 
  6227. 1..screenheight()) and column (any number included in 1..screenwidth()). The 
  6228. parameter attribute allows you to specify any screen attribute (0..255 or any 
  6229. constant color value listed in COLORS.e) to highlight string. If length is 
  6230. omitted, E assumes length = LENGTH(string). If length < LENGTH(string), E 
  6231. writes the first length number of characters. If length > LENGTH(string), E 
  6232. changes the screen attribute to attribute for the last length - LENGTH(string) 
  6233. number of character positions without changing the text. 
  6234.  
  6235. The window option defines which text window area should be written to by the 
  6236. SAYAT statement. 0=Edit Window, 1=Extra window. The extra window is the window 
  6237. that makes up the status line and message line. The edit window is everything 
  6238. else. 
  6239.  
  6240.  
  6241. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6242.  
  6243. Examples:
  6244.  
  6245. /* write red string in upper right corner */
  6246. sayat 'mymessage', 1, 70, RED
  6247.  
  6248. /* change screen positions (10,20) to (10,24)
  6249.    to green color without changing text */
  6250. sayat '', 10, 20, GREEN, 5
  6251.  
  6252. To put a message to the message line, use the MESSAGE() defproc. 
  6253.  
  6254. Note:  that something printed with the SAYAT statement only stays on the screen 
  6255. until a screen refresh is done. Since a SAYERROR call produces a screen 
  6256. refresh, combining these two statements: 
  6257.  
  6258.   sayat 'My Procedure.', 12, 20, GREEN, 5
  6259.   sayerror "File not found!"
  6260. will result in the SAYAT message never being seen. To prevent this, you can use 
  6261. the DISPLAY statement to stop screen refreshing, for example: 
  6262.  
  6263. display -1              -- turn off display updating
  6264.   sayat 'My Procedure.', 12, 20 ,GREEN, 5
  6265.   sayerror "File not found!"
  6266. display +1              -- turn on display updating
  6267. In this way, the screen will not be refreshed (and therefore the message will 
  6268. stay on the screen) until the next screen update. 
  6269.  
  6270.  
  6271. ΓòÉΓòÉΓòÉ 4.1.154. SAYERROR expression ΓòÉΓòÉΓòÉ
  6272.  
  6273. Choose: 
  6274.  
  6275. o Syntax 
  6276. o Definition 
  6277. o Example 
  6278. o E Language Syntax 
  6279.  
  6280.  
  6281. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6282.  
  6283. SAYERROR( expression ) 
  6284.  
  6285.  
  6286. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6287.  
  6288. Should not be confused with the built-in procedure SAYERROR() described in this 
  6289. section. 
  6290.  
  6291. If expression is the number 0 or 1, any pending error messages are discarded 
  6292. and not displayed. 0 will refresh the screen; 1 will not. 
  6293.  
  6294. If expression is any number other than 0 or 1, `the interpreter displays the 
  6295. string corresponding to that numbered error message.  Error messages and their 
  6296. corresponding return codes are listed in the section Return Codes. 
  6297.  
  6298. Each command in the E language returns a code which indicates any errors that 
  6299. were encountered while trying to perform the command.  Each of these return 
  6300. codes has a corresponding string which explains the error. 
  6301.  
  6302.  
  6303. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6304.  
  6305. For example: 
  6306.  
  6307.   sayerror -275
  6308.  
  6309. This will display the text "Missing filename" on the message line. 
  6310.  
  6311. If expression is a number which does not correspond to a return code, an 
  6312. "ERROR: Message not available" message is printed on the message line. 
  6313.  
  6314. If expression is anything other than a number, the text will be displayed on 
  6315. the message line. For example: 
  6316.  
  6317.   err1 = "-275"   -- remember everything is a string
  6318.   sayerror err1   --  equivalent to: err1 = -275
  6319.  
  6320.   err2 = "David"
  6321.   sayerror err2
  6322.  
  6323. The first example will display the error message (not "-275") on the message 
  6324. line. The second example will display the text David on the message line. 
  6325.  
  6326. A combination of text and numbers will act as if it were all text. For example: 
  6327.  
  6328.    sayerror "The error message was " err1
  6329.  
  6330. The intention to display all text would not work in this case. Instead the user 
  6331. would get: 
  6332.  
  6333.   The error message was -275
  6334.  
  6335. The error code did not get translated. 
  6336.  
  6337. To help clarify this explanation, try entering and compiling the following 
  6338. defc: 
  6339.  
  6340.   defc mytest
  6341.     sayerror arg(1)
  6342.  
  6343. Then experiment by typing in the command line dialog box mytest followed by 
  6344. valid error numbers, invalid error numbers, text, and text with numbers to 
  6345. determine what will happen. 
  6346.  
  6347.  
  6348. ΓòÉΓòÉΓòÉ 4.1.155. SAYERROR(error_string) ΓòÉΓòÉΓòÉ
  6349.  
  6350. Choose: 
  6351.  
  6352. o Syntax 
  6353. o Definition 
  6354. o Example 
  6355. o E Language Syntax 
  6356.  
  6357.  
  6358. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6359.  
  6360. SAYERROR expression 
  6361.  
  6362.  
  6363. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6364.  
  6365. Returns the return code specified by error_string. Note that this is only true 
  6366. if the sayerror procedure acts as a function and returns a return code. If the 
  6367. SAYERROR() procedure is not assigned and not used in a comparison, then the 
  6368. procedure acts the same as the SAYERROR statement (also described in this 
  6369. section). 
  6370.  
  6371.  
  6372. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6373.  
  6374. For example: 
  6375.  
  6376.   x = sayerror("new file")
  6377.   sayerror("new file")
  6378.  
  6379. The first example will put the return code for new file (ie. -282) into the 
  6380. variable x. The second example will act in the same manner as a SAYERROR 
  6381. statement and would display the words "new file" on the message line. 
  6382.  
  6383.  The case of error_string does not matter. The compiler will convert 
  6384. error_string to uppercase and then perform the lookup for error_string. The 
  6385. compiler reduces sayerror(error_string) to a constant for efficiency. 
  6386. Therefore, if the words new file were changed to gobbildy gook (not a valid 
  6387. error message), the compiler would not compile and return an "invalid 
  6388. parameter" error message. 
  6389.  
  6390. The most common usage of this is to test an return code to see if a certain 
  6391. error occurred. For example: 
  6392.  
  6393.      'e myfile'
  6394.      if rc=sayerror("new file") then
  6395. All error messages and their corresponding RC code numbers can be found in 
  6396. Return Codes. 
  6397.  
  6398.  
  6399. ΓòÉΓòÉΓòÉ 4.1.156. SAYERRORTEXT(rc) ΓòÉΓòÉΓòÉ
  6400.  
  6401. Choose: 
  6402.  
  6403. o Syntax 
  6404. o Definition 
  6405. o E Language Syntax 
  6406.  
  6407.  
  6408. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6409.  
  6410. SAYERRORTEXT'(' numeric_expression ')' 
  6411.  
  6412.  
  6413. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6414.  
  6415. Returns the message that would be displayed for error code rc. 
  6416.  
  6417.  
  6418. ΓòÉΓòÉΓòÉ 4.1.157. SCREENHEIGHT() ΓòÉΓòÉΓòÉ
  6419.  
  6420. Choose: 
  6421.  
  6422. o Syntax 
  6423. o Definition 
  6424. o E Language Syntax 
  6425.  
  6426.  
  6427. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6428.  
  6429. SCREENHEIGHT() 
  6430.  
  6431.  
  6432. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6433.  
  6434. Returns physical screenheight, usually 25. 
  6435.  
  6436.  
  6437. ΓòÉΓòÉΓòÉ 4.1.158. SCREENWIDTH() ΓòÉΓòÉΓòÉ
  6438.  
  6439. Choose: 
  6440.  
  6441. o Syntax 
  6442. o Definition 
  6443. o E Language Syntax 
  6444.  
  6445.  
  6446. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6447.  
  6448. SCREENWIDTH() 
  6449.  
  6450.  
  6451. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6452.  
  6453. Returns physical screenwidth, usually 80. 
  6454.  
  6455.  
  6456. ΓòÉΓòÉΓòÉ 4.1.159. SEG(variable) ΓòÉΓòÉΓòÉ
  6457.  
  6458. Choose: 
  6459.  
  6460. o Syntax 
  6461. o Definition 
  6462. o Example 
  6463. o E Language Syntax 
  6464.  
  6465.  
  6466. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6467.  
  6468. SEG( variable ) 
  6469.  
  6470.  
  6471. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6472.  
  6473. Returns a string representation of the segment of the actual memory address of 
  6474. variable. 
  6475.  
  6476.  
  6477. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6478.  
  6479. For example:
  6480.  
  6481.     v = 'testing'
  6482.     sayerror peek( seg(v), ofs(v), 7 )
  6483.  
  6484. The above example prints testing. See also OFS(). 
  6485.  
  6486.  
  6487. ΓòÉΓòÉΓòÉ 4.1.160. SELECTOR(variable) ΓòÉΓòÉΓòÉ
  6488.  
  6489. Choose: 
  6490.  
  6491. o Syntax 
  6492. o Definition 
  6493. o E Language Syntax 
  6494.  
  6495.  
  6496. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6497.  
  6498. SELECTOR( variable ) 
  6499.  
  6500.  
  6501. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6502.  
  6503. Returns the segment address of variable in the form of a binary word. To be 
  6504. used with C functions, like those made via DYNALINK(). 
  6505.  
  6506. This function it is to be used only during the protected mode execution. 
  6507.  
  6508.  
  6509. ΓòÉΓòÉΓòÉ 4.1.161. SETMARK ΓòÉΓòÉΓòÉ
  6510.  
  6511. Choose: 
  6512.  
  6513. o Syntax 
  6514. o Definition 
  6515. o E Language Syntax 
  6516.  
  6517.  
  6518. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6519.  
  6520. SETMARK firstline, lastline, firstcol, lastcol, marktype, fileid 
  6521.  
  6522.  
  6523. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6524.  
  6525. Sets a mark in file 'fileid' from firstline firstcol to lastline lastcol. 
  6526. marktype must be one of: 
  6527.  
  6528.  0 = line mark
  6529.  1 = char mark
  6530.  2 = block mark
  6531.  3 = charg mark
  6532.  4 = blockg mark
  6533.  
  6534.  
  6535. ΓòÉΓòÉΓòÉ 4.1.162. SETPROFILE(handle, application, key_name, data) ΓòÉΓòÉΓòÉ
  6536.  
  6537. Choose: 
  6538.  
  6539. o Syntax 
  6540. o Definition 
  6541. o E Language Syntax 
  6542.  
  6543.  
  6544. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6545.  
  6546. SETPROFILE( numeric_expression, string_expression, string_expression, 
  6547. string_expression ) 
  6548.  
  6549.  
  6550. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6551.  
  6552. Sets the value for key key_name listed under the application application to 
  6553. data in the .INI file represented by  handle.  handle. can be any of 
  6554.  
  6555. HINI_USERPROFILE (a constant)  Indicates the user profile (OS2.INI) should be 
  6556.           used. 
  6557.  
  6558. HINI_SYSTEMPROFILE (a constant)  Indicates the system profile (OS2SYS.INI) 
  6559.           should be used. 
  6560.  
  6561. HINI_PROFILE (a constant)  Indicates that both the user and system profiles 
  6562.           should be searched. 
  6563.  
  6564. APP_HINI  (a universal variable)  Indicates that the application profile should 
  6565.           be used.  For EPM, this is EPM.INI.  Other users of the E Toolkit can 
  6566.           have other application profiles. 
  6567.  
  6568.  
  6569. ΓòÉΓòÉΓòÉ 4.1.163. SETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  6570.  
  6571. Choose: 
  6572.  
  6573. o Syntax 
  6574. o Definition 
  6575. o Example 
  6576. o E Language Syntax 
  6577.  
  6578.  
  6579. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6580.  
  6581. SETSEARCH identifier 
  6582.  
  6583.  
  6584. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6585.  
  6586. Retrieves the search command string saved in the variable search_cmd via a 
  6587. GETSEARCH statement. These two statements allow the user to save a search 
  6588. command, perform other searches and then retrieve the original command, so that 
  6589. Ctrl-F's and REPEATFIND statements refer to the original search pattern. 
  6590.  
  6591.  
  6592. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6593.  
  6594. For example: 
  6595.  
  6596.    'xcom L /foobar/c'
  6597.    GETSEARCH search_command
  6598.    'L /word'
  6599.    SETSEARCH search_command
  6600. The first statement in the above example issues a search command. The GETSEARCH 
  6601. statement effectively sets the variable search_command to 'xcom L/foobar/c'. 
  6602. Then another search command is issued, wiping out the first search command, but 
  6603. the SETSEARCH statement restores the first command, so that if a Ctrl-F 
  6604. (REPEAT_FIND) is now executed, the string foobar will be once again located. 
  6605.  
  6606.  
  6607. ΓòÉΓòÉΓòÉ 4.1.164. SHIFTLEFT ΓòÉΓòÉΓòÉ
  6608.  
  6609. Choose: 
  6610.  
  6611. o Syntax 
  6612. o Definition 
  6613. o E Language Syntax 
  6614.  
  6615.  
  6616. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6617.  
  6618. SHIFTLEFT | SHIFT_LEFT 
  6619.  
  6620.  
  6621. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6622.  
  6623. Shifts marked text 1 position to left, like the standard Ctrl-F7. 
  6624.  
  6625.  
  6626. ΓòÉΓòÉΓòÉ 4.1.165. SHIFTRIGHT ΓòÉΓòÉΓòÉ
  6627.  
  6628. Choose: 
  6629.  
  6630. o Syntax 
  6631. o Definition 
  6632. o E Language Syntax 
  6633.  
  6634.  
  6635. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6636.  
  6637. SHIFTRIGHT | SHIFT_RIGHT 
  6638.  
  6639.  
  6640. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6641.  
  6642. Shifts marked text 1 position to right, like the standard Ctrl-F8. 
  6643.  
  6644.  
  6645. ΓòÉΓòÉΓòÉ 4.1.166. SHOWMENU ΓòÉΓòÉΓòÉ
  6646.  
  6647. Choose: 
  6648.  
  6649. o Syntax 
  6650. o Definition 
  6651. o E Language Syntax 
  6652.  
  6653.  
  6654. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6655.  
  6656. SHOWMENU 
  6657.  
  6658.  
  6659. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6660.  
  6661. Displays a menu after it has been built. See the section Building Menus from 
  6662. the Macro Language for more information on the SHOWMENU statement. 
  6663.  
  6664.  
  6665. ΓòÉΓòÉΓòÉ 4.1.167. SPLIT ΓòÉΓòÉΓòÉ
  6666.  
  6667. Choose: 
  6668.  
  6669. o Syntax 
  6670. o Definition 
  6671. o E Language Syntax 
  6672.  
  6673.  
  6674. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6675.  
  6676. SPLIT 
  6677.  
  6678.  
  6679. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6680.  
  6681. Splits current line at cursor position, like the standard Alt-S. 
  6682.  
  6683.  
  6684. ΓòÉΓòÉΓòÉ 4.1.168. STOP ΓòÉΓòÉΓòÉ
  6685.  
  6686. Choose: 
  6687.  
  6688. o Syntax 
  6689. o Definition 
  6690. o E Language Syntax 
  6691.  
  6692.  
  6693. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6694.  
  6695. STOP 
  6696.  
  6697.  
  6698. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6699.  
  6700. Stops execution of interpreter. A RETURN statement returns control to any 
  6701. calling procedures, however the STOP statement ends the execution immediately. 
  6702. RETURN is the preferred means of exiting a procedure, however, STOP is useful 
  6703. for terminating execution on a critical error. 
  6704.  
  6705.  
  6706. ΓòÉΓòÉΓòÉ 4.1.169. STOPONRC ΓòÉΓòÉΓòÉ
  6707.  
  6708. Choose: 
  6709.  
  6710. o Syntax 
  6711. o Definition 
  6712. o E Language Syntax 
  6713.  
  6714.  
  6715. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6716.  
  6717. STOPONRC | STOP_ON_RC 
  6718.  
  6719.  
  6720. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6721.  
  6722. Stops execution of interpreter only if rc is non-zero. 
  6723.  
  6724.  
  6725. ΓòÉΓòÉΓòÉ 4.1.170. STRIP(string [,option] [,char]) ΓòÉΓòÉΓòÉ
  6726.  
  6727. Choose: 
  6728.  
  6729. o Syntax 
  6730. o Definition 
  6731. o Example 
  6732. o E Language Syntax 
  6733.  
  6734.  
  6735. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6736.  
  6737. STRIP( string [,  (L|T|B)]  [,  'char' ] ) 
  6738.  
  6739.  
  6740. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6741.  
  6742. Removes char from string in any of the following positions depending upon the 
  6743. option specified: 
  6744.  
  6745. Option:        Position: 
  6746. 'L' 
  6747.                Leading 
  6748. 'T' 
  6749.                Trailing 
  6750. 'B' 
  6751.                Both 
  6752.  
  6753. If option is omitted, the default is B. If char is omitted, the default is the 
  6754. space character.  (Same as REXX.) 
  6755.  
  6756.  
  6757. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6758.  
  6759.    strip('  ab c  ')     = 'ab c'
  6760.    strip('  ab c  ','L') = 'ab c  '
  6761.  
  6762. Note:  Calling the STRIP() function does not actually change the value of the 
  6763. parameter string. In order to modify a variable you must assign to it, for 
  6764. example: 
  6765.  
  6766. field = strip( field )
  6767.  
  6768.  
  6769. ΓòÉΓòÉΓòÉ 4.1.171. SUBSTR(string,n [,k [,pad] ]) ΓòÉΓòÉΓòÉ
  6770.  
  6771. Choose: 
  6772.  
  6773. o Syntax 
  6774. o Definition 
  6775. o Example 
  6776. o E Language Syntax 
  6777.  
  6778.  
  6779. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6780.  
  6781. SUBSTR( string,  n [, length   [,  'pad' ] ] ) 
  6782.  
  6783.  
  6784. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6785.  
  6786. Returns the substring of string which begins at the nth character, and is of 
  6787. length, padded with blanks or the specified character (pad). If length is 
  6788. omitted, it defaults to be the rest of the string.  The default pad character 
  6789. is a blank. n must be positive. 
  6790.  
  6791.  
  6792. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6793.  
  6794.     SUBSTR('abc',2)       == 'bc'
  6795.     SUBSTR('abc',2,4)     == 'bc  '
  6796.     SUBSTR('abc',2,6,'.') == 'bc....'
  6797.  
  6798. Note: in some situations the positional (numeric) patterns of parsing templates 
  6799. are more convenient for selecting substring, especially if more than one 
  6800. substring is to be extracted from a string. 
  6801.  
  6802.  
  6803. ΓòÉΓòÉΓòÉ 4.1.172. SUBWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  6804.  
  6805. Choose: 
  6806.  
  6807. o Syntax 
  6808. o Definition 
  6809. o Example 
  6810. o E Language Syntax 
  6811.  
  6812.  
  6813. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6814.  
  6815. SUBWORD( string , n   [,  length] ) 
  6816.  
  6817.  
  6818. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6819.  
  6820. Returns the substring of string that begins at the nth word, and is of length 
  6821. length blank-delimited words. If length is not specified, the rest of the 
  6822. string is returned. n must be positive. The returned string will never have 
  6823. leading or trailing blanks, but will include all blanks between the selected 
  6824. words. 
  6825.  
  6826.  
  6827. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6828.  
  6829. Here are some examples: 
  6830.  
  6831.  SUBWORD('Now is the  time',2,2)    ->    'is the'
  6832.  SUBWORD('Now is the  time',3)      ->    'the  time'
  6833.  SUBWORD('Now is the  time',5)      ->    ''
  6834.  
  6835.  
  6836. ΓòÉΓòÉΓòÉ 4.1.173. TAB ΓòÉΓòÉΓòÉ
  6837.  
  6838. Choose: 
  6839.  
  6840. o Syntax 
  6841. o Definition 
  6842. o E Language Syntax 
  6843.  
  6844.  
  6845. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6846.  
  6847. TAB 
  6848.  
  6849.  
  6850. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6851.  
  6852. Moves cursor to next tab stop, like standard key Tab. 
  6853.  
  6854.  
  6855. ΓòÉΓòÉΓòÉ 4.1.174. TABGLYPH(bool) ΓòÉΓòÉΓòÉ
  6856.  
  6857. New in EPM 6. 
  6858.  
  6859. Choose: 
  6860.  
  6861. o Syntax 
  6862. o Definition 
  6863. o Example 
  6864. o E Language Syntax 
  6865.  
  6866.  
  6867. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6868.  
  6869. TABGLYPH( [bool] ) 
  6870.  
  6871.  
  6872. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6873.  
  6874. If an argument is given, sets the TabGlyph flag to that value. Returns the 
  6875. value that the TabGlyph flag had before the call. 
  6876.  
  6877. If the TabGlyph flag is 1, tab characters will be displayed using a 
  6878. proportional-width tab glyph (the usual glyph for an ASCII 9 is a circle).  If 
  6879. the TabGlyph flag is 0, tab characters will just display as whitespace.  The 
  6880. initial value is 0. 
  6881.  
  6882.  
  6883. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6884.  
  6885. definit          -- (In MYSTUFF.E)
  6886. compile if EPM32
  6887.    call tabglyph(1)  -- I prefer to see the difference between
  6888. compile endif        -- tabs and spaces.
  6889.  
  6890.  
  6891. ΓòÉΓòÉΓòÉ 4.1.175. TABWORD ΓòÉΓòÉΓòÉ
  6892.  
  6893. Choose: 
  6894.  
  6895. o Syntax 
  6896. o Definition 
  6897. o E Language Syntax 
  6898.  
  6899.  
  6900. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6901.  
  6902. TABWORD | TAB_WORD 
  6903.  
  6904.  
  6905. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6906.  
  6907. Positions cursor on first character of next word, like the standard key 
  6908. Ctrl-Right. If there are no more words, the cursor is positioned at the end of 
  6909. the last word. 
  6910.  
  6911.  
  6912. ΓòÉΓòÉΓòÉ 4.1.176. TEXTLINE(line_num) ΓòÉΓòÉΓòÉ
  6913.  
  6914. Choose: 
  6915.  
  6916. o Syntax 
  6917. o Definition 
  6918. o E Language Syntax 
  6919.  
  6920.  
  6921. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6922.  
  6923. TEXTLINE( line_num ) 
  6924.  
  6925.  
  6926. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6927.  
  6928. Returns the text of line number line_num. The following statements perform the 
  6929. same function: 
  6930.  
  6931.    getline line, i
  6932.  
  6933. and
  6934.  
  6935.    line = textline(i)
  6936. The TEXTLINE() procedure is simply a more economical way to do comparison loops 
  6937. like: 
  6938.  
  6939.    while textline(i) == ''
  6940.        deleteline i
  6941.  
  6942.  
  6943. ΓòÉΓòÉΓòÉ 4.1.177. TOP ΓòÉΓòÉΓòÉ
  6944.  
  6945. Choose: 
  6946.  
  6947. o Syntax 
  6948. o Definition 
  6949. o E Language Syntax 
  6950.  
  6951.  
  6952. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6953.  
  6954. TOP 
  6955.  
  6956.  
  6957. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6958.  
  6959. Moves cursor to top of file. 
  6960.  
  6961.  
  6962. ΓòÉΓòÉΓòÉ 4.1.178. TRANSLATE(string [, tableo [, tablei [ pad ]]] ) ΓòÉΓòÉΓòÉ
  6963.  
  6964. Choose: 
  6965.  
  6966. o Syntax 
  6967. o Definition 
  6968. o Example 
  6969. o E Language Syntax 
  6970.  
  6971.  
  6972. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6973.  
  6974. TRANSLATE( string [, tableo   [, tablei   [, pad ] ] ] ) 
  6975.  
  6976.  
  6977. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6978.  
  6979.  Translates characters in string to be other characters, or may be used to 
  6980. reorder characters in a string.  If neither translate table is given, string is 
  6981. simply translated to uppercase.  tableo is the output table and tablei is the 
  6982. input translate table (the default is ASCII 0...255).  The output table 
  6983. defaults to the null string, and is padded with pad or truncated as necessary. 
  6984. The default pad is a blank.  The tables may be of any length: the first 
  6985. occurrence of a character in the input table is the one that is used if there 
  6986. are duplicates. 
  6987.  
  6988.  
  6989. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6990.  
  6991. Examples:
  6992.  
  6993.   TRANSLATE('abcdef')                    ==    'ABCDEF'
  6994.   TRANSLATE('abbc','?','b')              ==    'a??c'
  6995.   TRANSLATE('abcdef','12','ec')          ==    'ab2d1f'
  6996.   TRANSLATE('abcdef','12','abcd','.')    ==    '12..ef'
  6997.   TRANSLATE('4123','abcd','1234')        ==    'dabc'
  6998.  
  6999. Note:  The last example shows how the TRANSLATE function may be used to reorder 
  7000. the characters in a string.  In the example, any 4-character string could be 
  7001. specified as the second argument and its last character would be moved to the 
  7002. beginning of the string. 
  7003.  
  7004.  
  7005. ΓòÉΓòÉΓòÉ 4.1.179. TRYINCLUDE filename ΓòÉΓòÉΓòÉ
  7006.  
  7007. Choose: 
  7008.  
  7009. o Syntax 
  7010. o Definition 
  7011. o E Language Syntax 
  7012.  
  7013.  
  7014. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7015.  
  7016. Is described in section Compiler Directive Statements. 
  7017.  
  7018.  
  7019. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7020.  
  7021. Is described in section Compiler Directive Statements. 
  7022.  
  7023.  
  7024. ΓòÉΓòÉΓòÉ 4.1.180. UNDO ΓòÉΓòÉΓòÉ
  7025.  
  7026. Choose: 
  7027.  
  7028. o Syntax 
  7029. o Definition 
  7030. o E Language Syntax 
  7031.  
  7032.  
  7033. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7034.  
  7035. UNDO 
  7036.  
  7037.  
  7038. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7039.  
  7040. Restores the current line after modification (but before leaving it), like the 
  7041. standard F9 key. Pressing the key (or issuing the statement) twice causes the 
  7042. UNDO to undo itself, i.e. the line is re-modified. 
  7043.  
  7044.  
  7045. ΓòÉΓòÉΓòÉ 4.1.181. UNDOACTION ΓòÉΓòÉΓòÉ
  7046.  
  7047. Choose: 
  7048.  
  7049. o Syntax 
  7050. o Definition 
  7051. o E Language Syntax 
  7052.  
  7053.  
  7054. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7055.  
  7056. UNDOACTION action, statevar 
  7057.  
  7058.  
  7059. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7060.  
  7061. Statevar must be a variable; it is used for input or output depending on the 
  7062. action.  Actions are: 
  7063.  
  7064. Action Value Result 
  7065.  
  7066. 1=GET_STATE Returns a handle for the current state of the current file.  If the 
  7067.           file hasn't changed since the the last time the file was checked, 
  7068.           then the same value is returned.  If the file has changed, the 
  7069.           current state is checkpointed and a new handle is returned. 
  7070.  
  7071. 2=GET_OLDEST_STATE The editor periodically forgets old states in order to save 
  7072.           memory.  This call allows one to determine the oldest reachable 
  7073.           state. 
  7074.  
  7075. 3=GOTO_STATE If the current state is not yet named, it is checkpointed and then 
  7076.           the content of the file is changed to reflect the specified state. 
  7077.  
  7078. 4=DISABLE_RECORDING The parameter specifies at which times state checkin should 
  7079.           no longer automatically be done.  A side effect of this command is to 
  7080.           checkin the current state if it is not already checked in. 
  7081.  
  7082.                     Times
  7083.                      0 upon starting each keystroke
  7084.                      1 upon starting each command
  7085.                      2 when moving the cursor from a modified line.
  7086.  
  7087. 5=ENABLE_RECORDING The parameter specifies at what additional times checkin 
  7088.           should be done. Unlike the disabling code, this operation does not 
  7089.           have checkin as a side effect.  See DISABLE for time codes. 
  7090.  
  7091. 6=QUERY_NAMED_SEQ This returns a string consisting of two numbers seperated by 
  7092.           an elipsis. This string represents the oldest and most recent states 
  7093.           that can be reached. These are lowlevel handles, so they can only be 
  7094.           use to call GOTO_STATE2.  The left most number returned represents 
  7095.           the oldest state the is currently remembered.  It is possible that it 
  7096.           is not reachable going to a state causes a checkpointing of the 
  7097.           current state and check pointing may require a trimming of the undo 
  7098.           tree.  If the current state is checked in, the second value 
  7099.           represents the current state.  If the current state is not checked 
  7100.           in, the second value represents the state of file when the next 
  7101.           checkin is done.  (Note a checkin will be done as a side effect of 
  7102.           the first GOTO.)  BTW, one can go to any state between the first and 
  7103.           last.  They do represent a temporal sequence. 
  7104.  
  7105. 7=GOTO_STATE2 This is like GOTO_STATE, except the parameter should be a low 
  7106.           level handle like those returned from QUERY_NAMED_SEQ. 
  7107.  
  7108.  
  7109. ΓòÉΓòÉΓòÉ 4.1.182. UNLINK ΓòÉΓòÉΓòÉ
  7110.  
  7111. Choose: 
  7112.  
  7113. o Syntax 
  7114. o Definition 
  7115. o E Language Syntax 
  7116.  
  7117.  
  7118. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7119.  
  7120. UNLINK string_expression 
  7121.  
  7122.  
  7123. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7124.  
  7125. Is described in section Linkable External Modules. 
  7126.  
  7127.  
  7128. ΓòÉΓòÉΓòÉ 4.1.183. UNMARK ΓòÉΓòÉΓòÉ
  7129.  
  7130. Choose: 
  7131.  
  7132. o Syntax 
  7133. o Definition 
  7134. o E Language Syntax 
  7135.  
  7136.  
  7137. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7138.  
  7139. UNMARK 
  7140.  
  7141.  
  7142. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7143.  
  7144. Removes text marks, like the standard key Alt-U. 
  7145.  
  7146.  
  7147. ΓòÉΓòÉΓòÉ 4.1.184. UP ΓòÉΓòÉΓòÉ
  7148.  
  7149. Choose: 
  7150.  
  7151. o Syntax 
  7152. o Definition 
  7153. o E Language Syntax 
  7154.  
  7155.  
  7156. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7157.  
  7158. UP 
  7159.  
  7160.  
  7161. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7162.  
  7163. Moves cursor 1 character up, like standard Up key. 
  7164.  
  7165.  
  7166. ΓòÉΓòÉΓòÉ 4.1.185. UPCASE(expression) ΓòÉΓòÉΓòÉ
  7167.  
  7168. Choose: 
  7169.  
  7170. o Syntax 
  7171. o Definition 
  7172. o E Language Syntax 
  7173.  
  7174.  
  7175. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7176.  
  7177. UPCASE( expression ) 
  7178.  
  7179.  
  7180. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7181.  
  7182. Returns the upper-case conversion of the expression. 
  7183.  
  7184.  
  7185. ΓòÉΓòÉΓòÉ 4.1.186. VALIDATEFILEID(fileid) ΓòÉΓòÉΓòÉ
  7186.  
  7187. New in EPM 6. 
  7188.  
  7189. Choose: 
  7190.  
  7191. o Syntax 
  7192. o Definition 
  7193. o E Language Syntax 
  7194.  
  7195.  
  7196. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7197.  
  7198. VALIDATEFILEID(fileid) 
  7199.  
  7200.  
  7201. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7202.  
  7203. Returns: 
  7204.  
  7205. 0   if the argument is not a fileid or viewid; 
  7206. 1   if the argument is a valid fileid for a normal file; 
  7207. 2   if the argument is a valid viewid; 
  7208. 3   if the argument is a fileid for an array. 
  7209.  
  7210.  
  7211. ΓòÉΓòÉΓòÉ 4.1.187. VER([option]) ΓòÉΓòÉΓòÉ
  7212.  
  7213. Choose: 
  7214.  
  7215. o Syntax 
  7216. o Definition 
  7217. o E Language Syntax 
  7218.  
  7219.  
  7220. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7221.  
  7222. VER([option]) 
  7223.  
  7224.  
  7225. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7226.  
  7227. Returns the version of the editor being used. 
  7228.  
  7229. If option is 1 then VER returns the editors numeric version. If option is 2, 
  7230. VER returns the minimum allowed version number of a E macro file to be used 
  7231. within this version.  If no option is specified, the version "string" is 
  7232. returned. 
  7233.  
  7234.  
  7235. ΓòÉΓòÉΓòÉ 4.1.188. VERIFY(string, reference [,options [,start] ] ) ΓòÉΓòÉΓòÉ
  7236.  
  7237. Choose: 
  7238.  
  7239. o Syntax 
  7240. o Definition 
  7241. o Example 
  7242. o E Language Syntax 
  7243.  
  7244.  
  7245. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7246.  
  7247. VERIFY( string ,  reference  [ ,(M|N)   [,  start] ]) 
  7248.  
  7249.  
  7250. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7251.  
  7252. verifies that string is composed only of characters from reference, by 
  7253. returning the position of the first character in string that is not also in 
  7254. reference.  If all the characters are present in reference, 0 is returned. The 
  7255. options are: 
  7256.  
  7257. 'Match'       and       'Nomatch'
  7258. If 'Match' is specified, i.e. the value of the third argument expression is a 
  7259. string beginning with 'M' or 'm', the position of the first character in string 
  7260. that is in reference is returned.  0 is returned if none of the characters are 
  7261. found. 'Nomatch' (or any string expression beginning with 'N' or 'n') can also 
  7262. be specified, although you would not normally do so because 'Nomatch' is the 
  7263. default. 
  7264.  
  7265. The default for start is 1, making the search start at the first character of 
  7266. string.  This can be overridden by giving a different start value, which must 
  7267. be positive. 
  7268.  
  7269. If string is null, 0 is returned regardless of the value of the third argument. 
  7270. Similarly if start is greater than length(string), 0 is returned. 
  7271.  
  7272.  
  7273. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7274.  
  7275. Examples:
  7276.  
  7277.        VERIFY('123','1234567890')      ==  0
  7278.        VERIFY('1Z3','1234567890')      ==  2
  7279.        VERIFY('AB3','1234567890','M')  ==  3
  7280. The REXX documentation includes this example: 
  7281.  
  7282.        VERIFY('1P3Q4','1234567890',,3) ==  4
  7283. Notice that the third parameter is completely omitted between two adjacent 
  7284. commas.  This causes REXX to use the default option of 'nomatch'. 
  7285.  
  7286. In general, the E compiler does not like parameters to be completely omitted in 
  7287. this way.  It expects the parameter to be present even if it's an empty string. 
  7288. Thus the same intent can be achieved by either of these: 
  7289.  
  7290.        VERIFY('1P3Q4','1234567890','',3)  ==  4
  7291.        VERIFY('1P3Q4','1234567890','N',3) ==  4
  7292.  
  7293.  
  7294. ΓòÉΓòÉΓòÉ 4.1.189. WHEREDEFC(string) ΓòÉΓòÉΓòÉ
  7295.  
  7296. Choose: 
  7297.  
  7298. o Syntax 
  7299. o Definition 
  7300. o Example 
  7301. o E Language Syntax 
  7302.  
  7303.  
  7304. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7305.  
  7306. WHEREDEFC( string ) 
  7307.  
  7308.  
  7309. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7310.  
  7311. returns the name of the .ex file in which the argument is defined as a DEFC, or 
  7312. the null string if the argument is an unknown command. 
  7313.  
  7314.  
  7315. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7316.  
  7317. defc find_cmd =
  7318.    ex_file = WhereDefc(arg(1))
  7319.    if ex_file then
  7320.       sayerror '"'arg(1)'" is defined in' ex_file
  7321.    else
  7322.       sayerror '"'arg(1)'" is not a DEFC in any linked file'
  7323.    endif
  7324.  
  7325.  
  7326. ΓòÉΓòÉΓòÉ 4.1.190. WHILE ΓòÉΓòÉΓòÉ
  7327.  
  7328. Choose: 
  7329.  
  7330. o Syntax 
  7331. o Definition 
  7332. o E Language Syntax 
  7333.  
  7334.  
  7335. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7336.  
  7337. Is described in section Conditional and Loop Statements. 
  7338.  
  7339.  
  7340. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7341.  
  7342. Is described in section Conditional and Loop Statements. 
  7343.  
  7344.  
  7345. ΓòÉΓòÉΓòÉ 4.1.191. WINDOWMESSAGE ΓòÉΓòÉΓòÉ
  7346.  
  7347. Choose: 
  7348.  
  7349. o Syntax 
  7350. o Definition 
  7351. o Example 
  7352. o E Language Syntax 
  7353.  
  7354.  
  7355. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7356.  
  7357. WINDOWMESSAGE(send_flag, target, message, mp1, mp2) 
  7358.  
  7359.  
  7360. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7361.  
  7362. Performs a WinPostMessage (if send_flag = 0) or WinSendMessage (if send_flag = 
  7363. 1) to the target window with the given message number and MP1 and MP2 values. 
  7364.  
  7365.  
  7366. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7367.  
  7368. /* Pop the command line and pre-fill it with 'Prompt'
  7369. call windowmessage(0,  getpminfo(EPMINFO_OWNERCLIENT),
  7370.                    5124,               -- EPM_POPCMDLINE
  7371.                    0,
  7372.                    put_in_buffer('Prompt') )
  7373.  
  7374.  
  7375. ΓòÉΓòÉΓòÉ 4.1.192. WINMESSAGEBOX ΓòÉΓòÉΓòÉ
  7376.  
  7377. Choose: 
  7378.  
  7379. o Syntax 
  7380. o Definition 
  7381. o Example 
  7382. o E Language Syntax 
  7383.  
  7384.  
  7385. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7386.  
  7387. WINMESSAGEBOX(caption, text [, attributes]) 
  7388.  
  7389.  
  7390. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7391.  
  7392. Puts up a PM message box containing caption as the title and text as the 
  7393. contents.  attributes is any combination of the MB_ constants from PMWIN.H in 
  7394. the OS/2 Toolkit.  These are duplicated in STDCONST.E. 
  7395.  
  7396.  
  7397. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7398.  
  7399. r = WinMessageBox('Reality check',
  7400.                   'Are you sure you want to delete your thesis?',
  7401.                   MB_YESNOCANCEL + MB_WARNING + MB_DEFBUTTON3 + MB_MOVEABLE)
  7402. if r = MBID_YES then
  7403.    sayerror 'Maybe you should sleep on it...'
  7404. elseif r = MBID_NO then
  7405.    sayerror 'Good idea!'
  7406. else
  7407.    sayerror '(Forget the whole thing.)'
  7408. endif
  7409.  
  7410.  
  7411. ΓòÉΓòÉΓòÉ 4.1.193. WORD(string, n) ΓòÉΓòÉΓòÉ
  7412.  
  7413. Choose: 
  7414.  
  7415. o Syntax 
  7416. o Definition 
  7417. o Example 
  7418. o E Language Syntax 
  7419.  
  7420.  
  7421. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7422.  
  7423. WORD( string , n ) 
  7424.  
  7425.  
  7426. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7427.  
  7428. Returns the nth blank-delimited word in string. n must be positive. If there 
  7429. are less than n words in string, the null string is returned. Exactly 
  7430. equivalent to SUBWORD(string,n,1). 
  7431.  
  7432.  
  7433. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7434.  
  7435. Here are some examples: 
  7436.  
  7437.     WORD('Now is the time',3)    -->  'the'
  7438.     WORD('Now is the time',5)    -->  ''
  7439.  
  7440.  
  7441. ΓòÉΓòÉΓòÉ 4.1.194. WORDINDEX(string, n) ΓòÉΓòÉΓòÉ
  7442.  
  7443. Choose: 
  7444.  
  7445. o Syntax 
  7446. o Definition 
  7447. o Example 
  7448. o E Language Syntax 
  7449.  
  7450.  
  7451. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7452.  
  7453. WORDINDEX( string , n ) 
  7454.  
  7455.  
  7456. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7457.  
  7458. Returns the character position of the nth blank-delimited word in string. n 
  7459. must be positive. If there are less than n words in string, 0 is returned. 
  7460.  
  7461.  
  7462. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7463.  
  7464. Here are some examples: 
  7465.  
  7466.     WORDINDEX('Now is the time',3)   -->    8
  7467.     WORDINDEX('Now is the time',6)   -->    0
  7468.  
  7469.  
  7470. ΓòÉΓòÉΓòÉ 4.1.195. WORDLENGTH(string, n) ΓòÉΓòÉΓòÉ
  7471.  
  7472. Choose: 
  7473.  
  7474. o Syntax 
  7475. o Definition 
  7476. o Example 
  7477. o E Language Syntax 
  7478.  
  7479.  
  7480. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7481.  
  7482. WORDLENGTH( string , n ) 
  7483.  
  7484.  
  7485. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7486.  
  7487. Returns the length of the nth blank-delimited word in string. n must be 
  7488. positive. If there are less than n words in string, 0 is returned. 
  7489.  
  7490.  
  7491. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7492.  
  7493. Here are some examples: 
  7494.  
  7495.     WORDLENGTH('Now is the time',2)    -->   2
  7496.     WORDLENGTH('Now comes the time',2) -->   5
  7497.     WORDLENGTH('Now is the time',6)    -->   0
  7498.  
  7499.  
  7500. ΓòÉΓòÉΓòÉ 4.1.196. WORDPOS(needle, haystack [, start] ) ΓòÉΓòÉΓòÉ
  7501.  
  7502. Choose: 
  7503.  
  7504. o Syntax 
  7505. o Definition 
  7506. o Example 
  7507. o E Language Syntax 
  7508.  
  7509.  
  7510. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7511.  
  7512. WORDPOS( needle , haystack   [,  start] ) 
  7513.  
  7514.  
  7515. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7516.  
  7517. Searches haystack for the first occurrence of the sequence of blank-delimited 
  7518. words needle and returns the word number of the first word of needle in 
  7519. haystack. Multiple blanks between words in either needle or haystack are 
  7520. treated as a single blank for the comparison, but otherwise the words must 
  7521. match exactly. Returns 0 if needle is not found. 
  7522.  
  7523. By default the search starts at the first word in haystack. This may be 
  7524. overridden by specifying start (which must be positive), the word at which to 
  7525. start the search. 
  7526.  
  7527.  
  7528. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7529.  
  7530. Here are some examples: 
  7531.  
  7532.  WORDPOS('the','now is the time')              ->  3
  7533.  WORDPOS('The','now is the time')              ->  0
  7534.  WORDPOS('is the','now is the time')           ->  2
  7535.  WORDPOS('is   the','now is the time')         ->  2
  7536.  WORDPOS('is   time ','now is   the time')     ->  0
  7537.  WORDPOS('be','To be or not to be')            ->  2
  7538.  WORDPOS('be','To be or not to be',3)          ->  6
  7539.  
  7540.  
  7541. ΓòÉΓòÉΓòÉ 4.1.197. WORDS(string) ΓòÉΓòÉΓòÉ
  7542.  
  7543. Choose: 
  7544.  
  7545. o Syntax 
  7546. o Definition 
  7547. o Example 
  7548. o E Language Syntax 
  7549.  
  7550.  
  7551. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7552.  
  7553. WORDS( string ) 
  7554.  
  7555.  
  7556. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7557.  
  7558. Returns the number of blank-delimited words in string. 
  7559.  
  7560.  
  7561. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7562.  
  7563. Here are some examples: 
  7564.  
  7565.     WORDS('Now is the time')   -->  4
  7566.     WORDS(' ')                 -->  0
  7567.  
  7568.  
  7569. ΓòÉΓòÉΓòÉ 4.2. Conditional and Loop Statements ΓòÉΓòÉΓòÉ
  7570.  
  7571. The IF statement is used to change the flow of statements depending upon some 
  7572. condition. As you can see, the syntax varies from that of REXX: 
  7573.  
  7574. IF 
  7575.                  Conditional execution 
  7576.  
  7577.                                     IF expression THEN
  7578.                                        statements
  7579.                                     {ELSEIF expression THEN
  7580.                                        statements}
  7581.                                      [ELSE
  7582.                                        statements]
  7583.                                     ENDIF
  7584.  
  7585.                  Note:  Any nonzero, non-null value for expression is regarded 
  7586.                  as TRUE.  The value zero is FALSE, and (as of version 3.07) a 
  7587.                  null value is FALSE. The null-value treatment is important 
  7588.                  because that's the default value returned by a DEFPROC.  If a 
  7589.                  DEFPROC simply "runs off the end" and does not have an 
  7590.                  explicit RETURN statement, ET automatically assigns a null 
  7591.                  return value.  For example: 
  7592.  
  7593.                                      defproc tinyproc=
  7594.                                         x = 1
  7595.                                         /* no return statement */
  7596.  
  7597.                                      defc test=
  7598.                                         myswitch = tinyproc()
  7599.                                         if myswitch then
  7600.                                            sayerror 'null is true'
  7601.                                         else
  7602.                                            sayerror 'null is false'
  7603.                                         endif
  7604.  
  7605.                  Previous versions of E would have printed null is true because 
  7606.                  the value of myswitch was not precisely zero ('0'). It makes 
  7607.                  more sense for no-value to be false.  But it's still better 
  7608.                  practice to specify the return value explicitly in your procs. 
  7609.  
  7610.                  Several ways are provided to structure a repetitive loop: 
  7611.  
  7612. WHILE - DO 
  7613.                  Conditional loop 
  7614.  
  7615.                                   WHILE expression DO
  7616.                                     statements
  7617.                                   ENDWHILE
  7618.  
  7619. DO - WHILE 
  7620.                  Same effect as WHILE - DO 
  7621.  
  7622.                                   DO WHILE expression
  7623.                                     statements
  7624.                                   END or ENDDO
  7625.  
  7626. DO FOREVER 
  7627.                  Continuous loop (See LEAVE, below) 
  7628.  
  7629.                                   DO FOREVER        /* clearer meaning than  WHILE 1  */
  7630.                                     statements     /* Exit with a RETURN or LEAVE    */
  7631.                                   END or ENDDO
  7632.  
  7633. LOOP 
  7634.                  Same effect as DO FOREVER 
  7635.  
  7636.                                   LOOP              /* equivalent to the previous one */
  7637.                                      statements
  7638.                                   ENDLOOP
  7639.  
  7640. FOR 
  7641.                  Stepwise Iteration 
  7642.  
  7643.                                   FOR i=expression TO expression [BY expression]
  7644.                                     statements
  7645.                                   ENDFOR
  7646.  
  7647. DO (FOR) 
  7648.                  Same effect as FOR 
  7649.  
  7650.                                   DO i=expression TO expression [BY expression]
  7651.                                      statements
  7652.                                   END or ENDDO
  7653.  
  7654. LEAVE 
  7655.                  Exits LOOP, WHILE or DO. 
  7656.  
  7657.                  Execution resumes after ENDLOOP, ENDWHILE or END. 
  7658.  
  7659. ITERATE 
  7660.                  Iterates LOOP, WHILE or DO. 
  7661.  
  7662.                  Execution resumes at LOOP, WHILE or DO. 
  7663.  
  7664. Note:  It is possible to modify the loop index within the FOR loop. For 
  7665. example, the following is correct: 
  7666.  
  7667.    for i= 1 to 10
  7668.        if i=7 then
  7669.            i= i - 1  -- i = 6
  7670.        endif
  7671.    endfor
  7672.  
  7673.  
  7674. ΓòÉΓòÉΓòÉ 4.3. The Parse Statement ΓòÉΓòÉΓòÉ
  7675.  
  7676. Use the PARSE statement to extract information from a string. The syntax is: 
  7677.  
  7678.  
  7679.    PARSE  ARG template
  7680.    PARSE  VALUE expression WITH template
  7681.  
  7682. where expression is the input, i.e. the string to parse, and template is a list 
  7683. of symbols separated by blanks, which dictates how to parse the input. 
  7684.  
  7685. The syntax of template is
  7686.  
  7687. { '.' | string | +number | -number |number | variable | '(' variable ')' }
  7688. The only difference between the two forms of the parse statement is that the 
  7689. PARSE ARG statement is a special case of the PARSE - VALUE - WITH statement. 
  7690. The PARSE ARG statement automatically assumes ARG(1) to be its input. 
  7691. Therefore, the following two statements are logically equivalent: 
  7692.  
  7693. PARSE ARG A B C D
  7694. PARSE VALUE arg(1) WITH A B C D
  7695.  
  7696. The template in the above example is A B C D. A template in general specifies 
  7697. the names of variables that are to be given new values, together with optional 
  7698. triggers (either strings or special characters) to control the parsing. In the 
  7699. example, A, B, C and D are all variables to which new values will be assigned; 
  7700. there are no triggers. 
  7701.  
  7702. Normally each variable in the template is assigned one word from the input 
  7703. string.  The last variable, however, is assigned the remainder of the string 
  7704. (if any).  If there are fewer words in the string than variables in the 
  7705. template, all excess variables are set to null. A null, therefore, indicates 
  7706. the end of data. 
  7707.  
  7708. For example, if the string 'The Red Baron' is parsed with the template A B C D, 
  7709. then the first three variables would each be assigned one word from the string, 
  7710. in sequence, and the variable D would be set to ' '. 
  7711.  
  7712. If the template were changed to A B and the input string remained the same, 
  7713. then the variable A would be set to 'The' and the variable B would be set to 
  7714. 'Red Baron'. 
  7715.  
  7716. The parsing algorithm also allows some pattern matching, in which you may 
  7717. trigger on strings. If the template contains a string (such as a '/' or 'TO' ), 
  7718. then synchronization will occur at the next point where the trigger matches the 
  7719. data.  This is best explained with the aid of examples: 
  7720.  
  7721.  
  7722.      Input data:        EDIT AUTOEXEC.BAT /D
  7723.      Template:          X Fn '/'Opt
  7724.  
  7725.      Variables set:     X   = 'EDIT'
  7726.                         Fn  = 'AUTOEXEC.BAT'
  7727.                         Opt = 'D'
  7728.  
  7729. The value of a variable may be used as a trigger, by enclosing the name of the 
  7730. variable in parentheses.  It then acts in exactly the same way as a literal 
  7731. string trigger.  For example: 
  7732.  
  7733.   delim=','
  7734.   parse value 'abc, def' with  x (delim) y /* splits the string */
  7735.  
  7736. This feature allows you to parse when you don't know what the trigger string 
  7737. (delim in the example) is in advance.  Without the parentheses, the variable 
  7738. delim would receive the value 'def'. 
  7739.  
  7740. You may also use numbers as triggers to pick out positional substrings, or to 
  7741. extract a string of a certain length.  These may be absolute column numbers, or 
  7742. numbers relative to the last trigger (or column) specified. 
  7743.  
  7744.      Input string:      This is the time for all good men
  7745.      Template:          8 X +4  16 Y +5
  7746.  
  7747.      Variables set:     X = ' the'  /* four starting at column 8  */
  7748.                         Y = 'e for' /* five starting at column 16 */
  7749. In this case, a +n following the variable indicates that the string to be 
  7750. picked out should begin at the last column specified and should continue n 
  7751. characters to the right. The '-' unary operator cannot be used in this manner. 
  7752. However, both unary plus and minus can also be used in the template to advance 
  7753. the current column position. For example, 
  7754.  
  7755. Input string:        This is the time for all good men
  7756. Template:            10 't' X +4 +5 Y -4 Z
  7757.  
  7758. Variables set:       X = 'time'
  7759.                      Y = 'all good men'
  7760.                      Z = 'for all good men'
  7761. Notice that in this example, the current position is moved to the 10th column, 
  7762. and then to the next instance of 't' (which is the 't' in 'time'). X is 
  7763. assigned a string of length 4 beginning from this point. The current position 
  7764. is then moved 5 positions to the right. The Y variable is assigned a string 
  7765. beginning at this point and continuing to the end of the string. The cursor 
  7766. position is then moved back (to the left) 4 positions and the Z variable gets a 
  7767. string from that position to the end of the string. 
  7768.  
  7769. Further examples: 
  7770.  
  7771.  
  7772.      Input string:      MSG WINPA(FRED) Hello Fred
  7773.      Template:          X node'('userid')' msg
  7774.  
  7775.      Variables set:     X      = 'MSG'
  7776.                         NODE   = 'WINPA'
  7777.                         USERID = 'FRED'
  7778.                         MSG    = ' Hello Fred'
  7779.  
  7780.  
  7781.      Input string:      /foo/bar zot/
  7782.      Template:          delim 2 word1 (delim) word2 (delim)
  7783.      Variables set:     delim  = '/'
  7784.                         word1  = 'foo'
  7785.                         word2  = 'bar zot'
  7786.  
  7787. Note that each substring (between triggers) is parsed in the same manner as a 
  7788. complete string would be if there were no triggers present. 
  7789.  
  7790. You can also use a period (.) as a place holder to skip over a word that would 
  7791. otherwise be placed in a variable.  For example: 
  7792.  
  7793.  
  7794.      Input string:      'The Red Baron'
  7795.      Template:          word1 . word2
  7796.      Variables set:     word1  = 'The'
  7797.                         word2  = 'Baron'
  7798.  
  7799.  
  7800. ΓòÉΓòÉΓòÉ 4.4. Compiler Directive Statements ΓòÉΓòÉΓòÉ
  7801.  
  7802. The following statements are different from other E statements because they 
  7803. serve no function when the program is being run, rather they provide 
  7804. instructions to the ET compiler. 
  7805.  
  7806.  
  7807. ΓòÉΓòÉΓòÉ 4.5. compiler directives ΓòÉΓòÉΓòÉ
  7808.  
  7809. The compiler directive statements are: 
  7810.  
  7811. Includes
  7812.                                                               INCLUDE 'filespec'
  7813.  
  7814.                                                               TRYINCLUDE 'filespec'
  7815.  
  7816. Conditional compilation
  7817.                                                               COMPILE IF constant_expression
  7818.                                                                   statements
  7819.                                                               { COMPILE ELSEIF constant_expression
  7820.                                                                   statements }
  7821.                                                               [ COMPILE ELSE
  7822.                                                                   statements ]
  7823.                                                               COMPILE ENDIF
  7824.  
  7825.  
  7826. ΓòÉΓòÉΓòÉ 4.5.1. Include Statements ΓòÉΓòÉΓòÉ
  7827.  
  7828. The usage and usefulness of INCLUDE statements is shown in The EPM User's 
  7829. Guide. In this section, we will discuss how these statements work. Let's say 
  7830. that there is an INCLUDE statement (INCLUDE 'filespec') in a file test.e. The 
  7831. statement directs the compiler (ET) to replace the INCLUDE statement with the E 
  7832. code found in the file named in filespec. The contents of file filespec are 
  7833. inserted into file test.e. If file filespec does not exist, compilation is 
  7834. aborted. 
  7835.  
  7836. The TRYINCLUDE statement has the same syntax as an INCLUDE file, i.e. filespec 
  7837. must be enclosed with quotes. It also behaves the same way as an INCLUDE 
  7838. statement: the specified file is included into the file where the INCLUDE 
  7839. statement appears. However, when a TRYINCLUDE statement is used, the compiler 
  7840. tries to include the file. If it is unsuccessful, compilation does not halt. 
  7841. For example, consider the following excerpt from a file: 
  7842.  
  7843. tryinclude 'test1.e'
  7844. tryinclude 'test2.e'
  7845. include 'test3.e'
  7846. If the file test1.e does not exist, the compiler will simply go on to the next 
  7847. statement without notifying the user. Next it will try to include file test2.e. 
  7848. However, if file test3.e does not exist, the compiler will issue an error 
  7849. message and stop compilation. 
  7850.  
  7851.  
  7852. ΓòÉΓòÉΓòÉ 4.5.2. Conditional Compilation ΓòÉΓòÉΓòÉ
  7853.  
  7854. In the past few releases of E we've tried to simplify configuration and 
  7855. updates.  We've rearranged the standard E files to bring together all the usual 
  7856. configuration options (in STDCNF.E and COLORS.E) and all the INCLUDEs (into 
  7857. E.E).  Ideally the user should be able to customize E with simple one-line 
  7858. changes. 
  7859.  
  7860. The available configuration techniques have been: 
  7861.  
  7862. o setting a universal variable, for example matchtab_on=0. This is fine for 
  7863.   simple options but can be expensive for large features.  The macros must 
  7864.   contain the code for all possible values of the variable since the value can 
  7865.   change at run-time.  Even though you might never use the matchtab feature, 
  7866.   memory space is used for the possibility. 
  7867.  
  7868. o setting a constant, like TEMP_PATH='C:\'. Constants have been good only for 
  7869.   minor configuration options which don't change after installation, such as 
  7870.   drive letters and directories.  They're also useful for mnemonic names like 
  7871.   GREEN=2 to make macros more readable. 
  7872.  
  7873. o using INCLUDE and TRYINCLUDE statements, such as tryinclude 'math.e', to ease 
  7874.   the installation of large optional features if the features are cleanly 
  7875.   separable into independent files. After the compilation is done, the INCLUDE 
  7876.   statements have no effect and occupy no memory. 
  7877.  
  7878. Another tool, conditional compilation includes features which aren't cleanly 
  7879. separable into files. Programmers experienced with the C language will be 
  7880. familiar with this concept (as #if).  Other users might be uncomfortable with 
  7881. the distinction between compile-time and run-time processing. 
  7882.  
  7883. Let's take a small feature as an illustration - imagine that whenever you press 
  7884. F4 (File) you don't want the file saved if it hasn't been modified. If you were 
  7885. a power user who wanted this feature, you had to modify STDCMDS.E as follows: 
  7886.  
  7887. defc f,file=
  7888.    if .modify=0 then   /* my mod:  don't file if not modified */
  7889.       'quit'
  7890.    endif
  7891.    /* rest of code as before */
  7892.  
  7893. The trouble with modifying the standard commands like this is that you had to 
  7894. repeat the modification on every new release of E. To ease your updates you 
  7895. might have tried to convince us developers to include the feature in the 
  7896. standard distribution version.  But we've been reluctant to do this because 
  7897. every user would be forced to use the same feature, or at least to sacrifice 
  7898. memory space to it (if we turn it on/off with a variable assignment). 
  7899.  
  7900. But now it's possible to write: 
  7901.  
  7902. const FILE_ONLY_IF_MODIFIED = 1
  7903.  
  7904. defc f,file=
  7905. compile if FILE_ONLY_IF_MODIFIED
  7906.    if .modify=0 then
  7907.       'quit'
  7908.    endif
  7909. compile endif
  7910.    /* rest of code as before */
  7911.  
  7912. When the compiler sees the compile if it will check the value of the constant 
  7913. FILE_ONLY_IF_MODIFIED, and, seeing that it's true, will compile the new code 
  7914. just as it did when you hand-modified it. But now the feature is easier to 
  7915. distribute to all users.  A user who doesn't like it can set 
  7916. FILE_ONLY_IF_MODIFIED = 0, which will cause ET to ignore the code enclosed 
  7917. between compile if and compile endif.  This happens at compile time, in much 
  7918. the same manner as a TRYINCLUDE, so the other user is not penalized memory 
  7919. space for the choice. 
  7920.  
  7921. We encourage developers of add-on packages to use this feature.  In time we 
  7922. hope to make the most popular add-ons installable without the user having to 
  7923. touch the macro source code. 
  7924.  
  7925. The new keywords all start with the word compile: 
  7926.  
  7927. o COMPILE IF  const_expression 
  7928.  
  7929. o COMPILE ELSE 
  7930.  
  7931. o COMPILE ELSEIF const_expression 
  7932.  
  7933. o COMPILE ENDIF 
  7934. const_expression must be a simple expression combining only constants known at 
  7935. compile time. Understand that ET cannot know the values that will be assigned 
  7936. to variables at run-time (like matchtab_on). If we assume that all uppercase 
  7937. identifiers represent pre-defined constants, the following are valid 
  7938. const_expressions: 
  7939.  
  7940.    COMPILE IF 0            /* Means 'never compile'. */
  7941.  
  7942.    COMPILE IF FOO + BAR >= 2
  7943.  
  7944.    COMPILE IF EVERSION = '3.07'
  7945.  
  7946.    COMPILE IF STATUSCOLOR = NORMAL
  7947.  
  7948.    COMPILE IF not (OS2 or DOS)
  7949.  
  7950. Note:  simple arithmetic and logical expressions are possible, but not string 
  7951. functions such as substr(). 
  7952.  
  7953. Any strings in the constant expression associated with a COMPILE IF statement 
  7954. are converted to upper case. This means that many of the values for 
  7955. configuration options in the STDCNF.E file may now be entered in any 
  7956. combination of lower and upper case letters. For example, the following 
  7957. statement is now valid: 
  7958.  
  7959. HOST_SUPPORT = 'pdq'
  7960. even though STDCNF.E contains the following statement: 
  7961.  
  7962. COMPILE IF HOST_SUPPORT = 'PDQ'
  7963.     HAVE_DOS = 0
  7964. COMPILE ENDIF
  7965. Since the string constant `pdq' will be converted to `PDQ' at compile-time, the 
  7966. compile-if condition will be found to be true. 
  7967.  
  7968. There must be one COMPILE ENDIF to each COMPILE IF, zero or one COMPILE ELSE's, 
  7969. and zero or more COMPILE ELSEIF's.  The ELSE must come after all ELSEIF's, as 
  7970. in normal E if-else-endif structures. 
  7971.  
  7972. These conditional blocks can be nested (in the same manner as if-else-endif 
  7973. structures) up to a maximum depth of 20 levels. 
  7974.  
  7975. Here's an example of how we might include different methods of host-file 
  7976. support: 
  7977.  
  7978. compile if HOST_SUPPORT = 'STD'
  7979.    include 'saveload.e' -- with host support
  7980. compile elseif HOST_SUPPORT = 'EMUL'
  7981.    include 'e3emul.e'   -- Brian Tucker's add-on package
  7982. compile else
  7983.    include 'slnohost.e' -- without host support
  7984. compile endif
  7985.  
  7986. The COMPILE keyword can be inserted anywhere a newline is allowed, including 
  7987. cases where a newline serves as a line continuation in the middle of a 
  7988. statement. 
  7989.  
  7990.    delay = 2000 /
  7991.    compile if OS2
  7992.    10             /* delay = 200  here */
  7993.    compile else
  7994.    1              /* delay = 2000 here */
  7995.    compile endif
  7996.  
  7997. See the section Line Continuations for other examples. 
  7998.  
  7999.  
  8000. ΓòÉΓòÉΓòÉ 4.5.3. Compiler Directives as Definition Primitives ΓòÉΓòÉΓòÉ
  8001.  
  8002. The compiler directives discussed in this section are valid E statements, i.e. 
  8003. they can be contained within a DEFPROC, DEFC, or other definition. However, 
  8004. compiler directives can also be considered definition primitives depending upon 
  8005. what they contain. Consider the following example: file junk.e contains: 
  8006.  
  8007.     sayerror "print junk"
  8008.     x = x + 5
  8009. file main_junk.e contains: 
  8010.  
  8011.     DEFPROC junk()
  8012.         universal x
  8013.  
  8014.         x = 8
  8015.         include 'junk.e'
  8016.         temp = 250
  8017. After execution of the procedure junk(), the value of x is 13. In this case, 
  8018. the included file (junk.e) contains only statements, and therefore the INCLUDE 
  8019. statement acts as a statement. However, consider the next example: file junk.e 
  8020. contains: 
  8021.  
  8022.     DEFPROC junk()
  8023.         sayerror "printing junk"
  8024. file main_junk.e contains: 
  8025.  
  8026.     SET insert_state 0
  8027.  
  8028.     DEFC com1 =
  8029.         call junk()
  8030.  
  8031.     CONST
  8032.         a = 25
  8033.  
  8034.     include 'junk.e'
  8035.  
  8036. If the included file (junk.e) contained only statements, as in the last 
  8037. example, the ET compiler would issue the following error: "Expecting DEFinition 
  8038. primitive". Because the INCLUDE statement is no longer contained within a 
  8039. definition primitive, the included file must contain a definition primitive, as 
  8040. it does in this example. In this case, the INCLUDE statement is not really 
  8041. acting as a statement; it is acting as a definition primitive. 
  8042.  
  8043. The same can be said of the conditional compile statement: it can occur within 
  8044. a definition primitive and enclose only statements or it can occur outside a 
  8045. primitive and enclose one or more definition primitives. The following examples 
  8046. show various correct usages: 
  8047.  
  8048.  
  8049. CONST
  8050.     flag1 = 1
  8051.  
  8052. DEFPROC fred()
  8053.     universal perm
  8054.  
  8055.     perm = 8
  8056.     compile if flag1 = 1
  8057.         perm = perm + 5
  8058.     compile endif
  8059.     sayerror "perm is " perm
  8060.  
  8061. /************** Second example ****************/
  8062.  
  8063. CONST
  8064.     USERS_CHOICE = 0
  8065.  
  8066. compile if USERS_CHOICE
  8067.     DEFC optional_command =
  8068.         sayerror "just printing junk for testing"
  8069. compile endif
  8070.  
  8071. DEFPROC test()
  8072.     sayerror "stuff"
  8073.  
  8074. In the first example, if flag1 is set to 1, then the value of perm becomes 13. 
  8075. If flag1 is set to 0, then the value of perm is 8. In either case, the value is 
  8076. printed out with the sayerror statement. In the second example, if USERS_CHOICE 
  8077. is set to 1, the optional_command is included in the code; otherwise it is not, 
  8078. and at run-time (when you are running the editor), the command optional_command 
  8079. does not exist, and will not be recognized. 
  8080.  
  8081.  
  8082. ΓòÉΓòÉΓòÉ 4.6. Using EPM Commands in E Statements ΓòÉΓòÉΓòÉ
  8083.  
  8084. The E commands that were discussed in The EPM User's Guide can be used not only 
  8085. on the command dialog box, but also in E programs. When the name of a command 
  8086. and its options and parameters are enclosed in quotes (single or double), the 
  8087. command can be used in place of a statement. The syntax of these commands is 
  8088. the same as that which was presented in the User's Guide. An example of this 
  8089. usage follows: 
  8090.  
  8091. defproc zap_file()
  8092.     k = entrybox("Confirm",'/Yes/No/','Really quit?',18,0)
  8093.     if k then
  8094.        sayerror("Data has been cruelly obliterated ...")
  8095.        'quit'           /*  <-- Note the quit command in quotes */
  8096.     else
  8097.        sayerror("File has been mercifully spared ...")
  8098.     endif
  8099.  
  8100. When the zap_file() procedure is activated, it will prompt the user. If the 
  8101. user picks 'Yes', it will quit the file; if he picks 'No' the user can continue 
  8102. editing. 
  8103.  
  8104. Another common usage is when redefining key strokes. For example: 
  8105.  
  8106.   def c_2
  8107.     'togglecontrol 9 '
  8108.     'togglecontrol 10'
  8109.  
  8110. This will define the key ctrl-2 to toggle the scroll bars on or off. Other 
  8111. examples can be seen in section Sample E Procs. 
  8112.  
  8113. Any command can be used as a statement. The command need not be a built-in 
  8114. command; it can be a command defined by a user using a DEFC. For example: 
  8115.  
  8116. defc temp
  8117.     call temp()
  8118.  
  8119. defproc temp()
  8120.     'testA stuff'
  8121.  
  8122. defc testA
  8123.     sayerror "argument is " arg(1)
  8124. Issuing the command temp will print argument is stuff. 
  8125.  
  8126.  
  8127. ΓòÉΓòÉΓòÉ 4.6.1. Commands Omitted From the User's Guide ΓòÉΓòÉΓòÉ
  8128.  
  8129. Most of the standard commands (defc constructions) are listed in The EPM User's 
  8130. Guide. However, a few were omitted because they produce no useful results by 
  8131. themselves, but are only really useful in a programming context or because they 
  8132. may not be understood by a novice. These advanced commands are: 
  8133.  
  8134. Command                       Description 
  8135.  
  8136. ACTIVATEFILEID fileid 
  8137.                               activates the file specified by the file handle 
  8138.                               fileid. 
  8139.  
  8140. AMU_ADDENDA_ADDITION word 
  8141.                               adds the word specified by word to the addenda 
  8142.                               file specified the variable ADDENDA_FILENAME. 
  8143.  
  8144. AMU_ADDENDA_PICKUP 
  8145.                               adds the addenda dictionary specified by the 
  8146.                               variable ADDENDA_FILENAME to the standard 
  8147.                               dictionary. 
  8148.  
  8149. CLEARSHARBUFF 
  8150.                               clears the shared PM buffer. 
  8151.  
  8152. COMMANDLINE [ text ] 
  8153.                               brings up the command line dialog box. This is 
  8154.                               the equivalent of the standard ESC key 
  8155.                               definition. This command optionally takes an 
  8156.                               argument of text or a string variable. If the 
  8157.                               argument is included, it will be placed on the 
  8158.                               command line. 
  8159.  
  8160. COPY2DMBUFF 
  8161.                               copies the marked area to the "Delete Mark" 
  8162.                               buffer. 
  8163.  
  8164. COPY2SHARBUFF 
  8165.                               copies a marked area to the shared buffer. 
  8166.  
  8167. CURSOROFF 
  8168.                               turns the cursor off. This command is equivalent 
  8169.                               to a: 
  8170.  
  8171.                                                               `TOGGLECONTROL 14 0'
  8172.  
  8173.                               To turn the cursor back on again, issue a 
  8174.                               TOGGLECONTROL command with a 1 instead of a zero 
  8175.                               as the second argument. 
  8176.  
  8177. DUPMARK typemark 
  8178.                               takes an argument (typemark) of: 
  8179.  
  8180.    M = move marked text 
  8181.    C = copy marked text 
  8182.    O = overlay marked text 
  8183.    U = unmark marked text 
  8184.    D = delete marked text 
  8185.  
  8186. and executes that action on the marked text. 
  8187.  
  8188. EPM will look first in the local buffer and then in the shared buffer for 
  8189. marked text. 
  8190.  
  8191. GETDMBUFF 
  8192.                               gets text from the Delete Mark buffer. 
  8193.  
  8194. GETSHARBUFF 
  8195.                               gets text from EPM shared buffer. 
  8196.  
  8197. LOADDEFAULTMENU 
  8198.                               loads the default menu setup. 
  8199.  
  8200. MH_BEGIN_MARK 
  8201.                               mouse handler's begin mark. This is executed when 
  8202.                               the standard mouse setup begins a drag. See 
  8203.                               MOUSE.E and Configuring the Mouse. for more 
  8204.                               information. 
  8205.  
  8206. MH_CANCEL_MARK 
  8207.                               mouse handler's cancel mark. This is executed 
  8208.                               when the standard mouse setup double clicks on 
  8209.                               button one. See MOUSE.E and Configuring the Mouse 
  8210.                               for more information. 
  8211.  
  8212. MH_END_MARK 
  8213.                               mouse handler's end mark. This is executed when 
  8214.                               the standard mouse setup ends a drag. See MOUSE.E 
  8215.                               and Configuring the Mouse for more information. 
  8216.  
  8217. MH_GOTOPOSITION 
  8218.                               moves the cursor to the current mouse pointer 
  8219.                               location. This is like the standard mouse of a 
  8220.                               single button one click. See MOUSE.E and 
  8221.                               Configuring the Mouse for more information. 
  8222.  
  8223. SETMESSAGELINE [string] 
  8224.                               Updates the messageline.  If the optional string 
  8225.                               is present, that is set as the new messageline 
  8226.                               text.  If no argument is given, the messageline 
  8227.                               color is updated with the value in the universal 
  8228.                               variable vMESSAGECOLOR. 
  8229.  
  8230. SETSTATUSLINE [string] 
  8231.                               Updates the statusline.  If the optional string 
  8232.                               is present, that is set as the new statusline 
  8233.                               text.  If no argument is given, the statusline 
  8234.                               color is updated with the value in the universal 
  8235.                               variable vSTATUSCOLOR. 
  8236.  
  8237.  
  8238. ΓòÉΓòÉΓòÉ 4.7. Predefined Constants and Variables ΓòÉΓòÉΓòÉ
  8239.  
  8240. There are several predefined UNIVERSAL variables which may be accessed in any 
  8241. definition without an explicit UNIVERSAL declaration: 
  8242.  
  8243. o RC, 
  8244.  
  8245. o join_after_wrap, 
  8246.  
  8247. o center_search, 
  8248.  
  8249. o exit_after_last_file, and 
  8250.  
  8251. o two_spaces. 
  8252.  
  8253. RC holds the error code from the last-executed command. All commands, for 
  8254. example 'edit', 'quit', and 'file', set the value of RC.  If no error occurs, 
  8255. RC will be reset to zero by a command. Upon entering a DEFC, the value of RC 
  8256. depends upon the source of the command invocation. If another definition 
  8257. (internal to the E program) activates the command, RC is set to zero. If a user 
  8258. issues the command from the command dialog box, RC is set to the position of 
  8259. the cursor in the command dialog box. However, statements and procedures, such 
  8260. as 'nextfile', 'copymark', or 'top', do NOT normally set RC.  If no error 
  8261. occurs, whatever value RC had before the statement is still there.  This 
  8262. approach was followed for considerations of speed, space, and to allow an 
  8263. earlier command's RC to "filter down" to the end of the proc.  Commands are the 
  8264. ones most likely to encounter meaningful errors. 
  8265.  
  8266. Thus if you want a sure error-check on a statement, zero RC first: 
  8267.  
  8268.    rc = 0
  8269.    copymark
  8270.    if rc then /* complain */ endif
  8271.  
  8272. One special case:  REPEATFIND is a statement but it sets RC to zero if the find 
  8273. is successful. 
  8274.  
  8275. An assignment to one of the function key text variables changes the value of 
  8276. the function key text displayed at the bottom of the screen. 
  8277.  
  8278. There is also one predefined constant called ARGSEP. Since the argument option 
  8279. separator can change from machine to machine, this constant is used to keep the 
  8280. E procs portable.  On a PC, ARGSEP is the slash '/'.  On a RT, it's the hyphen 
  8281. '-'. 
  8282.  
  8283. JOIN_AFTER_WRAP, CENTER_SEARCH and other configurable constants are discussed 
  8284. in The EPM User's Guide. 
  8285.  
  8286.  
  8287. ΓòÉΓòÉΓòÉ 4.8. User Exits ΓòÉΓòÉΓòÉ
  8288.  
  8289. If the configuration constant SUPPORT_USER_EXITS is set when the macros are 
  8290. compiled, "hooks" for user exits will be included. If any particular user exit 
  8291. is not present, no attempt to call it will be made, and no error message will 
  8292. be given. 
  8293.  
  8294. The user exits are: 
  8295.  
  8296. defmain_exit This defproc will be called from the DEFMAIN in MAIN.E, just 
  8297.           before the command-line arguments are executed.  The argument given 
  8298.           will be the one passed to EPM (preceded by 'e '); if declared as a 
  8299.           VAR parameter, the exit can modify the value. 
  8300.  
  8301. postsave_exit This defproc will be called from the SAVE command, just after the 
  8302.           file is saved.  Arg(1) will be the .filename of the file, arg(2) will 
  8303.           be the options to the SAVE command, and arg(3) will be 0 to indicate 
  8304.           a normal save, or 1 to indicate that the name was changed (because 
  8305.           the user attempted to save a .Untitled file). 
  8306.  
  8307. presave_exit This defproc will be called from the SAVE command, just before the 
  8308.           file is saved.  The first three arguments will be the same as for 
  8309.           postsave_exit, and arg(4) will be the return code from the SAVE. 
  8310.  
  8311. quit_exit This defproc will be called from the QUIT command, just before the 
  8312.           file is quit.  Arg(1) will be the .filename of the file. 
  8313.  
  8314. rename_exit This defproc will be called from the NAME command and the 
  8315.           SAVEAS_DLG command.  Arg(1) will be the old name, arg(2) will be the 
  8316.           new name, and arg(3) (if present) will be 1 to indicate that the name 
  8317.           was changed by the SAVEAS_DLG command. 
  8318.  
  8319. Note:  The SAVEAS_DLG command (executed when Save as is selected from the File 
  8320.        menu) changes the name directly; it doesn't call the NAME command.  It 
  8321.        does call the rename_exit directly.  The SAVE command can also present 
  8322.        the Save as dialog if the user attempts to save the .Untitled file; in 
  8323.        this case, the NAME command is called to process the name change.
  8324.  
  8325. Note:  The universal variable isa_file_cmd is set to 1 just before the FILE 
  8326.        command issues a SAVE command.  User exits that need to know whether or 
  8327.        not a file is being quit immediately after being saved can check this variable.
  8328.  
  8329. Packages that want to provide an exit while still coexisting with other user 
  8330. exits can use the following code: 
  8331.  
  8332.    tryinclude 'MYCNF.E'
  8333.    compile if not defined(SUPPORT_USER_EXITS)
  8334.       const SUPPORT_USER_EXITS = 0
  8335.    compile endif
  8336.    compile if not SUPPORT_USER_EXITS
  8337.       *** Error - SUPPORT_USER_EXITS must be 1 in MYCNF.E to add this!
  8338.    compile endif
  8339.  
  8340.    compile if not defined(USER_PROVIDES_OWN_EXITS)
  8341.       const USER_PROVIDES_OWN_EXITS = 0
  8342.    compile endif
  8343.    compile if USER_PROVIDES_OWN_EXITS  -- Call the following from your exit.
  8344.       defproc packagename_rename_exit(oldname, newname) =
  8345.    compile else
  8346.       defproc rename_exit(oldname, newname) =
  8347.    compile endif
  8348.          -- Body of routines goes here...
  8349. and instruct the user to include the following in their MYCNF.E if no other 
  8350. exits are being used: 
  8351.  
  8352. const
  8353.    SUPPORT_USER_EXITS = 1
  8354. or, if other user exits are being used, to include the following in their 
  8355. MYCNF.E: 
  8356.  
  8357. const
  8358.    SUPPORT_USER_EXITS = 1
  8359.    USER_PROVIDES_OWN_EXITS = 1
  8360. and the following in their MYSTUFF.E: 
  8361.  
  8362.    defproc rename_exit(oldname, newname) =
  8363.       call packagename_rename_exit(oldname, newname)
  8364.       call otherpackagename_rename_exit(oldname, newname)
  8365.       /* etc... */
  8366.  
  8367.  
  8368. ΓòÉΓòÉΓòÉ 5. Sample E Procs ΓòÉΓòÉΓòÉ
  8369.  
  8370. Using the E language, the user can configure the editor and define complex 
  8371. macros for increased editing power. The E language is translated by the 'etpm' 
  8372. compiler to increase the speed of execution. The syntax of the ETPM compiler 
  8373. is: 
  8374.  
  8375.   ETPM filespec[.E] [destfile[.EX]]
  8376.  
  8377. The default extension of the source code is .E. If no destination file is 
  8378. specified, ETPM will use the same source file name and just attach an .EX 
  8379. extention. Typically, only the filespec is given. These source modules are 
  8380. referred to as E Procs. Two examples of an E Procs are shown below. 
  8381.  
  8382.  
  8383. ΓòÉΓòÉΓòÉ 5.1. Example One ΓòÉΓòÉΓòÉ
  8384.  
  8385. The first E Proc is a simple procedure to define a command to display the 
  8386. different mouse pointers available. Edit a file (say TESTFILE.E). Then type in 
  8387. the following code: 
  8388.  
  8389.  
  8390.   defc firsttime                     -- Define a initialization procedure
  8391.     universal pointertype            -- Make available to both procedures
  8392.     pointertype = 1                  /* Initialize pointertype (same as
  8393.                                         pointertype = '1') */
  8394.     mouse_setpointer pointertype     -- Set the mouse pointer type
  8395.     sayerror "Completed first time." -- Message so you know it worked
  8396.  
  8397.   defc more                          -- Define a subsequent procedure
  8398.     universal pointertype            -- Make E know pointertype is global
  8399.     pointertype = pointertype + 1    -- Increment pointer type
  8400.     mouse_setpointer pointertype     -- Set the mouse pointer type
  8401.     sayerror "Completed subsequent time. Cusor number: "||pointertype
  8402.                                      -- Message so you know it worked
  8403.  
  8404. Then enter RELINK from the commandline dialog box. This will save, compile, and 
  8405. link this code (provided, of course, that there were no typos and the code 
  8406. compiled successfully). The commands FIRSTTIME and MORE are now defined. From 
  8407. the command line dialog box, type FIRSTTIME. Mouse pointer 1 is an arrow so you 
  8408. won't notice a change in the pointer but will see the message Completed first 
  8409. time. Now enter the MORE command. This should change the mouse pointer type. 
  8410. You can continue changing the mouse pointer (upto 15 times) by entering the 
  8411. MORE command. Entering FIRSTTIME again will start you at mouse pointer one 
  8412. again. 
  8413.  
  8414. Note how the variable pointertype is declared universal so it can carry a value 
  8415. between procedures. Since strings and numbers are interchangeable, we could 
  8416. have initialized pointertype with a string instead of a numeric constant. 
  8417.  
  8418.  
  8419. ΓòÉΓòÉΓòÉ 5.2. Example Two ΓòÉΓòÉΓòÉ
  8420.  
  8421. The second E Proc shows how key set definitions can be programmed. This E Proc 
  8422. will configure a few keys of the editor to mimic the EMACS editor. 
  8423.  
  8424. /**********************************************************************/
  8425. /* This E Proc will configure a few keys in the E editor to perform   */
  8426. /* the same operations as the EMACS editor.                           */
  8427. /**********************************************************************/
  8428. defkeys mykeys
  8429. def F3 = 'quit'    /* define a key for fast exit. */
  8430. def C_A = beginline
  8431. def C_B = left
  8432. def C_D = deletechar
  8433. def C_E = endline
  8434. def C_F = right
  8435. def C_N = down
  8436. def C_P = up
  8437. def C_X =
  8438.   choice = listbox("Choose:", "/Quit/Save/")
  8439.   if (choice='Quit') then
  8440.     'quit'
  8441.   endif
  8442.   if (choice='Save') then
  8443.     'save'
  8444.   endif
  8445.  
  8446. If we have a file called EMACS.E which contains the above E Procs, this file 
  8447. would then be translated by the E translator with the following command from 
  8448. the command dialog: 
  8449.  
  8450.   etpm emacs
  8451.  
  8452. To load this file (assuming it compiled correctly) we could type from the 
  8453. command line dialog box: 
  8454.  
  8455.   link emacs
  8456.  
  8457. This will load EMACS into the currently running version of EPM. 
  8458.  
  8459. To have this file automatically included we could add the line: 
  8460.  
  8461.   include "emacs.e"
  8462.  
  8463. in the file MYKEYS.E. When we recompile EPM (see The EPM User's Guide for 
  8464. information on recompiling your editor from the OS/2 prompt) the EMACS key 
  8465. definition will always be available by issuing the following from the command 
  8466. dialog: 
  8467.  
  8468.   keys mykeys
  8469.  
  8470.  
  8471. ΓòÉΓòÉΓòÉ 6. Advanced Configuration ΓòÉΓòÉΓòÉ
  8472.  
  8473. The fact that you are reading this means that you probably want to configure 
  8474. EPM beyond that which can be done merely by setting constants.  In this section 
  8475. are listed a few advanced configuration options that involve some programming. 
  8476.  
  8477.  
  8478. ΓòÉΓòÉΓòÉ 6.1. Building Accelerator Tables from the Macro Language ΓòÉΓòÉΓòÉ
  8479.  
  8480. A Named Accelerator Table is the way true PM accelerators are created from the 
  8481. E macro language.  This is achieved using the BuildAccelTable, and the 
  8482. ActivateAccelTable statements. 
  8483.  
  8484. First, the BuildAccelTable statement is used to create, and add keys to, a 
  8485. named accelerator table.  (The first time BuildAccelTable is called the table 
  8486. is automatically created.)  During this process a data base is created linking 
  8487. accelerator keys to command ids,  and command ids to user strings.  When a 
  8488. named accelerator table is activated, it becomes a true PM accelerator table. 
  8489. This is done via the ActivateAccelTable statement. Now, when a pre-registered 
  8490. key is pressed, the corresponding command id is issued as part of the message 
  8491. parameter of a PM - WM_COMMAND message.  In the E macro world, the defc 
  8492. PROCESSMENU is executed whenever a WM_COMMAND message is received.  ARG(1) of 
  8493. PROCESSMENU contains the command-id corresponding to the event that just took 
  8494. place. If an accelerator key was the cause of the PROCESSMENU command, ARG(1) 
  8495. will be the command-id registered during the corresponding BuildAccelTable 
  8496. statement. 
  8497.  
  8498. During the PROCESSMENU command, it is sometimes useful to take the command-id 
  8499. (passed as arg(1)) and look up the corresponding user string.  This is done 
  8500. using the QueryAccelString function. 
  8501.  
  8502. Accelerator tables created with the BuildAccelTable statement can be deleted 
  8503. with the DeleteAccel statement.  BY DEFAULT, named accelerator tables are 
  8504. deleted when the corresponding edit window is closed. 
  8505.  
  8506.  
  8507. ΓòÉΓòÉΓòÉ 6.1.1. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  8508.  
  8509. The buildacceltable statement adds a key to a named accelerator table. If it is 
  8510. the first key added, the named table is automatically created. Once a table is 
  8511. built, the ActivateAccelTable statement can be issued to make the named 
  8512. accelerator table into an true, active PM Accelerator table. The syntax for the 
  8513. buildacceltable statement is: 
  8514.  
  8515. buildacceltable  table-name, user-string, key-style, key, command-id
  8516.  
  8517. table-name  a text string containing the name of your particular accelerator 
  8518.             table.  (MAX. = 80 characters) 
  8519. user-string an information string that can be retrieved using the 
  8520.             QueryAccelString function. 
  8521. key-style   describes the style of the accelerator key.  The value must be the 
  8522.             sum of the PM-defined AF_ constants defined in STDCONST.E (copied 
  8523.             from PMWIN.H in the OS/2 Toolkit). 
  8524. key         a key constant, (e.g. VK_F1) 
  8525. command-id  a unique number within this particular accelerator table (and 
  8526.             active menu) to define the key in question. (1-MAXINT) 
  8527.  
  8528.  
  8529. ΓòÉΓòÉΓòÉ 6.1.2. ACTIVATEACCELTABLE ΓòÉΓòÉΓòÉ
  8530.  
  8531. The activateacceltable statement activates a named Accelerator table created 
  8532. with BuildAccelTable. When a named accelerator table is activated, it becomes a 
  8533. true PM accelerator table. The syntax for the activateacceltable statement is: 
  8534.  
  8535. activateacceltable table-name
  8536.  
  8537. table-name  where 'table-name' is a text string containing the name of your 
  8538.             particular accelerator table.  (MAX. = 80 characters) 
  8539.  
  8540.  
  8541. ΓòÉΓòÉΓòÉ 6.1.3. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  8542.  
  8543. The queryaccelstring statement allows the retrival of the user-string which was 
  8544. registered with the BuildAccelTable statement. The syntax for the 
  8545. queryaccelstring statement is: 
  8546.  
  8547. queryaccelstring table-name, command-id
  8548.  
  8549. table-name  where 'table-name' is a text string containing the name of your 
  8550.             particular accelerator table.  (MAX. = 80 characters) 
  8551. command-id  where 'command-id' is a unique number within this particular 
  8552.             accelerator table to define the key in question. (1-MAXINT) 
  8553.  
  8554.  
  8555. ΓòÉΓòÉΓòÉ 6.1.4. DELETEACCEL ΓòÉΓòÉΓòÉ
  8556.  
  8557. The deleteaccel statement deletes a named Accelerator table created with 
  8558. BuildAccelTable.  BY DEFAULT, named accelerator tables are deleted when the 
  8559. corresponding edit window is closed. The syntax for the deleteaccel statement 
  8560. is: 
  8561.  
  8562. deleteaccel table-name
  8563.  
  8564. table-name  where 'table-name' is a text string containing the name of your 
  8565.             particular accelerator table.  (MAX. = 80 characters) 
  8566.  
  8567.  
  8568. ΓòÉΓòÉΓòÉ 6.1.5. An example that uses the Named Accelerator statements ΓòÉΓòÉΓòÉ
  8569.  
  8570. -- constants needed for Accelerator example.
  8571. -- key constants
  8572. const  VK_F2 = 33             -- Taken from PMWIN.H
  8573.        VK_F3 = 34
  8574.        VK_F4 = 35
  8575.        VK_F5 = 36
  8576.       -- key style constants
  8577.        AF_CHAR        =   1   -- Taken from PMWIN.H
  8578.        AF_VIRTUALKEY  =   2
  8579.        AF_SCANCODE    =   4
  8580.        AF_SHIFT       =   8
  8581.        AF_CONTROL     =   16
  8582.        AF_ALT         =   32
  8583.        AF_LONEKEY     =   64
  8584.        AF_SYSCOMMAND  =   256
  8585.        AF_HELP        =   512
  8586.  
  8587. -- Creates Two named accel tables, and activates the "default" table
  8588. defc loadaccel
  8589.    universal activeaccel
  8590.  
  8591.    activeaccel='default'
  8592.    otheraccel  ='other'
  8593.  
  8594.    -- Register F2 and F3 as accelerator keys
  8595.    buildacceltable activeaccel, 'john',  AF_VIRTUALKEY, VK_F2, 1000
  8596.    buildacceltable activeaccel, 'thomas',AF_VIRTUALKEY, VK_F3, 1001
  8597.  
  8598.    -- Register F4 and F5 as accelerator keys
  8599.    buildacceltable otheraccel, 'jason', AF_VIRTUALKEY, VK_F4, 1002
  8600.    buildacceltable otheraccel, 'larry', AF_VIRTUALKEY, VK_F5, 1003
  8601.  
  8602.    -- Make the "default" named accel table active.  Now F2 and F3
  8603.    -- are real accel keys,  when they are selected they will cause
  8604.    -- "processmenu" to be executed with id's of 1000 or 1001
  8605.    activateacceltable  activeaccel
  8606.  
  8607. -- In the E macro world, the defc PROCESSMENU is executed whenever
  8608. -- a WM_COMMAND message is received.   ARG(1) of PROCESSMENU contains
  8609. -- the command-id corresponding to the event that just took place.
  8610. -- If an accelerator key was the cause of the PROCESSMENU command,
  8611. -- ARG(1) will be the command-id registered during the corresponding
  8612. -- BuildAccelTable statement.
  8613. -- If a pull-down menu was selected then ARG(1) will be the command-id
  8614. -- registered during the corresponding BUILDMENUITEM statement.
  8615. defc processmenu
  8616.    universal activemenu, activeaccel
  8617.  
  8618.    -- arg(1) contains the command id specified as registered with
  8619.    -- either the BUILDMENUITEM, or BUILDACCELTABLE statements.
  8620.    cmdid = arg(1)
  8621.  
  8622.    -- First check if a usersting exists for this command-id in the
  8623.    -- active accel table.
  8624.    accelstr=queryaccelstring(activeaccel, cmdid)
  8625.    sayerror "querystring=<"accelstr"> cmdid=<"cmdid">"
  8626.  
  8627.    -- "flip-flop" active accel tables just for fun!
  8628.    if accelstr="thomas" then
  8629.       activeaccel="other"
  8630.       activateacceltable activeaccel
  8631.    endif
  8632.    if accelstr="jason" then
  8633.       activeaccel='default'
  8634.       activateacceltable activeaccel
  8635.    endif
  8636.  
  8637.    -- if an accel string was not found, try the menu manager.
  8638.    if accelstr="" then
  8639.       strip(querymenustring(activemenu,cmdid),"T",\0)
  8640.        -- execute user string after stripping off null terminating char
  8641.    endif
  8642.  
  8643.  
  8644. ΓòÉΓòÉΓòÉ 6.2. Building Menus from the Macro Language ΓòÉΓòÉΓòÉ
  8645.  
  8646. EPM allows user configurable pull-down menus.  The menus are created from the 
  8647. macro language using a set of macro procedures: 
  8648.  
  8649. BuildSubMenu Adds an entry to the action bar. 
  8650.  
  8651. BuildMenuItem Adds an entry to an action bar submenu. 
  8652.  
  8653. ShowMenu  Activates an action bar . 
  8654.  
  8655. DeleteMenu Deletes an action bar, submenu, or menu item. 
  8656.  
  8657. QueryMenuString Returns the command associated with a menu item. 
  8658.  
  8659.  
  8660. ΓòÉΓòÉΓòÉ 6.2.1. Buildsubmenu ΓòÉΓòÉΓòÉ
  8661.  
  8662. The buildsubmenu command creates an option on the action bar.  If the option 
  8663. name already exists, then the command is appended to the existing option menu 
  8664. as a sub menu option. Although the menu is built internally, it is not seen 
  8665. until a 'showmenu' is issued. The syntax for a buildsubmenu command is: 
  8666.  
  8667.  
  8668.      buildsubmenu menu_name, subid, text, cmd, mis_style, mia_attr
  8669.  
  8670. menuname    where 'menuname' is a text string containing the name of your 
  8671.             particular menu.  (MAX. = 80 characters) 
  8672. subid       where 'subid' is a unique number within this particular menu to 
  8673.             define that sub-menu in question. (1-MAXINT) 
  8674. text        where 'text' is a string of text which is to appear in as the title 
  8675.             of that particular sub-menu. 
  8676. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8677.             submenu is selected.  If the submenu has associated items then the 
  8678.             defc is not executed. 
  8679. mis_style   where 'mis_style' is a PM menu style. 
  8680. mis_attr    where 'mis_attr' is a PM menu attribute. 
  8681.  
  8682.  
  8683. ΓòÉΓòÉΓòÉ 6.2.2. Buildmenuitem ΓòÉΓòÉΓòÉ
  8684.  
  8685. The buildmenuitem command appends a menu item under an existing option on the 
  8686. action bar (which can be created with buildsubmenu). The syntax for 
  8687. buildmenuitem is: 
  8688.  
  8689.  
  8690.  
  8691.   buildmenuitem menu_name, subid, item_id, text, cmd, mis_style, mia_attr
  8692.  
  8693. menu_name   where 'menuname' is a string containing the name of your particular 
  8694.             menu.  (MAX. = 80 characters) 
  8695. subid       where 'subid' is a unique number within this particular menu to 
  8696.             define that sub-menu in question. (1-MAXINT) 
  8697. item_id     where 'item id' is a unique number within this particular menu to 
  8698.             define that menu-item in question. (1-MAXINT) 
  8699. text        where 'text' is a string of text which is to appear in as the title 
  8700.             of that particular sub-menu. 
  8701. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8702.             submenu is selected. 
  8703. mis_style   where 'mis_style' is a PM menu style. 
  8704. mis_attr    where 'mis_attr' is a PM menu attribute. 
  8705.  
  8706.  
  8707. ΓòÉΓòÉΓòÉ 6.2.3. Showmenu ΓòÉΓòÉΓòÉ
  8708.  
  8709. Displays a prebuilt menu, built using 'buildsubmenu' and 'buildmenuitem'. The 
  8710. syntax for the showmenu command is: 
  8711.  
  8712.  
  8713.      showmenu menuname
  8714.  
  8715. menuname    where 'menuname' is a string containing the name of your particular 
  8716.             menu.  (MAX. = 80 characters) 
  8717.  
  8718. Note:  When a menu item is selected, the PROCESSMENU command (defined in 
  8719. STDCTRL.E) is called, with an argument of the itemid. PROCESSMENU retrieves the 
  8720. command associated with this itemid in the menu whose name is stored in the 
  8721. universal variable ACTIVEMENU, and then executes the retrieved command. 
  8722. Therefore, whenever a SHOWMENU is done, ACTIVEMENU should be set to the name of 
  8723. the menu that was shown. 
  8724.  
  8725.  
  8726. ΓòÉΓòÉΓòÉ 6.2.4. Deletemenu ΓòÉΓòÉΓòÉ
  8727.  
  8728. Deletes a named menu or a particular part of a named menu from the internal 
  8729. menu manager.  The syntax of the deletemenu command is: 
  8730.  
  8731.  
  8732.       deletemenu menuname, subid, itemid, itemonly
  8733.  
  8734. menuname    where 'menuname' is a string containing the name of your particular 
  8735.             menu.  (MAX. = 80 characters) 
  8736. subid       where 'subid' is the sub-menu that is to be deleted. To delete all 
  8737.             submenus set this parameter to 0. 
  8738. itemid      where 'item id' is the item to start deleting off a particular sub 
  8739.             menu.  To delete all menu items under a sub menu, set this 
  8740.             parameter to 0. 
  8741. itemonly    where 'itemonly' is true if it is desired to delete only the items 
  8742.             under a sub-menu but not the sub-menu itself. 
  8743.  
  8744.  
  8745. ΓòÉΓòÉΓòÉ 6.2.5. querymenustring ΓòÉΓòÉΓòÉ
  8746.  
  8747. Returns the command associated with a menu option. The syntax of the 
  8748. querymenustring command is: 
  8749.  
  8750.  
  8751.      cmd = querymenustring(menuname, subid)
  8752.  
  8753. cmd         where 'cmd' will contain the command associated with the menu 
  8754.             option requested. 
  8755. menuname    where 'menuname' is a string containing the name of the menu to be 
  8756.             queried. 
  8757. subid       where 'subid' is the sub-menu id number of the menu to be queried. 
  8758.  
  8759.  
  8760. ΓòÉΓòÉΓòÉ 6.2.6. sample menu addition ΓòÉΓòÉΓòÉ
  8761.  
  8762. This example shows a menu being added to the default action bar menu. It is 
  8763. defined as a DEFINIT in my MYSTUFF.E file. This means that each time a new edit 
  8764. window is initialized, the action bar option Compile will be added to the 
  8765. default action bar choices. Remember to recompile your editor to have this 
  8766. addition take effect. 
  8767.  
  8768.  
  8769.   definit
  8770.     universal defaultmenu
  8771.     buildsubmenu defaultmenu, 19, 'Compile', '', 0, 0
  8772.     buildmenuitem defaultmenu, 19, 911, 'Save', 'save', 0, 0
  8773.     buildmenuitem defaultmenu, 19, 912, 'Relink', 'relink test', 0, 0
  8774.     showmenu defaultmenu
  8775.  
  8776. Note that the numbers 19, 911, and 912 where chosen to insure that they are 
  8777. unique. 
  8778.  
  8779.  
  8780. ΓòÉΓòÉΓòÉ 6.3. Configuring the Mouse ΓòÉΓòÉΓòÉ
  8781.  
  8782. Power users may want to configure the mouse to meet their needs.  There are 
  8783. three base mouse sets that can be configured. See The EPM User's Guide for 
  8784. information on setting the constant my_Mousestyle to the desired value (1,2 or 
  8785. 3). This will change the basic mouse configuration styles.  You can also 
  8786. configure the mouse actions yourself.  To execute these use the built-in 
  8787. procedure REGISTER_MOUSEHANDLER. 
  8788.  
  8789. By combining several of these register_mousehandler statements together in a 
  8790. DEFLOAD statement, one can customize the mouse actions.  Note that the 
  8791. following defc commands are useful for helping define common mouse actions: 
  8792.  
  8793. o MH_BEGIN_MARK 
  8794. o MH_CANCEL_MARK 
  8795. o MH_END_MARK 
  8796. o HH_GOTOPOSITION 
  8797.  
  8798. See the section Commands Omitted From the User's Guide. for descriptions on 
  8799. these commands. 
  8800.  
  8801. An example use of these commands is: 
  8802.  
  8803.   defc mymouse
  8804.     register_mousehandler(0, '1 CLICK 2', 'MH_GOTOPOSITION')
  8805.     sayerror "New mouse command is in effect."
  8806.  
  8807. Compiling and linking this command into EPM will allow the new mouse action to 
  8808. be added when the command MYMOUSE is entered in the commandline dialog box. 
  8809. Then, whenever you hit a ctrl+left mouse button one click, the cursor will move 
  8810. to the mouse's position. 
  8811.  
  8812. If you want a series of events to happen, define a new command using defc. The 
  8813. following is an example: 
  8814.  
  8815.   defc mycmd
  8816.     getline txtline               -- get the current line
  8817.     'mh_gotoposition'             -- go to the mouse position
  8818.     insertline txtline            -- copy the line
  8819.     up                            -- move up to the new line
  8820.  
  8821.   defc mymouse
  8822.     register_mousehandler(0,'1 CLICK 2','mycmd')  -- set the mouse key
  8823.     sayerror "New mouse command is in effect."    -- show it worked
  8824.  
  8825. In this example, when compiled and linked, executing the command MYMOUSE will 
  8826. setup the ctrl+single button one click combination to copy the line the cursor 
  8827. is on, to the line the mouse is pointing to. See the file MOUSE.E for more 
  8828. examples of defining mouse actions. 
  8829.  
  8830. As you can see, the REGISTER_MOUSEHANDLER is a very powerful command that 
  8831. should be exploited to make the most of EPM and the mouse. 
  8832.  
  8833. Note:  Internally, EPM generates ProcessMouse commands when mouse events are 
  8834.        received; the command definition in MOUSE.E looks up registered events 
  8835.        in an array in order to make it easier for power users to modify 
  8836.        specific actions without having to handle all the other defined actions. 
  8837.        Similarly, in EPM 6, StatWndMouseCmd and MsgWndMouseCmd commands are 
  8838.        generated for certain mouse actions on the status line window and 
  8839.        message line window, respectively.  There is no equivalent to 
  8840.        REGISTER_MOUSEHANDLER to allow overriding a subset of the actions 
  8841.        performed by these commands, but by default they don't do much.  (The 
  8842.        only action defined for either is that double-clicking mouse button 1 on 
  8843.        the message line window activates the Messages dialog.)  If desired, the 
  8844.        commands can be overridden in their entirety.  They receive a subset of 
  8845.        the events described under the REGISTER_MOUSEHANDLER description, 
  8846.        specifically: 
  8847.  
  8848. 1 SECONDCLK 0       received when mouse button 1 is double clicked on the 
  8849.                     window 
  8850. CHORD               received when both mouse button 1 and mouse button 2 are 
  8851.                     clicked at the same time on the window. 
  8852. CONTEXTMENU         received when the defined context menu (pop-up menu) mouse 
  8853.                     action is performed over the window. 
  8854.  
  8855.  
  8856. ΓòÉΓòÉΓòÉ 6.4. Programming Hints ΓòÉΓòÉΓòÉ
  8857.  
  8858. Programming Hints 
  8859.  
  8860.  
  8861. ΓòÉΓòÉΓòÉ 6.4.1. Using REFRESH ΓòÉΓòÉΓòÉ
  8862.  
  8863. Advanced users may find themselves writing applications that rely heavily on 
  8864. the E programming language. In such applications the need may arise to have 
  8865. messages and actions update the screen while the macro continues in progress. 
  8866. Take the following example: 
  8867.  
  8868. defproc delay(time)=       -- procedure to slow things down
  8869.   totaltime=time * 100     -- this procedure represents the time consumed
  8870.   for i = 1 to totaltime   -- ... by calculations and E commands or
  8871.     j = i+5/3              -- ... external programs
  8872.   endfor
  8873.  
  8874. defc mycmd=
  8875.   'togglecontrol 8 1'           -- make sure the message bar is showing
  8876.   'setmessageline Stage one executing...'   -- this should trace
  8877.   call delay(4)                             -- ... the macro's execution
  8878.   'setmessageline Stage two executing...'
  8879.   call delay(4)
  8880.   'setmessageline Stage three executing...'
  8881.  
  8882. In this example, all the message appear very quickly as the message buffer 
  8883. empties at the end of the procedure and not throughout the procedure as was 
  8884. intended.  This occurs because the compiler doesn't refresh the screen during 
  8885. the execution of the macro. Constantly refreshing the screen is very costly and 
  8886. would slow down the execution of EPM too much. To accomplish the goal (ie. have 
  8887. the messageline trace the execution) replace mycmd with: 
  8888.  
  8889. defc mycmd=
  8890.    'togglecontrol 8 1'
  8891.    'setmessageline Stage one executing...'
  8892.    refresh
  8893.    call delay(4)
  8894.    'setmessageline Stage two executing...'
  8895.    refresh
  8896.    call delay(4)
  8897.    'setmessageline Stage three executing...'
  8898.    refresh
  8899.  
  8900. The new MYCMD will show the lines as they execute. All that was added was the 
  8901. internal statement REFRESHto cause a screen refresh. (By the way the command 
  8902. 'TOGGLECONTROL 8 0' will turn the messageline off). 
  8903.  
  8904.  
  8905. ΓòÉΓòÉΓòÉ 6.4.2. Using ECHO ΓòÉΓòÉΓòÉ
  8906.  
  8907. Debugging programs can sometimes be a rather tricky task. E is no exception. 
  8908. There is an internal procedure ECHO that can be inserted into programs to allow 
  8909. a command trace. Whenever a command is executed, it will first appear in a 
  8910. message dialog box. By keeping track of the commands the programmer can help 
  8911. trace down errors. 
  8912.  
  8913. There is also a defc front end for this internal command, allowing ECHO to be 
  8914. issued from the command line dialog box. 
  8915.  
  8916. Another useful debug tool is the messageNwait standard procedure. By placing 
  8917. messageNwaits one can view variables and create check points to verify the 
  8918. macro's execution. 
  8919.  
  8920.  
  8921. ΓòÉΓòÉΓòÉ 6.5. Configuring drag&drop ΓòÉΓòÉΓòÉ
  8922.  
  8923. When something is dropped in the text area of the edit window of EPM 6, a 
  8924. couple of extra checks are performed to allow macro programmers to take special 
  8925. actions.  If the item being dropped has a type, Some type, associated with it, 
  8926. and a command DRGDRPTYP_SOME_TYPE has been defined, then that command will be 
  8927. executed with the filename being passed as a parameter. For types containing 
  8928. spaces, the spaces will be translated to underscores when doing the command 
  8929. lookup.  For objects containing multiple types, only the first type will be 
  8930. checked for. 
  8931.  
  8932. If no DRGDRPTYP_ command was found, then if the filename contains an extension, 
  8933. ext, and a command DRAGDROP_EXT has been defined, that command will be executed 
  8934. with the filename being passed as a parameter. 
  8935.  
  8936. If no match was found above, then if the extension is EX the file will be 
  8937. linked; if the extension is ERX then the Rexx macro will be executed; if the 
  8938. extension is BMP then a DROP_BITMAP command (defined in STDCTRL.E) will be 
  8939. executed; otherwise, the file will either be edited or imported, depending on 
  8940. the user's configuration (the Dropping file selection on the Window page of the 
  8941. Settings dialog). 
  8942.  
  8943.  
  8944. ΓòÉΓòÉΓòÉ 7. Linkable External Modules ΓòÉΓòÉΓòÉ
  8945.  
  8946. Linkable external modules. 
  8947.  
  8948.  
  8949. ΓòÉΓòÉΓòÉ 7.1. Introduction ΓòÉΓòÉΓòÉ
  8950.  
  8951. You can compile a group of .E files into an .EX file that is separate from the 
  8952. E.EX file, and yet still incorporate both into the editor. In other words, 
  8953. multiple .EX files can be loaded into the editor. Each .EX file can use up to 
  8954. 64K of p-code space. This means that there's effectively no limit on the total 
  8955. size of a user's compiled macros, as long as they can be broken into logical 
  8956. chunks ("modules") of less than 64K each. 
  8957.  
  8958. I'll use the DRAW feature as an example of the new reorganization of E via 
  8959. these linkable modules. We used to include the draw code into the base E.E so 
  8960. that it was always available, and always occupied 3410 bytes of p-code space. 
  8961. But in version 4.02, E.E omits the feature: 
  8962.  
  8963.    compile if EVERSION < '4.02'
  8964.     include 'slimdraw.e'
  8965.    compile endif
  8966. Instead, DRAW.E is compiled separately into its own .EX file. Now when you type 
  8967. draw in the command dialog box, EPM searches for DRAW.EX on disk, loads it into 
  8968. its own block of memory, and begins execution. The relocation of the draw code 
  8969. is transparent to the user, except for the slight delay of the disk search. 
  8970. Once the draw command is completed, the module is released again, to free up 
  8971. memory. 
  8972.  
  8973.  
  8974. ΓòÉΓòÉΓòÉ 7.2. Implicit Loading of External Modules ΓòÉΓòÉΓòÉ
  8975.  
  8976. External modules can be invoked implicitly, by simply issuing the name of the 
  8977. module as a command.  As in our previous example, the user (or a macro) can 
  8978. simply issue the DRAW command (F6). When E sees that the command is not in its 
  8979. base set, it will search the disk for an .EX file of the same name. The search 
  8980. follows the same rules as for shelling an external .EXE program: 
  8981.  
  8982. o It does not occur if AUTOSHELL is off. 
  8983.  
  8984. o The search path is: 
  8985.  
  8986.    - the current directory, 
  8987.    - the directories in PATH, 
  8988.    - the directories in EPMPATH, and 
  8989.    - E's directory. 
  8990.  
  8991. o An .EX file will be found before a .EXE or .CMD file, but after an internal 
  8992.   system command.  (That is, you can't name a module EDIT.EX because EDIT will 
  8993.   always be recognized first as an internal system command.) 
  8994. Upon activation of the module, its code contents will be executed in the 
  8995. following order: 
  8996.  
  8997. o DEFINIT will be executed first if it exists.  This will consist of minor 
  8998.   initialization tasks like predefining variables. 
  8999.  
  9000. o DEFMAIN will be executed.  This is the body of the command.  If you convert 
  9001.   an old macro to an external module, you'll usually rename its DEFC to 
  9002.   DEFMAIN.  For instance, when SLIMDRAW.E was converted to the module DRAW.E, 
  9003.   defc draw was changed to defmain. 
  9004.  
  9005. o DEFEXIT, if it exists, will be executed after DEFMAIN finishes. 
  9006.  
  9007. When a module is invoked implicitly, it is executed once and discarded.  All 
  9008. three sections -- DEFINIT, DEFMAIN, DEFEXIT -- are run in sequence, so the 
  9009. division makes little difference; you'd get the same results by lumping them 
  9010. all into DEFMAIN. 
  9011.  
  9012.  
  9013. ΓòÉΓòÉΓòÉ 7.3. Explicit Linking of External Modules ΓòÉΓòÉΓòÉ
  9014.  
  9015. For better control, you can explicitly load a module with the LINK and UNLINK 
  9016. statements.  The DRAW module can be linked by the statement: 
  9017.  
  9018.    link 'draw'
  9019. E will search the disk for the explicit filename DRAW.EX, without bothering to 
  9020. check for internal system commands or .EXE files. This gives you some minor 
  9021. advantages since an explicit search can be faster, and the module can have the 
  9022. same name as a system command (DIR.EX) or a DEFC compiled into your base set. 
  9023. But the primary advantage is a better control of the order of execution. 
  9024. DEFMAIN is not executed at all.  DEFINIT is executed at link time, and DEFEXIT 
  9025. at unlink time.  In the interim all the module's commands, procs, universal 
  9026. variables and keysets are available globally.  This will be important if 
  9027. procedures or variables are shared by several modules. 
  9028.  
  9029. Explicit linking to the draw module does NOT execute the DRAW command. In fact 
  9030. the DEFMAIN of such a module is never executed if it is explicitly linked. In 
  9031. order to execute the DRAW command under these conditions, you must define a 
  9032. defc draw. The following example shows how the new external draw module allows 
  9033. users to link to it implicitly and explicitly: 
  9034.  
  9035. definit
  9036.     /* initializations, global vars, etc. */
  9037.  
  9038. defmain
  9039.     'draw' arg(1)
  9040.  
  9041. defc draw
  9042.     /* code which implements DRAW command */
  9043.     /*   remains the same as when it was  */
  9044.     /*   included in E.E                  */
  9045.  
  9046. If you repeat a link of an already-linked module, no harm is done.  The disk is 
  9047. not searched again, but the module's DEFINIT is re-executed as if the module 
  9048. were reloaded from scratch. 
  9049.  
  9050. Note:  if your module has a DEFEXIT, don't use a STOP statement to end 
  9051. execution of DEFMAIN.  A STOP will permanently end the module's execution 
  9052. before getting to the DEFEXIT. 
  9053.  
  9054. Note:  The RC, universal return code variable, is set to the module number of 
  9055. the .ex file linked. 
  9056.  
  9057.  
  9058. ΓòÉΓòÉΓòÉ 7.4. Useful Commands ΓòÉΓòÉΓòÉ
  9059.  
  9060. Since LINK and UNLINK are statements, we had to redefine them as commands in 
  9061. order to give you access to explicit linking from the command dialog box. We 
  9062. also added a RELINK command. All of these commands are defined in the file 
  9063. LINKCMDS.E as follows: 
  9064.  
  9065.    defc link
  9066.       link arg(1)
  9067.  
  9068.    defc unlink
  9069.       unlink arg(1)
  9070. A combination of the two gives us the nifty RELINK command: 
  9071.  
  9072.    defc relink
  9073.       if arg() > 0 then
  9074.         modulename=arg(1)     -- if argument is given, then uses that
  9075.       else
  9076.         modulename=.filename  -- if no argument, then assume current file
  9077.         'save '||.filename    --   ... and save current file
  9078.       endif
  9079.       'etpm' modulename       -- Recompile it,
  9080.       unlink modulename       --   unlink the old version,
  9081.       link modulename         --     relink the new one.
  9082. This is very useful for fast development of macros, since you don't have to 
  9083. exit from the editor to compile revised macros and re-run the newly compiled 
  9084. version. You can relink a macro in a few seconds.  (RELINK DRAW, for example, 
  9085. takes 3 seconds on my AT. Understand that the slow step is the compilation; 
  9086. LINK and UNLINK are almost instantaneous.) 
  9087.  
  9088. When using LINK, UNLINK and RELINK as commands, you need not enclose the module 
  9089. name in quotes. For example, the statement link 'draw' is acceptable, but the 
  9090. command link 'draw' would be incorrect. The interpreter would assume that the 
  9091. name of the module was six characters and included the quotes. The correct 
  9092. syntax for the command (i.e. issued from the command line dialog box) is: 
  9093.  
  9094. link draw
  9095.  
  9096.  
  9097. ΓòÉΓòÉΓòÉ 7.5. Keysets ΓòÉΓòÉΓòÉ
  9098.  
  9099. Individual keys cannot be linked; you cannot define a single key (like def f1) 
  9100. in an external module.  You can however link a keyset, which is almost as easy, 
  9101. by following these steps: 
  9102.  
  9103.  1. Begin the key definitions with a DEFKEYS declaration: 
  9104.  
  9105.            In MYMODULE.E:
  9106.  
  9107.               defkeys mymodule_keys
  9108.               def f5=
  9109.                  sayerror 'F5 pressed'
  9110.  
  9111.  2. Compile the module: et mymodule. 
  9112.  
  9113.  3. Link it: link mymodule. 
  9114.  
  9115.  4. Execute a KEYS statement: keys mymodule_keys. The best place to put the 
  9116.     KEYS statement is in the module's DEFINIT so that it automatically gets 
  9117.     executed immediately after linking: 
  9118.  
  9119.               definit        -- Also in MYMODULE.E
  9120.                  keys mymodule_keys
  9121.  
  9122. It doesn't make much sense to define keys in a module that will be implicitly 
  9123. loaded.  An implicitly-loaded module will be run once and discarded; its keyset 
  9124. will not be retained long enough to be used. Instead you should explicitly link 
  9125. an external module with keyset definitions, so that its resources will stick 
  9126. around until released. 
  9127.  
  9128. Keysets are stored economically (as a linked list) so that a two-key keyset 
  9129. occupies only 8 bytes.  The expansion and overlaying onto a base keyset occur 
  9130. at run time, within the KEYS statement. 
  9131.  
  9132. Partial keysets can be defined usefully in external modules. edit_keys can be 
  9133. defined in the base module E.E, and mymodule_keys can be defined elsewhere. 
  9134. The overlaying occurs soon after the link (assuming you put a KEYS statement in 
  9135. MYMODULE's DEFINIT as recommended). We refer to the partial external keyset as 
  9136. an overlay keyset and edit_keys as the base. E will accept BASE as a synonym 
  9137. for NEW, and OVERLAY means the same thing as the absence of NEW.  The following 
  9138. are equivalent: 
  9139.  
  9140.    defkeys edit_keys new     =      defkeys edit_keys base
  9141.    defkeys c_keys            =      defkeys c_keys overlay
  9142.  
  9143. You can return to the base edit_keys either by executing keys edit_keys or by 
  9144. unlink 'mymodule'. When a module is unlinked, its keyset is automatically 
  9145. removed. 
  9146.  
  9147. Note:  That's true only for OVERLAY keysets.  E will complain if you try to 
  9148. unlink a module containing the current base keyset, since that would leave no 
  9149. keys at all.  You'd see the message Cannot unlink base keyset module. 
  9150.  
  9151. Note:  A base keyset (as defined by DEFKEYS BASE or NEW) is automatically given 
  9152. a starting set of the standard 128 ASCII keys, including 'A'-'Z', '0'-'9', and 
  9153. control keys.  Even if you don't give the keyset any DEF's, it will include the 
  9154. ASCII keys.  But some applications might not want those keys included, so 
  9155. another keyset attribute CLEAR has been added.  For example: 
  9156.  
  9157.    defkeys zero_keys base clear
  9158. defines a REALLY empty keyset. 
  9159.  
  9160.  
  9161. ΓòÉΓòÉΓòÉ 7.6. Multiple Definitions ΓòÉΓòÉΓòÉ
  9162.  
  9163. If a command (DEFC) of the same name is defined in more than one module, the 
  9164. highest (latest-linked) module wins.  The last-linked module can be regarded as 
  9165. the "current application", whose commands take precedence in case of name 
  9166. conflicts.  If the highest module is unlinked, commands in lower modules become 
  9167. available again. Keysets are similar.  If multiple modules define the same 
  9168. keyset name, the latest-linked module's keyset wins. 
  9169.  
  9170. If a procedure (DEFPROC) is defined in multiple modules, the definition in the 
  9171. caller's module (if any) wins, whether or not that module is the latest-linked. 
  9172. This is consistent with the concept of a current application. If module 3 calls 
  9173. myproc() and module 3 itself contains a defproc myproc(), that's certainly the 
  9174. one that the application writer intended to be called. 
  9175.  
  9176. If a procedure is multiply defined but none of the definitions are in the 
  9177. caller's module, an error Call: duplicated proc is issued. If a procedure is 
  9178. defined only once, that definition wins even if it isn't in the caller's 
  9179. module. 
  9180.  
  9181. To determine a module number, issue a QLINK command followed by the name of an 
  9182. E module already linked. For example: 
  9183.  
  9184.   QLINK EPM
  9185.  
  9186. would return module number zero (the lowest level) because it is always linked, 
  9187. and always the first module loaded. 
  9188.  
  9189. Universal variables can be declared in many different modules, all of which 
  9190. share the same data. A universal variable is not discarded as long as any 
  9191. active module references it.  Thus a module can initialize a variable and be 
  9192. unlinked, without the value being lost, as long as any other module needs it. 
  9193.  
  9194.  
  9195. ΓòÉΓòÉΓòÉ 7.7. E Applications ΓòÉΓòÉΓòÉ
  9196.  
  9197. Large applications are feasible in the E language. Dynamic linking, i.e. the 
  9198. ability to link a compiled module at run-time, makes it possible to distribute 
  9199. an application as a compiled .EX file.  Distributing object-code-only 
  9200. applications is possible. This is not recommended, as many programmers wish to 
  9201. be able to examine and adjust the source code of applications according to 
  9202. their own needs. However, this type of distribution would have its advantages. 
  9203. For example, this would make such an application much easier for the end-user 
  9204. to use. The user would simply have to: 
  9205.  
  9206.  1. copy it onto the hard disk, somewhere along the PATH, and 
  9207.  
  9208.  2. type its name as a command. 
  9209.  
  9210.     Note:  that's strictly true only for implicit loading. Complex applications 
  9211.     will usually require explicit LINK and UNLINK commands, but even those can 
  9212.     be given single-word front ends if desired; see MATH.E for examples. 
  9213. In addition, invoking it is fast: the time for a link equals a fraction of a 
  9214. second plus the path-search time.  (Path-search times can be minimized by 
  9215. explicit LINK commands with explicit file specs for the modules, like "link 
  9216. c:\epm\mymodule".) 
  9217.  
  9218. Another recent change to support compiled applications is that: EPM.EXE can run 
  9219. earlier-version .EX files.  If a developer releases an application as an 
  9220. object-code black box (compiled, say, with ET 4.03) it will still be runnable 
  9221. if and when the user upgrades EPM.EXE.  The versions of E and ETPM will not 
  9222. have to match, as long as E is more recent than the .EX file. (Assuming we 
  9223. don't make any more major structural revisions as we did in release 4.02.) 
  9224.  
  9225. If your application really must know the exact versions of E and ET it's 
  9226. working with, it can check two things: 
  9227.  
  9228. o EVERSION is a constant supplied automatically by ET.  It's a constant 
  9229.   attribute of the .EX file. The name EVERSION appears to be an unfortunate 
  9230.   choice in hindsight, since it's really ETVERSION. 
  9231.  
  9232. o A new function VER() provides EPM.EXE's version.  This will be the same 
  9233.   version number now shown by the VER command, but in function form so it's 
  9234.   queryable by a macro. 
  9235. Your application could do something like: 
  9236.  
  9237.    if ver() <> EVERSION then
  9238.       sayerror "Sorry, I can only run with EPM.EXE version "EVERSION"."
  9239.       stop
  9240.    endif
  9241.  
  9242. Note:  Advice to writers of add-on applications:  If you're writing a 
  9243. stand-alone E application, one that you'd like to compile separately and link 
  9244. in as an external module (which we recommend), feel free to include STDCONST.E 
  9245. because unused constants do not waste space now.  You should also try to 
  9246. include MYCNF.E to allow the user to pre-override your constants.  A catch-all 
  9247. header is: 
  9248.  
  9249.    include     'colors.e'
  9250.    include     'stdconst.e'
  9251.    tryinclude  'mycnf.e'
  9252. Your applications can check whether the user overrode your constants with 
  9253. compile if defined().  For example: 
  9254.  
  9255.    compile if not defined(AUTOSAVE_PATH)
  9256.       const AUTOSAVE_PATH=''
  9257.    compile endif
  9258. A similar technique allows your application to check whether it's being 
  9259. compiled as part of the base (by an INCLUDE) or as an external module (by a 
  9260. LINK).  Query the existence of any constant that's defined in the base, like 
  9261. SMALL. 
  9262.  
  9263.    compile if not defined(SMALL) -- are we separately compiled?
  9264.     include 'colors.e'           -- if so, must include color names
  9265.    compile endif
  9266.  
  9267. The file USERAPP.SMP, which is included in EMACROS.FLS, is a good example of a 
  9268. routine that tests to see if it's base or external; if external, sets 
  9269. configuration constants the same way they would be set if it were included in 
  9270. the base; and defines the routines it needs without duplicating anything that's 
  9271. included in the base macros. 
  9272.  
  9273.  
  9274. ΓòÉΓòÉΓòÉ 7.8. Dynamic Linking ΓòÉΓòÉΓòÉ
  9275.  
  9276. Dynamic linking is the delayed binding of application program external 
  9277. references to subroutines.  There are two forms of dynamic linking -- load time 
  9278. and run time. 
  9279.  
  9280. In load time dynamic linking, a program calls a dynamically linked routine just 
  9281. as it would any external routine.  When the program is assembled or compiled, a 
  9282. standard external reference is generated.  At link time, the programmer 
  9283. specifies one or more libraries which contain routines to satisfy external 
  9284. references.  External routines to be dynamically linked contain special 
  9285. definition records in the library.  A definition record tells the linker that 
  9286. the routine in question is to be dynamically linked and provides the linker 
  9287. with a dynamic link module name and entry name.  The module name is the name of 
  9288. a special executable file with the filename extension of .DLL which contains 
  9289. dynamic link entry points.  The linker stores module name/entry name pairs 
  9290. describing the dynamic link routines in the executable file created for the 
  9291. program. When the calling program is run, OS/2 loads the dynamic link routines 
  9292. from the modules specified and links the calling program to the called 
  9293. routines. 
  9294.  
  9295. For more information on Dynamic Linking see the OS/2 Technical Reference 
  9296. Manual. For an example of dynamic linking in E using the DYNALINK command see 
  9297. the DYNATEST.E file. 
  9298.  
  9299.  
  9300. ΓòÉΓòÉΓòÉ 7.9. Run-Time Error Messages for Linking and Keysets ΓòÉΓòÉΓòÉ
  9301.  
  9302. Call: duplicated proc 
  9303.                               A macro called a procedure that is not defined in 
  9304.                               the caller's module, but which is defined in more 
  9305.                               than one other module.  The caller can't decide 
  9306.                               which DEFPROC is the right one. 
  9307.  
  9308. Call: unknown proc 
  9309.                               A macro tried to call a procedure that is not 
  9310.                               defined in any module. Note that ET will now 
  9311.                               allow you to compile an .E file with unresolved 
  9312.                               procedure calls; it assumes some other module 
  9313.                               will supply the DEFPROC by the time the call 
  9314.                               occurs.  If that doesn't happen, this message is 
  9315.                               given at run-time. 
  9316.  
  9317. Cannot find keyset 
  9318.                               A macro tried to execute a KEYS statement with an 
  9319.                               unknown keyset name. Perhaps the module 
  9320.                               containing the keyset (the DEFKEYS) has not been 
  9321.                               linked. 
  9322.  
  9323. Cannot unlink base keyset module 
  9324.                               You tried to unlink the module that selected the 
  9325.                               current base keyset. What keys would be left 
  9326.                               after the unlink? 
  9327.  
  9328. Cannot unlink module in use 
  9329.                               A macro tried to unlink the same module it was 
  9330.                               contained in.  Or it tried to unlink a calling 
  9331.                               module (one that must be kept around for 
  9332.                               returning to). Only modules which are not 
  9333.                               involved in the current chain of execution can be 
  9334.                               unlinked.  You can produce this message by the 
  9335.                               command 'UNLINK E' which tries to unlink E.EX. 
  9336.  
  9337. Invalid EX file or incorrect version 
  9338.                               You tried to link to a file that does not have 
  9339.                               the proper .EX format expected, or you tried to 
  9340.                               link to an .EX file that was compiled with a past 
  9341.                               version of the ET translator. 
  9342.  
  9343. Link: file not found 
  9344.                               You probably misspelled the module's filename in 
  9345.                               a LINK statement. The filename.EX could not be 
  9346.                               found in the current directory or along the PATH. 
  9347.  
  9348. Link: invalid filename 
  9349.                               The module name is poorly formed in a link 
  9350.                               statement, for example with multiple periods or 
  9351.                               colons.  This is an unusual error; normally 
  9352.                               you'll get "Link: file not found". 
  9353.  
  9354. Unlink: bad module filename 
  9355.                               You tried to unlink a module that does not exist 
  9356.                               on disk. 
  9357.  
  9358. Unlink: unknown module 
  9359.                               You tried to unlink a module that is not 
  9360.                               currently linked, although it does exist on the 
  9361.                               disk. 
  9362.  
  9363.  
  9364. ΓòÉΓòÉΓòÉ 8. E Language Syntax ΓòÉΓòÉΓòÉ
  9365.  
  9366. In this appendix the syntax of the E language is presented in a modified EBNF 
  9367. notation. For those who are unfamiliar with this form, a brief summary of its 
  9368. symbolic conventions are presented here: 
  9369.  
  9370. Keywords of the E language are printed here entirely in capital letters. All 
  9371. program components (non-terminals) whose definition is included in this section 
  9372. are highlighted in a bold font. All other literals (i.e. those strings that 
  9373. should be included in an E phrase exactly as they appear here in the syntax) 
  9374. are enclosed with single or double quotes. Any other character in the syntax is 
  9375. used as a symbol to convey the following meanings: 
  9376.  
  9377. A B       represents the concatenation of A AND B. 
  9378. (A | B)   represents either expression A OR expression B. 
  9379. [ A ]     represents an optional occurrence of expression A: zero or one 
  9380.           occurrence. 
  9381. { A }     represents zero or more occurrences of expression A. 
  9382. 'a'..'z'  represents: 'a' OR 'b' OR 'c' ... OR 'z' 
  9383.  
  9384.  
  9385. ΓòÉΓòÉΓòÉ 8.1. Syntax Notes ΓòÉΓòÉΓòÉ
  9386.  
  9387.  1. A semicolon is treated the same as a new line.  Wherever you see ';' in the 
  9388.     following listing, a line-break (a 'newline', CR-LF) is acceptable. Several 
  9389.     examples of line breaks were given in the earlier section Line 
  9390.     Continuations. 
  9391.  
  9392.  2. Quoted strings in syntax descriptions below indicate that the enclosed 
  9393.     string is not a keyword in the language.  Quoted strings (ex. 'filename') 
  9394.     below are not case specific. 
  9395.  
  9396.  3. For speed reasons the lexer does not return a space token for space and tab 
  9397.     characters. Syntax descriptions have been written without space tokens for 
  9398.     convenience. 
  9399.  
  9400.  4. Strings may not cross file or line boundaries. 
  9401.  
  9402.  5. Comments may not cross file boundaries.   There are three styles of 
  9403.     comments.    /*  */  may be nested and may cross line boundaries.    ; 
  9404.     in column 1 makes the rest of line a comment.    --    in any column makes 
  9405.     the rest of line a comment. 
  9406.  
  9407.  6. Include files may be nested. 
  9408.  
  9409.  7. Implied concatenation expressions with comments between have undefined 
  9410.     values.       'a'  /* comment */'b'    Undefined value 
  9411.  
  9412.  8. Identifiers are not case sensitive. 
  9413.  
  9414.  9. Compiler directives (COMPILE IF and INCLUDEs) are included in the following 
  9415.     listing, but cannot be sufficiently explained with this limited syntactical 
  9416.     depiction. Be aware that they can occur anywhere a semicolon or newline 
  9417.     can. For a more in depth discussion, see section Compiler Directive 
  9418.     Statements. 
  9419.  
  9420.  
  9421. ΓòÉΓòÉΓòÉ 8.2. The Syntax ΓòÉΓòÉΓòÉ
  9422.  
  9423. Syntax of the E language. 
  9424.  
  9425.  
  9426. ΓòÉΓòÉΓòÉ 8.2.1. e_program ΓòÉΓòÉΓòÉ
  9427.  
  9428. e_program ::=  definition_group 
  9429.  
  9430.  
  9431. ΓòÉΓòÉΓòÉ 8.2.2. definition_group ΓòÉΓòÉΓòÉ
  9432.  
  9433. definition_group ::=   definition  {definition} 
  9434.  
  9435.  
  9436. ΓòÉΓòÉΓòÉ 8.2.3. definition ΓòÉΓòÉΓòÉ
  9437.  
  9438. definition ::=  DEF  keyname {','{';'} keyname} ['=']   global_decl_group 
  9439. statement_group   [RETURN] 
  9440.  
  9441. | DEFC  identifier {',' identifier} ['=']   global_decl_group  statement_group 
  9442. [RETURN [expression] ] 
  9443.  
  9444. | DEFEXIT {';'} global_decl_group  statement_group 
  9445.  
  9446. | DEFINIT {';'} global_decl_group  statement_group 
  9447.  
  9448. | DEFKEYS  identifier [NEW | BASE | OVERLAY | CLEAR] 
  9449.  
  9450. | DEFMAIN {';'} global_decl_group  statement_group 
  9451.  
  9452. | DEFPROC identifier ['('{';'} formal_decl_group')']   global_decl_group 
  9453. statement_group   [RETURN [expression] ] 
  9454.  
  9455. | SET 'cursors' ['=']  number 
  9456.  
  9457. | SET 'insert_state' ['='] 0 | 1 
  9458.  
  9459. | CONST  {';'} const_decl_group 
  9460.  
  9461. | compiler_directive 
  9462.  
  9463. | ';' 
  9464.  
  9465.  
  9466. ΓòÉΓòÉΓòÉ 8.2.4. compiler_directive ΓòÉΓòÉΓòÉ
  9467.  
  9468. compiler_directive  INCLUDE  string ';' 
  9469.  
  9470. | TRYINCLUDE  string ';' 
  9471.  
  9472. | COMPILE IF constant_expression { ';' }     ( statement_group | 
  9473. definition_group )   {COMPILE ELSEIF constant_expression { ';' }     ( 
  9474. statement_group | definition_group ) }   [COMPILE ELSE  { ';' }     ( 
  9475. statement_group | definition_group ) ]   COMPILE ENDIF 
  9476.  
  9477.  
  9478. ΓòÉΓòÉΓòÉ 8.2.5. formal_decl_group ΓòÉΓòÉΓòÉ
  9479.  
  9480. formal_decl_group ::=  formal_declaration { {';'} [','] {';'} 
  9481. formal_declaration } 
  9482.  
  9483.  
  9484. ΓòÉΓòÉΓòÉ 8.2.6. formal_declaration ΓòÉΓòÉΓòÉ
  9485.  
  9486. formal_declaration ::=  [VAR]  identifier 
  9487.  
  9488.  
  9489. ΓòÉΓòÉΓòÉ 8.2.7. const_decl_group ΓòÉΓòÉΓòÉ
  9490.  
  9491. const_decl_group ::=  { constant_declaration {';'} (';' | ',') {';'} } 
  9492.  
  9493.  
  9494. ΓòÉΓòÉΓòÉ 8.2.8. constant_declaration ΓòÉΓòÉΓòÉ
  9495.  
  9496. constant_declaration ::=  identifier '='  expression 
  9497.  
  9498.  
  9499. ΓòÉΓòÉΓòÉ 8.2.9. global_decl_group ΓòÉΓòÉΓòÉ
  9500.  
  9501. global_decl_group ::=  {global_declaration {';'} } 
  9502.  
  9503.  
  9504. ΓòÉΓòÉΓòÉ 8.2.10. global_declaration ΓòÉΓòÉΓòÉ
  9505.  
  9506. global_declaration ::=  UNIVERSAL {';'}  identifier ['*']  {';'} {',' {';'} 
  9507. identifier } 
  9508.  
  9509.  
  9510. ΓòÉΓòÉΓòÉ 8.2.11. keyname ΓòÉΓòÉΓòÉ
  9511.  
  9512. keyname ::=  " ' " printable_char " ' " 
  9513.  
  9514. | " ' " printable_char " ' " '-' " ' "printable_char " ' " 
  9515.  
  9516. Although ETPM will accept all key definitions, some may seem not to take effect 
  9517. because PM intercepts these keys before EPM sees them. For a list of these keys 
  9518. see PM Keys. 
  9519.  
  9520. | 'backspace' 
  9521.  
  9522. | 'keydown' 
  9523.  
  9524. | 'keyend' 
  9525.  
  9526. | 'keyenter' 
  9527.  
  9528. | 'keyleft' 
  9529.  
  9530. | 'keyright' 
  9531.  
  9532. | 'keytab' 
  9533.  
  9534. | 'keyup' 
  9535.  
  9536. | 'space' 
  9537.  
  9538. | 'del' 
  9539.  
  9540. | 'end' 
  9541.  
  9542. | 'tab' 
  9543.  
  9544. | 'up' 
  9545.  
  9546. | 'enter' 
  9547.  
  9548. | 'entry' 
  9549.  
  9550. | 'esc' 
  9551.  
  9552. | 'f1'..'f12' 
  9553.  
  9554. | 'down' 
  9555.  
  9556. | 'home' 
  9557.  
  9558. | 'ins' 
  9559.  
  9560. | 'left' 
  9561.  
  9562. | 'pgdn' 
  9563.                                | 'pagedown' 
  9564.  
  9565. | 'pgup' 
  9566.                                | 'pageup' 
  9567.  
  9568. | 'right' 
  9569.  
  9570. | 'padenter' 
  9571.                                | 'pad_enter' 
  9572.  
  9573. | 's_f1'..'s_f12' 
  9574.  
  9575. | 's_tab' 
  9576.  
  9577. | 's_backspace' 
  9578.  
  9579. | 's_enter' 
  9580.  
  9581. | 's_esc' 
  9582.  
  9583. | 's_pgup' 
  9584.                                | 's_pageup' 
  9585.  
  9586. | 's_pgdn' 
  9587.                                | 's_pagedown' 
  9588.  
  9589. | 's_end' 
  9590.  
  9591. | 's_home' 
  9592.  
  9593. | 's_left' 
  9594.  
  9595. | 's_up' 
  9596.  
  9597. | 's_right' 
  9598.  
  9599. | 's_down' 
  9600.  
  9601. | 's_ins' 
  9602.  
  9603. | 's_del' 
  9604.  
  9605. | 's_padenter' 
  9606.  
  9607. | 's_space 
  9608.  
  9609. | 'a_0'..'a_9' 
  9610.  
  9611. | 'a_a'..'a_z' 
  9612.  
  9613. | 'a_f1'..'a_f12' 
  9614.  
  9615. | 'a_enter' 
  9616.  
  9617. | 'a_padenter' 
  9618.  
  9619. | 'a_backspace' 
  9620.  
  9621. | 'a_space' 
  9622.  
  9623. | 'a_minus' 
  9624.  
  9625. | 'a_equal' 
  9626.  
  9627. | 'a_leftbracket' 
  9628.  
  9629. | 'a_rightbracket' 
  9630.  
  9631. | 'a_tab' 
  9632.  
  9633. | 'a_quote' 
  9634.  
  9635. | 'a_comma' 
  9636.  
  9637. | 'a_period' 
  9638.  
  9639. | 'a_slash' 
  9640.  
  9641. | 'a_semicolon' 
  9642.  
  9643. | 'a_backslash' 
  9644.  
  9645. | 'c_0'..'c_9' 
  9646.  
  9647. | 'c_a'..'c_z' 
  9648.  
  9649. | 'c_f1'..'c_f12' 
  9650.  
  9651. | 'c_backslash' 
  9652.  
  9653. | 'c_backspace' 
  9654.  
  9655. | 'c_keyenter' 
  9656.  
  9657. | 'c_pagdown' 
  9658.                                | 'c_pgdn' 
  9659.  
  9660. | 'c_pageup' 
  9661.                                | 'c_pgup' 
  9662.  
  9663. | 'c_space' 
  9664.  
  9665. | 'c_quote' 
  9666.  
  9667. | 'c_comma' 
  9668.  
  9669. | 'c_period' 
  9670.  
  9671. | 'c_slash' 
  9672.  
  9673. | 'c_semicolon' 
  9674.  
  9675. | 'c_equal' 
  9676.  
  9677. | 'c_del' 
  9678.  
  9679. | 'c_down' 
  9680.  
  9681. | 'c_end' 
  9682.  
  9683. | 'c_enter' 
  9684.  
  9685. | 'c_home' 
  9686.  
  9687. | 'c_ins' 
  9688.  
  9689. | 'c_left' 
  9690.  
  9691. | 'c_leftbracket' 
  9692.  
  9693. | 'c_minus' 
  9694.  
  9695. | 'c_prtsc' 
  9696.  
  9697. | 'c_right' 
  9698.  
  9699. | 'c_rightbracket' 
  9700.  
  9701. | 'c_tab' 
  9702.  
  9703. | 'c_up' 
  9704.  
  9705. | 'c_padenter' 
  9706.                                | 'c_pad_enter' 
  9707.  
  9708. | 'otherkeys' 
  9709.                                | 'other_keys' 
  9710.  
  9711.  
  9712. ΓòÉΓòÉΓòÉ 8.2.12. statement_group ΓòÉΓòÉΓòÉ
  9713.  
  9714. statement_group ::=  { {';'}  statement ';' {';'} } 
  9715.  
  9716.  
  9717. ΓòÉΓòÉΓòÉ 8.2.13. statement ΓòÉΓòÉΓòÉ
  9718.  
  9719. statement ::=  assignment_statement 
  9720.  
  9721. | built-in_statement 
  9722.  
  9723. | conditional_statement 
  9724.  
  9725. | parse_statement 
  9726.  
  9727. | compiler_directive 
  9728.  
  9729. | procedure_call 
  9730.  
  9731. |  " ' "command" ' " All commands used in an E program must be quoted, e.g. 
  9732. if new=0 then       'edit' 
  9733.  
  9734.  
  9735. ΓòÉΓòÉΓòÉ 8.2.14. assignment_statement ΓòÉΓòÉΓòÉ
  9736.  
  9737. assignment_statement ::=  designator '=' expression 
  9738.  
  9739.  
  9740. ΓòÉΓòÉΓòÉ 8.2.15. designator ΓòÉΓòÉΓòÉ
  9741.  
  9742. designator ::=  identifier 
  9743.  
  9744. | identifier '.'  field 
  9745.  
  9746. | '.'  field 
  9747.  
  9748. | built-in_universal_variable 
  9749.  
  9750.  
  9751. ΓòÉΓòÉΓòÉ 8.2.16. field ΓòÉΓòÉΓòÉ
  9752.  
  9753. field ::=  'autosave' 
  9754.  
  9755. | 'autoshell' 
  9756.  
  9757. | 'col' 
  9758.  
  9759. | 'cursorx' 
  9760.  
  9761. | 'cursory' 
  9762.  
  9763. | 'dragcolor' 
  9764.  
  9765. | 'dragstyle' 
  9766.  
  9767. | 'fileinfo' 
  9768.  
  9769. | 'filename' 
  9770.  
  9771. | 'font' 
  9772.  
  9773. | 'fontheight' 
  9774.  
  9775. | 'fontwidth' 
  9776.  
  9777. | 'keyset' 
  9778.  
  9779. | 'last' 
  9780.  
  9781. | 'line' 
  9782.  
  9783. | 'lineg' 
  9784.  
  9785. | 'lockhandle' 
  9786.  
  9787. | 'margins' 
  9788.  
  9789. | 'markcolor' 
  9790.  
  9791. | 'messagecolor' 
  9792.  
  9793. | 'modify' 
  9794.  
  9795. | 'mousex' 
  9796.  
  9797. | 'mousey' 
  9798.  
  9799. | 'statuscolor' 
  9800.  
  9801. | 'tabs' 
  9802.  
  9803. | 'textcolor' 
  9804.  
  9805. | 'userstring' 
  9806.  
  9807. | 'visible' 
  9808.  
  9809. | 'windowheight' 
  9810.  
  9811. | 'windowwidth' 
  9812.  
  9813. | 'windowx' 
  9814.  
  9815. | 'windowy' 
  9816.  
  9817.  
  9818. ΓòÉΓòÉΓòÉ 8.2.17. built-in_universal_variable ΓòÉΓòÉΓòÉ
  9819.  
  9820. built-in_universal_variable ::= CENTER_SEARCH 
  9821.  
  9822. | JOIN_AFTER_WRAP 
  9823.  
  9824. | RC 
  9825.  
  9826. | EXIT_AFTER_LAST_FILE 
  9827.  
  9828. | TWO_SPACES 
  9829.  
  9830.  
  9831. ΓòÉΓòÉΓòÉ 8.2.18. built-in_statement ΓòÉΓòÉΓòÉ
  9832.  
  9833. built-in_statement ::= See individual statement. 
  9834.  
  9835.  
  9836. ΓòÉΓòÉΓòÉ 8.2.19. conditional_statement ΓòÉΓòÉΓòÉ
  9837.  
  9838. conditional_statement ::=  DO  i=expression  TO  expression [BY expression] 
  9839. statement_group  [LEAVE] [ITERATE] statement_group  (END | ENDDO) 
  9840.  
  9841. | DO FOREVER   statement_group  [LEAVE] [ITERATE] statement_group  (END | 
  9842. ENDDO) 
  9843.  
  9844. | DO WHILE expression   statement_group  [LEAVE] [ITERATE] statement_group 
  9845. (END | ENDDO) 
  9846.  
  9847. | FOR i=expression TO expression [BY expression]   statement_group  [LEAVE] 
  9848. [ITERATE] statement_group  ENDFOR 
  9849.  
  9850. | IF expression { ';' } THEN statement_group   {ELSEIF expression { ';' } THEN 
  9851. statement_group}   [ELSE statement_group]  { ';' }  ENDIF 
  9852.  
  9853. | LOOP   statement_group  [LEAVE] [ITERATE] statement_group  ENDLOOP 
  9854.  
  9855. | WHILE expression { ';' } DO   statement_group  [LEAVE] [ITERATE] 
  9856. statement_group  ENDWHILE 
  9857.  
  9858.  
  9859. ΓòÉΓòÉΓòÉ 8.2.20. parse_statement ΓòÉΓòÉΓòÉ
  9860.  
  9861. parse_statement ::=  PARSE ARG  {string | +number | -number |number | 
  9862. identifier } 
  9863.  
  9864. | PARSE VALUE expression   WITH {string | +number | -number |number | 
  9865. identifier } 
  9866.  
  9867.  
  9868. ΓòÉΓòÉΓòÉ 8.2.21. expression ΓòÉΓòÉΓòÉ
  9869.  
  9870. expression ::=  simple_expression [relation simple_expression] 
  9871.  
  9872.  
  9873. ΓòÉΓòÉΓòÉ 8.2.22. simple_expression ΓòÉΓòÉΓòÉ
  9874.  
  9875. simple_expression ::=  term  {operator  term} 
  9876.  
  9877.  
  9878. ΓòÉΓòÉΓòÉ 8.2.23. term ΓòÉΓòÉΓòÉ
  9879.  
  9880. term ::=  numeric_term 
  9881.  
  9882. | string 
  9883.  
  9884. | unary_operator term 
  9885.  
  9886. | '(' expression ')' 
  9887.  
  9888.  
  9889. ΓòÉΓòÉΓòÉ 8.2.24. arithmetic_expression ΓòÉΓòÉΓòÉ
  9890.  
  9891. arithmetic_expression ::=  arithmetic_term {arithmetic_operator 
  9892. arithmetic_term} 
  9893.  
  9894.  
  9895. ΓòÉΓòÉΓòÉ 8.2.25. arithmetic_term ΓòÉΓòÉΓòÉ
  9896.  
  9897. arithmetic_term ::=  '('arithmetic_expression')' 
  9898.  
  9899. | number 
  9900.  
  9901. | hex_number 
  9902.  
  9903. | octal_number 
  9904.  
  9905. | [numeric_unary_operator] arithmetic_term 
  9906.  
  9907.  
  9908. ΓòÉΓòÉΓòÉ 8.2.26. numeric_expression ΓòÉΓòÉΓòÉ
  9909.  
  9910. numeric_expression ::=  numeric_term {numeric_operator  numeric_term} 
  9911.  
  9912.  
  9913. ΓòÉΓòÉΓòÉ 8.2.27. numeric_term ΓòÉΓòÉΓòÉ
  9914.  
  9915. numeric_term ::=  number 
  9916.  
  9917. | designator 
  9918.  
  9919. | '('numeric_expression')' 
  9920.  
  9921. | procedure_call 
  9922.  
  9923. | numeric_unary_operator numeric_term 
  9924.  
  9925.  
  9926. ΓòÉΓòÉΓòÉ 8.2.28. string_expression ΓòÉΓòÉΓòÉ
  9927.  
  9928. string_expression ::=  string 
  9929.  
  9930. | designator 
  9931.  
  9932. | procedure_call 
  9933.  
  9934.  
  9935. ΓòÉΓòÉΓòÉ 8.2.29. constant_expression ΓòÉΓòÉΓòÉ
  9936.  
  9937. constant_expression ::=   simple_constant_expression  [ relation 
  9938. simple_constant_expression ] 
  9939.  
  9940.  
  9941. ΓòÉΓòÉΓòÉ 8.2.30. simple_constant_expression ΓòÉΓòÉΓòÉ
  9942.  
  9943. simple_constant_expression ::=   constant_term { operator  constant_term } 
  9944.  
  9945.  
  9946. ΓòÉΓòÉΓòÉ 8.2.31. constant_term ΓòÉΓòÉΓòÉ
  9947.  
  9948. constant_term ::=   number 
  9949.  
  9950. | designator 
  9951.  
  9952. | '('simple_constant_expression')' 
  9953.  
  9954. | unary_operator  constant_term 
  9955.  
  9956. | string 
  9957.  
  9958.  
  9959. ΓòÉΓòÉΓòÉ 8.2.32. relation ΓòÉΓòÉΓòÉ
  9960.  
  9961. relation ::=  '==' 
  9962.  
  9963. | '/==' 
  9964.  
  9965. | '=' 
  9966.  
  9967. | '<>' 
  9968.  
  9969. | '<=' 
  9970.  
  9971. | '>=' 
  9972.  
  9973. | '<' 
  9974.  
  9975. | '>' 
  9976.  
  9977.  
  9978. ΓòÉΓòÉΓòÉ 8.2.33. operator ΓòÉΓòÉΓòÉ
  9979.  
  9980. operator ::=  numeric_operator 
  9981.  
  9982. | AND 
  9983.  
  9984. | '&' 
  9985.  
  9986. | OR 
  9987.  
  9988. | '|' 
  9989.  
  9990. | '||' 
  9991.  
  9992. | spaces 
  9993.  
  9994.  
  9995. ΓòÉΓòÉΓòÉ 8.2.34. spaces ΓòÉΓòÉΓòÉ
  9996.  
  9997. spaces ::=  (' '|'\t')  spaces 
  9998.  
  9999.  
  10000. ΓòÉΓòÉΓòÉ 8.2.35. numeric_operator ΓòÉΓòÉΓòÉ
  10001.  
  10002. numeric_operator ::=  arithmetic_operator 
  10003.  
  10004. | '//' 
  10005.  
  10006. | '%' 
  10007.  
  10008.  
  10009. ΓòÉΓòÉΓòÉ 8.2.36. arithmetic_operator ΓòÉΓòÉΓòÉ
  10010.  
  10011. arithmetic_operator ::=  '+' 
  10012.  
  10013. | '-' 
  10014.  
  10015. | '*' 
  10016.  
  10017. | '/' 
  10018.  
  10019.  
  10020. ΓòÉΓòÉΓòÉ 8.2.37. unary_operator ΓòÉΓòÉΓòÉ
  10021.  
  10022. unary_operator ::=  NOT 
  10023.  
  10024. | numeric_unary_operator 
  10025.  
  10026.  
  10027. ΓòÉΓòÉΓòÉ 8.2.38. numeric_unary_operator ΓòÉΓòÉΓòÉ
  10028.  
  10029. numeric_unary_operator ::=  '+' 
  10030.  
  10031. | '-' 
  10032.  
  10033.  
  10034. ΓòÉΓòÉΓòÉ 8.2.39. procedure_call ΓòÉΓòÉΓòÉ
  10035.  
  10036. procedure_call ::=  user_defined_proc_call 
  10037.  
  10038. | built-in_proc_call 
  10039.  
  10040.  
  10041. ΓòÉΓòÉΓòÉ 8.2.40. user_defined_proc_call ΓòÉΓòÉΓòÉ
  10042.  
  10043. user_defined_proc_call ::=  identifier '(' [expression_list] ')' 
  10044.  
  10045.  
  10046. ΓòÉΓòÉΓòÉ 8.2.41. built-in_proc_call ΓòÉΓòÉΓòÉ
  10047.  
  10048. built-in_proc_call ::= See individual procedure. 
  10049.  
  10050.  
  10051. ΓòÉΓòÉΓòÉ 8.2.42. command ΓòÉΓòÉΓòÉ
  10052.  
  10053. command ::=  macro-defined_command 
  10054.  
  10055. | internal_command 
  10056.  
  10057. | dos_command 
  10058.  
  10059.  
  10060. ΓòÉΓòÉΓòÉ 8.2.43. internal_command ΓòÉΓòÉΓòÉ
  10061.  
  10062. internal_command ::=  NUMBER 
  10063.  
  10064. |  '+' [number] 
  10065.  
  10066. |  '-' [number] 
  10067.  
  10068. | 'C/' unquoted_string '/' unquoted_string '/' ['-'] ['+'] ['*'] ['m'] ['a'] 
  10069. ['c'] ['e'] ['r'] ['f'] ['g'] 
  10070.  
  10071. | ( 'E' | 'ED' | 'EDIT' )  {['/d'] ['/e'] ['/n'] ['='] unquoted_string} 
  10072. [quoted_string] 
  10073.  
  10074. | ( 'F' | 'FILE' ) ['/t'] [unquoted_string] 
  10075.  
  10076. | ( 'L/' | '/' ) unquoted_string '/' unquoted_string'/' ['-'] ['+'] ['m'] ['a'] 
  10077. ['c'] ['e'] ['r'] ['f'] ['g'] 
  10078.  
  10079. | ( 'MA' | 'MARGINS' ) [number_list3] 
  10080.  
  10081. | ( 'N' | 'NAME' ) [unquoted_string] 
  10082.  
  10083. | ( 'O' | 'OPEN' ) {[ options ] filespec } 
  10084.  
  10085. | 'OS2' string_expression 
  10086.  
  10087. | ( 'Q' | 'QUIT' ) 
  10088.  
  10089. | ( 'S' | 'SAVE' ) ['/t'] [unquoted_string] 
  10090.  
  10091. | 'TABS' number_list3 
  10092.  
  10093. | 'VER' 
  10094.  
  10095. | 'XCOM' internal_command 
  10096.  
  10097.  
  10098. ΓòÉΓòÉΓòÉ 8.2.44. macro-defined_command ΓòÉΓòÉΓòÉ
  10099.  
  10100. macro-defined_command ::=  'ADD' 
  10101.  
  10102. | 'ALL' '/' searchstring ['/'][c] 
  10103.  
  10104. | ( 'APPEND' | 'APP' ) [unquoted_string] 
  10105.  
  10106. | 'ASC' ( character ) 
  10107.  
  10108. | 'AUTOSAVE' [ ( number | 'on' | 'off') ] 
  10109.  
  10110. | 'AUTOSAVEDLG' 
  10111.  
  10112. | 'AUTOSHELL' ( ['0' | '1' ] ) 
  10113.  
  10114. | ( 'BOTTOM' | 'BOT' ) 
  10115.  
  10116. | 'BOX' ('1' | '2' | '3' | '4' | '5' | '6' | 'C' | 'P' | 'A' | 'E' | 'R' | 
  10117. '/'character) 
  10118.  
  10119. | 'BROWSE' ( ['ON' | 'OFF' | '?'] ) 
  10120.  
  10121. | 'CD'  [unquoted_string] 
  10122.  
  10123. | ( 'CHANGE' | 'C' )  '/' find_text '/' replace_text ['/' [-] [+] [*] [M] [A] 
  10124. [C] [E] [R] [F] [G] ] 
  10125.  
  10126. | 'CHANGEDLG' 
  10127.  
  10128. | 'CENTER' 
  10129.  
  10130. | 'CHR' number 
  10131.  
  10132. | 'CLOSE' 
  10133.  
  10134. | 'COMMANDLINE [ string_expression ] 
  10135.  
  10136. | 'CUT' 
  10137.  
  10138. | 'DIR' [ path ] 
  10139.  
  10140. | 'DOLINES' 
  10141.  
  10142. | 'DPATH' 
  10143.  
  10144. | 'DRAW' ('1' | '2' | '3' | '4' | '5' | '6' | 'B' | '/'character) 
  10145.  
  10146. | 'ECHO' ('on' | 'off') 
  10147.  
  10148. | ( 'ETPM' | 'ET' ) ['/e' unquoted_string] ['/u'] 
  10149.  
  10150.   [unquoted_string  [unquoted_string] ] 
  10151.  
  10152. | 'EXPAND' ['on' | 'off'] 
  10153.  
  10154. | 'FILL' character 
  10155.  
  10156. | 'FINDDLG' 
  10157.  
  10158. | ( 'FINDFILE' | 'FILEFIND' ) unquoted_string 
  10159.  
  10160. | 'GET' unquoted_string 
  10161.  
  10162. | 'HELP' 
  10163.  
  10164. | 'KEY' ( number ' ' character ) 
  10165.  
  10166. | 'LINK' ( filespec ) 
  10167.  
  10168. | 'LIST' [unquoted_string] 
  10169.  
  10170. | 'LOCK' ( [ filespec ] ) 
  10171.  
  10172. | 'LOOPKEY' ( number | 'all' ) 
  10173.  
  10174. | 'LOWERCASE' 
  10175.  
  10176. | 'MARGINSDLG' 
  10177.  
  10178. | 'MARKWORD' 
  10179.  
  10180. | 'MATCHTAB' ['on' | 'off'] 
  10181.  
  10182. | 'MATH' arithmetic_expression 
  10183.  
  10184. | 'MATHO' arithmetic_expression 
  10185.  
  10186. | 'MATHX' arithmetic_expression 
  10187.  
  10188. | 'MESSAGEBOX' 
  10189.  
  10190. | 'MULT' 
  10191.  
  10192. | 'OPENDLG' 
  10193.  
  10194. | 'PASTE' 
  10195.  
  10196. | 'PATH' 
  10197.  
  10198. | 'PRINT' [ printer_name ] 
  10199.  
  10200. | 'PROCESSBREAK' 
  10201.  
  10202. | 'PROOF' 
  10203.  
  10204. | 'PROOFWORD' 
  10205.  
  10206. | 'PUT' [unquoted_string] 
  10207.  
  10208. | 'QCONTROL' idnum 
  10209.  
  10210. | ( 'QDATE' | 'QD' ) 
  10211.  
  10212. | ( 'QL' | 'QLINK' | 'QLINKED' ) 
  10213.  
  10214. | ( 'QUIETSHELL' | 'QS' ) 
  10215.  
  10216. | ( 'QTIME' | 'QT' ) 
  10217.  
  10218. | 'RC' command 
  10219.  
  10220. | 'RELINK'  [ filename ] 
  10221.  
  10222. | 'SET' 
  10223.  
  10224. | 'SETSCROLLS' 
  10225.  
  10226. | ( 'SORT' | 'SORTDLL' )  [ 'R' ] [ 'C' ] 
  10227.  
  10228. | 'STAY' ( 'ON' | 'OFF' ) 
  10229.  
  10230. | 'STDFILE_READ' 
  10231.  
  10232. | 'STDFILE_WRITE' 
  10233.  
  10234. | 'TABS' { numeric_expression } 
  10235.  
  10236. | 'TOGGLECONTROL' numeric_expression [, '0' | '1' ] 
  10237.  
  10238. | 'TOGGLEFONT' 
  10239.  
  10240. | 'TOP' 
  10241.  
  10242. | 'UNLINK' [ filespec ] 
  10243.  
  10244. | 'UNLOCK' filespec 
  10245.  
  10246. | 'UPPERCASE' 
  10247.  
  10248. | 'VOL' 
  10249.  
  10250.  
  10251. ΓòÉΓòÉΓòÉ 8.2.45. dos_command ΓòÉΓòÉΓòÉ
  10252.  
  10253. dos_command ::=  Any command recognized and interpreted by the current 
  10254. operating system, whether that is DOS or OS/2. 
  10255.  
  10256.  
  10257. ΓòÉΓòÉΓòÉ 8.2.46. expression_list ΓòÉΓòÉΓòÉ
  10258.  
  10259. expression_list ::=  expression { {';'} [','] {';'} expression } 
  10260.  
  10261.  
  10262. ΓòÉΓòÉΓòÉ 8.2.47. identifier ΓòÉΓòÉΓòÉ
  10263.  
  10264. identifier ::=  letter {letter |  digit | '_' } 
  10265.  
  10266.  
  10267. ΓòÉΓòÉΓòÉ 8.2.48. identifier_list ΓòÉΓòÉΓòÉ
  10268.  
  10269. identifier_list ::=  identifier [spaces  identifier [spaces  identifier [spaces 
  10270. identifier . . . ] ] ] 
  10271.  
  10272.  
  10273. ΓòÉΓòÉΓòÉ 8.2.49. unquoted_string ΓòÉΓòÉΓòÉ
  10274.  
  10275. unquoted_string ::=  {character} 
  10276.  
  10277.  
  10278. ΓòÉΓòÉΓòÉ 8.2.50. string ΓòÉΓòÉΓòÉ
  10279.  
  10280. string ::=  " ' " {character} " ' " 
  10281.  
  10282. | ' " ' {character} ' " ' 
  10283.  
  10284. | esc_code 
  10285.  
  10286.  
  10287. ΓòÉΓòÉΓòÉ 8.2.51. letter ΓòÉΓòÉΓòÉ
  10288.  
  10289. letter ::=  'a' .. 'z' | 'A' .. 'Z' 
  10290.  
  10291.  
  10292. ΓòÉΓòÉΓòÉ 8.2.52. character ΓòÉΓòÉΓòÉ
  10293.  
  10294. character ::=  any character whose ASCII value is between 0 and 255 
  10295.  
  10296.  
  10297. ΓòÉΓòÉΓòÉ 8.2.53. printable_char ΓòÉΓòÉΓòÉ
  10298.  
  10299. printable_char ::=  any character whose ASCII value is between 0 and 255 
  10300.  
  10301.  
  10302. ΓòÉΓòÉΓòÉ 8.2.54. esc_code ΓòÉΓòÉΓòÉ
  10303.  
  10304. esc_code ::=  '\' ('n' | 't' | 'b' | 'r' | 'f') 
  10305.  
  10306. | '\'  digit [digit [digit] ] 
  10307.  
  10308. | '\'x  hex_digit [hex_digit] 
  10309.  
  10310.  
  10311. ΓòÉΓòÉΓòÉ 8.2.55. hex_number ΓòÉΓòÉΓòÉ
  10312.  
  10313. hex_number ::=  'x'hex_digit {hex_digit} 
  10314.  
  10315.  
  10316. ΓòÉΓòÉΓòÉ 8.2.56. octal_number ΓòÉΓòÉΓòÉ
  10317.  
  10318. octal_number ::=  'o'octal_digit {octal_digit} 
  10319.  
  10320.  
  10321. ΓòÉΓòÉΓòÉ 8.2.57. octal_digit ΓòÉΓòÉΓòÉ
  10322.  
  10323. octal_digit ::=  '0'..'7' 
  10324.  
  10325.  
  10326. ΓòÉΓòÉΓòÉ 8.2.58. hex_digit ΓòÉΓòÉΓòÉ
  10327.  
  10328. hexdigit ::=  (number | 'a' .. 'f' | 'A' .. 'F' ) 
  10329.  
  10330.  
  10331. ΓòÉΓòÉΓòÉ 8.2.59. number ΓòÉΓòÉΓòÉ
  10332.  
  10333. number ::=  digit{digit} 
  10334.  
  10335.  
  10336. ΓòÉΓòÉΓòÉ 8.2.60. digit ΓòÉΓòÉΓòÉ
  10337.  
  10338. digit ::=  '0' .. '9' 
  10339.  
  10340.  
  10341. ΓòÉΓòÉΓòÉ 8.2.61. number_list2 ΓòÉΓòÉΓòÉ
  10342.  
  10343. number_list2 ::=  number  [spaces  number] 
  10344.  
  10345.  
  10346. ΓòÉΓòÉΓòÉ 8.2.62. number_list3 ΓòÉΓòÉΓòÉ
  10347.  
  10348. number_list3 ::=  number  [spaces  number  [ spaces  number] ] 
  10349.  
  10350.  
  10351. ΓòÉΓòÉΓòÉ 8.2.63. number_list4 ΓòÉΓòÉΓòÉ
  10352.  
  10353. number_list4 ::=  number  [spaces  number  [ spaces  number  [spaces  number] ] 
  10354.  
  10355.  
  10356. ΓòÉΓòÉΓòÉ 9. Summary of Keywords, Procedures, Variables, and Keys ΓòÉΓòÉΓòÉ
  10357.  
  10358. Summary of keywords, procedures, variables and keys. 
  10359.  
  10360.  
  10361. ΓòÉΓòÉΓòÉ 9.1. Built-in Statement and Procedure Summary ΓòÉΓòÉΓòÉ
  10362.  
  10363. In this section all of E's internal procedure and statements are listed 
  10364. followed by a brief description.  See Built-in Statements and Procedures for 
  10365. more complete descriptions and parameters.  Procedures are followed by 
  10366. parentheses and can return values. Statements have no parentheses, return 
  10367. nothing, and generally perform some operation on the screen. Both statements 
  10368. and procedures can be followed by arguments.  Procedure arguments must appear 
  10369. within the parentheses. 
  10370.  
  10371. ABBREV() 
  10372.                     returns 1 if one string is an abbreviation of another 
  10373. ACTIVATEFILE 
  10374.                     makes a file the current file 
  10375. ADDRESS() 
  10376.                     returns the address of a variable 
  10377. ADJUSTBLOCK 
  10378.                     moves a marked area by overlaying 
  10379. ADJUST_BLOCK 
  10380.                     same as ADJUSTBLOCK 
  10381. ADJUSTMARK 
  10382.                     same as ADJUSTBLOCK for any marked type 
  10383. ADJUST_MARK 
  10384.                     same as ADJUSTMARK 
  10385. ARG() 
  10386.                     returns an argument 
  10387. ASC() 
  10388.                     determins an ASCII value 
  10389. ATOI() 
  10390.                     converts a string to integer 
  10391. ATOL() 
  10392.                     converts a string to a long integer 
  10393. ATTRIBUTE_ACTION 
  10394.                     does an attribute action 
  10395. BACKTAB 
  10396.                     moves cursor to previous tab 
  10397. BACKTABWORD 
  10398.                     moves cursor to beginning of last word 
  10399. BACKTAB_WORD 
  10400.                     same as BACKTABWORD 
  10401. BEEP() 
  10402.                     emits a noise 
  10403. BEGINLINE 
  10404.                     moves cursor to beginning of line 
  10405. BEGIN_LINE 
  10406.                     same as BEGINLINE 
  10407. BOT 
  10408.                     goes to the bottom of the file 
  10409. BOTTOM 
  10410.                     same as BOT 
  10411. BEGINLINE 
  10412.                     moves cursor to beginning of the line 
  10413. BEGIN_LINE 
  10414.                     same as BEGIN_LINE 
  10415. BINSEARCH() 
  10416.                     perform a binary search in a file 
  10417. BROWSE() 
  10418.                     turns browse mode on/off 
  10419. BUFFER() 
  10420.                     allows shared buffers 
  10421. BUILDMENUITEM 
  10422.                     builds an action bar menu item 
  10423. BUILDSUBMENU 
  10424.                     builds an action bar sub menu item 
  10425. CALL 
  10426.                     executes a procedure 
  10427. CENTER 
  10428.                     centers a string in a given length field 
  10429. CENTRE 
  10430.                     centers a string in a given length field 
  10431. CHR() 
  10432.                     finds the character from an ASCII value 
  10433. COMPARE 
  10434.                     compares two strings; returns the character position of the 
  10435.                     first difference 
  10436. COPIES 
  10437.                     returns n copies of the given string 
  10438. COPYMARK 
  10439.                     copies marked to text to the cursor pos. 
  10440. COPY_MARK 
  10441.                     same as COPYMARK 
  10442. COUNT() 
  10443.                     returns the number of occurrances of one string in another 
  10444. C2X() 
  10445.                     returns the printable hex representation of a binary string 
  10446. DELETE 
  10447.                     deletes the line the cursor is on 
  10448. DELETECHAR 
  10449.                     deletes the character under the cursor 
  10450. DELETE_CHAR 
  10451.                     same as DELETECHAR 
  10452. DELETELINE 
  10453.                     deletes a line of text 
  10454. DELETEMARK 
  10455.                     removes marked text 
  10456. DELETE_MARK 
  10457.                     same as DELETEMARK 
  10458. DELETEMENU 
  10459.                     removes an action bar menu item or subitem 
  10460. DELSTR 
  10461.                     deletes a substring of a string 
  10462. DELWORD 
  10463.                     deletes a phrase from a string 
  10464. DIRECTORY( [path]) 
  10465.                     returns current directory; if path is given, changes 
  10466.                     current directory first 
  10467. DISPLAY 
  10468.                     allows screen updating etc. to be toggled 
  10469. DO 
  10470.                     start of an iteration routine 
  10471. DO_ARRAY 
  10472.                     handles arrays in E 
  10473. DO_OVERLAYWINDOWS 
  10474.                     is undisclosed 
  10475. DOWN 
  10476.                     moves the cursor down a line 
  10477. DYNAFREE() 
  10478.                     releases a dynalink library 
  10479. DYNALINK() 
  10480.                     allows PM calls thru C code 
  10481. DYNALINKC() 
  10482.                     same as DYNALINK but in C format 
  10483. DYNALINK32() 
  10484.                     same as DYNALINKC but for calling 32-bit code 
  10485. ECHO() 
  10486.                     performs a command execution trace 
  10487. ENDLINE 
  10488.                     moves the cursor to the end of line 
  10489. END_LINE 
  10490.                     same as ENDLINE 
  10491. ERASEENDLINE 
  10492.                     erases text to the end of line 
  10493. ERASE_END_LINE 
  10494.                     same as ERASEENDLINE 
  10495. EXECUTE 
  10496.                     executes the command dialog box 
  10497. EXECUTEKEY 
  10498.                     executes the key specified 
  10499. EXIT 
  10500.                     exits from the current macro 
  10501. FILECOMPARE 
  10502.                     compares two files in the ring 
  10503. FILESINRING 
  10504.                     returns the number of files in the ring 
  10505. FILESIZE 
  10506.                     returns the sum of the lengths of all lines in the file 
  10507. FILLMARK 
  10508.                     fills the marked area 
  10509. FILL_MARK 
  10510.                     same as FILLMARK 
  10511. FINDFILE 
  10512.                     finds a file path 
  10513. FOR 
  10514.                     begining of an iterative loop 
  10515. GETFILEID 
  10516.                     gets a file id number 
  10517. GETKEYSTATE() 
  10518.                     gets the shift state of keys 
  10519. GET_KEY_STATE 
  10520.                     same as GETKEYSTATE 
  10521. GETLINE 
  10522.                     returns the current text line 
  10523. GETMARK 
  10524.                     gets the type of mark 
  10525. GETPMINFO() 
  10526.                     returns PM information 
  10527. GETSEARCH 
  10528.                     saves the last search string 
  10529. GET_SEARCH 
  10530.                     same as SETSEARCH 
  10531. HEX() 
  10532.                     returns the hex value of a char. 
  10533. IF - THEN - ELSE 
  10534.                     the beginning of a conditional stmt. 
  10535. INCLUDE 
  10536.                     includes another E file 
  10537. INSERT 
  10538.                     inserts a blank line 
  10539. INSERT_ATTRIBUTE 
  10540.                     inserts an attribute 
  10541. INSERTLINE 
  10542.                     inserts a line at a specified location 
  10543. INSERTSTATE() 
  10544.                     returns insert/replace mode 
  10545. INSERT_STATE() 
  10546.                     same as INSERTSTATE() 
  10547. INSERTSTR 
  10548.                     inserts a string into another string 
  10549. INSERTTOGGLE 
  10550.                     toggles the insert/replace modes 
  10551. INSERT_TOGGLE 
  10552.                     same as INSERTTOGGLE 
  10553. ISADEFC() 
  10554.                     tells if a given command has been defined 
  10555. ISADEFPROC() 
  10556.                     tells if a given procedure has been defined 
  10557. ISADIRTYLINE() 
  10558.                     tells if the current line has been modified and not yet 
  10559.                     "checked in" 
  10560. ITERATE 
  10561.                     part of a repeat loop 
  10562. ITOA() 
  10563.                     converts a integer to string 
  10564. JOIN 
  10565.                     joins two lines 
  10566. KEY 
  10567.                     executes the key specified 
  10568. KEYIN 
  10569.                     enters text into the file 
  10570. KEYS 
  10571.                     actives a keyset name 
  10572. LASTERROR() 
  10573.                     returns the last error code 
  10574. LAST_ERROR() 
  10575.                     same as LASTERROR 
  10576. LASTKEY() 
  10577.                     returns the last key hit 
  10578. LASTPOS() 
  10579.                     finds text in the file 
  10580. LEAVE 
  10581.                     leaves a repetitive loop 
  10582. LEFT 
  10583.                     moves the cursor one column left 
  10584. LEFTSTR() 
  10585.                     returns the leftmost n characters of a string 
  10586. LENGTH() 
  10587.                     retuns the length of a string 
  10588. LEXAM() 
  10589.                     access the dictionary functions 
  10590. LINK 
  10591.                     links an .EX module into EPM 
  10592. LINKED() 
  10593.                     returns if a module is linked 
  10594. LONGESTLINE() 
  10595.                     returns the length of the longest line in the file 
  10596. LOOP 
  10597.                     a iterative looping command 
  10598. LOWCASE() 
  10599.                     lowers the case on a string 
  10600. LTOA() 
  10601.                     converts a string to a long integer 
  10602. MACHINE() 
  10603.                     returns the type of Operating System 
  10604. MARKBLOCK 
  10605.                     issues a block-type mark 
  10606. MARK_BLOCK 
  10607.                     same as a MARKBLOCK 
  10608. MARKCHAR 
  10609.                     issues a character-type mark 
  10610. MARK_CHAR 
  10611.                     same as a MARKCHAR 
  10612. MARKLINE 
  10613.                     issues a line-type mark 
  10614. MARK_LINE 
  10615.                     same as a MARKLINE 
  10616. MARKSIZE() 
  10617.                     returns the number of marked characters 
  10618. MARKTYPE() 
  10619.                     returns the marktype set 
  10620. MEMCPYX() 
  10621.                     copies information from one memory location to another 
  10622. MOUSE_SETPOINTER 
  10623.                     sets the mouse pointer 
  10624. MOVEMARK 
  10625.                     moves marked text to the cursor pos. 
  10626. MOVE_MARK 
  10627.                     same as MOVEMARK 
  10628. NEXTFILE 
  10629.                     actives the next file in the ring 
  10630. NEXT_FILE 
  10631.                     same as NEXTFILE 
  10632. OFFSET() 
  10633.                     returns the offset in binary 
  10634. OFS() 
  10635.                     returns the offset in a string format 
  10636. OVERLAY 
  10637.                     allows the overlay of strings 
  10638. OVERLAYBLOCK 
  10639.                     copies marked text without inserting 
  10640. OVERLAY_BLOCK 
  10641.                     same as OVERLAY_BLOCK 
  10642. PAGEDOWN 
  10643.                     moves the cursor one page down 
  10644. PAGE_DOWN 
  10645.                     same as PAGEDOWN 
  10646. PAGEUP 
  10647.                     moves the cursor one page up 
  10648. PAGE_UP 
  10649.                     same as PAGEUP 
  10650. PARSE 
  10651.                     parses a string 
  10652. PEEK() 
  10653.                     looks up a memory location value 
  10654. PEEK32() 
  10655.                     looks up a memory location value 
  10656. PEEKZ() 
  10657.                     returns an ASCIIZ string from memory 
  10658. PEEKZ32() 
  10659.                     returns an ASCIIZ string from memory 
  10660. POKE() 
  10661.                     inserts a value into a memory location 
  10662. POKE32() 
  10663.                     inserts a value into a memory location 
  10664. PREVFILE 
  10665.                     moves to the previous file 
  10666. QUERY_ATTRIBUTE 
  10667.                     determines the attribute type set 
  10668. QUERYMENUSTRING 
  10669.                     get the command associated with an menu option 
  10670. QUERYPROFILE() 
  10671.                     gets a string from OS2.INI 
  10672. QUIETSHELL 
  10673.                     allows an OS/2 command to be executed 
  10674. REFLOW 
  10675.                     reformats text 
  10676. REFRESH 
  10677.                     updates the screen 
  10678. REGEXPCOMP 
  10679.                     pre-compiles an extended GREP search string into an EGREP 
  10680.                     program. 
  10681. REGEXPEXEC 
  10682.                     does an EGREP search of a string, using a pre-compiled 
  10683.                     program. 
  10684. RELINK 
  10685.                     compiles and links .E modules 
  10686. REPEATFIND 
  10687.                     finds the next occurrence of a search 
  10688. REPEAT_FIND 
  10689.                     same as REPEATFIND 
  10690. REPLACELINE 
  10691.                     replaces a line with new text 
  10692. RETURN 
  10693.                     returns an expression to the caller 
  10694. REVERSE() 
  10695.                     returns the reverse of a string 
  10696. RIGHT 
  10697.                     moves the cursor one column right 
  10698. RIGHTSTR() 
  10699.                     returns the rightmost n characters of a string 
  10700. RUBOUT 
  10701.                     deletes the character to the left 
  10702. SAYAT 
  10703.                     writes text at a location on the screen 
  10704. SAY_AT 
  10705.                     same as SAYAT 
  10706. SAYERROR 
  10707.                     displays an error code or a message 
  10708. SAYERROR() 
  10709.                     displays a message 
  10710. SAYERRORTEXT() 
  10711.                     returns the error message associated with a given error 
  10712.                     code 
  10713. SCREENHEIGHT() 
  10714.                     returns the screen height 
  10715. SCREENWIDTH() 
  10716.                     returns the screen width 
  10717. SEG() 
  10718.                     returns the segment address as a string 
  10719. SELECTOR() 
  10720.                     returns the segment address in binary 
  10721. SETPROFILE() 
  10722.                     sets a string in OS2.INI 
  10723. SETSEARCH 
  10724.                     sets the search command string 
  10725. SET_SEARCH 
  10726.                     same as SETSEARCH 
  10727. SHIFTLEFT 
  10728.                     shifts marked text one position left 
  10729. SHIFT_LEFT 
  10730.                     same as SHIFTLEFT 
  10731. SHIFTRIGHT 
  10732.                     shifts marked text one position right 
  10733. SHIFT_RIGHT 
  10734.                     same as SHIFTRIGHT 
  10735. SHOWMENU 
  10736.                     displays a newly built action bar menu 
  10737. SPLIT 
  10738.                     splits a line of text into two lines 
  10739. STOP 
  10740.                     stops execution of a macro 
  10741. STOPONRC 
  10742.                     stops only if RC is non-zero 
  10743. STOP_ON_RC 
  10744.                     same as STOPONRC 
  10745. STRIP() 
  10746.                     strips away extra spaces 
  10747. SUBSTR() 
  10748.                     returns a sub-string from within a string 
  10749. SUBWORD 
  10750.                     returns a phrase from a string 
  10751. TAB 
  10752.                     moves to the next tab stop 
  10753. TABGLYPH() 
  10754.                     specifies whether the tab glyph should be displayed 
  10755. TABWORD 
  10756.                     moves to the beginning of the next word 
  10757. TAB_WORD 
  10758.                     same as TABWORD 
  10759. TEXTLINE() 
  10760.                     gets the contents of the indicated line 
  10761. TOP 
  10762.                     moves to the top of the file 
  10763. TRANSLATE() 
  10764.                     translates a string according to a given translate table 
  10765. TRYINCLUDE 
  10766.                     attempts to include a .E file 
  10767. UNDO 
  10768.                     undoes changes on a line 
  10769. UNLINK 
  10770.                     removes a .EX module from EPM 
  10771. UNMARK 
  10772.                     unmarks text 
  10773. UP 
  10774.                     moves the cursor up one key 
  10775. UPCASE() 
  10776.                     converts a string to upper case 
  10777. VALIDATEFILEID() 
  10778.                     verifies that a fileid is valid 
  10779. VER() 
  10780.                     returns the version number 
  10781. VERIFY() 
  10782.                     makes sure a string is valid in a set 
  10783. WHEREDEFC() 
  10784.                     tells in which .ex file a defc is defined 
  10785. WINMESSAGEBOX() 
  10786.                     does a Dynalink call to the PM WinMessageBox function 
  10787. WORD() 
  10788.                     returns the nthe word of a string 
  10789. WORDINDEX() 
  10790.                     returns the character position of a word in a string 
  10791. WORDLENGTH() 
  10792.                     returns the length of a word in a string 
  10793. WORDPOS() 
  10794.                     returns the position of a phrase in a string 
  10795. WORDS() 
  10796.                     returns the number of words in a string 
  10797. WHILE 
  10798.                     a conditional repetitive statement 
  10799.  
  10800.  
  10801. ΓòÉΓòÉΓòÉ 9.2. Command Summary ΓòÉΓòÉΓòÉ
  10802.  
  10803. These commands can be issued from within the command line dialog box or from 
  10804. within a program.  When used within the E language they must be surrounded by 
  10805. quotation marks. For example: 
  10806.  
  10807.   `CD'
  10808. or
  10809.   `CD C:\EPM\FILES'
  10810. or
  10811.   `CD` mypath
  10812.  
  10813. In the first example the macro command CD will be executed as if the user typed 
  10814. it in on the command line dialog. In the second example CD was issued with an 
  10815. argument. And in the third example, the argument was a variable name. For more 
  10816. information on the commands and their syntax see The EPM User's Guide and 
  10817. Commands Omitted From the User's Guide in this manual. 
  10818.  
  10819. Note:  EPM's online help contains a more detailed description for each command, 
  10820.        and may contain additional commands which were added after this document 
  10821.        was written.
  10822.  
  10823. #### 
  10824.                     goes to line number #### 
  10825. + [####] 
  10826.                     moves cursor forward #### lines. 
  10827. -  [####] 
  10828.                     moves cursor backward #### lines. 
  10829. /find_string/[options] 
  10830.                     same as 'L' command 
  10831. ACTIVATEFILEID 
  10832.                     activates the file specified 
  10833. ADD 
  10834.                     adds a marked block of numbers 
  10835. ALL 
  10836.                     if included, it finds all occurrences of a given string in 
  10837.                     the current file 
  10838. APP 
  10839.                     appends marked text to a file 
  10840. APPEND 
  10841.                     same as APP 
  10842. ASC 
  10843.                     determines the ASCII value of a char. 
  10844. AUTOSAVE 
  10845.                     sets the AUTOSAVE field value 
  10846. AUTOSAVEDLG 
  10847.                     brings up the AUTOSAVE dialog box 
  10848. AUTOSHELL 
  10849.                     turns AUTOSHELLing on or off 
  10850. BOT 
  10851.                     goes to the bottom of the file 
  10852. BOTTOM 
  10853.                     same as BOT 
  10854. BOX 
  10855.                     draws a box of specified style around block mark. (See 
  10856.                     BOX.E) 
  10857. BROWSE 
  10858.                     make the file read-only or read-write 
  10859.                     changes text strings 
  10860. CD 
  10861.                     changes the default drive/path 
  10862. CENTER 
  10863.                     centers marked text 
  10864. CHANGE 
  10865.                     same as C 
  10866. CHANGEDLG 
  10867.                     brings up the change dialog box 
  10868. CHR 
  10869.                     displays the character associated 
  10870. CLEARSHARBUFF 
  10871.                     clears the shared buffer 
  10872. CLOSE 
  10873.                     closes files in the ring 
  10874. COMMANDLINE 
  10875.                     brings up the command line dialog box 
  10876. COPY2DMBUFF 
  10877.                     copies marked area to "Delete Mark" buffer 
  10878. COPY2SHARBUFF 
  10879.                     copies marked area to shared buffer 
  10880. CURSOROFF 
  10881.                     turns the cursor off 
  10882. CUT 
  10883.                     moves marked text to the shared buffer 
  10884. DIR 
  10885.                     lists the directory in a temp. file 
  10886. DOLINES 
  10887.                     executes the current line or marked lines.  A line mark is 
  10888.                     required. 
  10889. DPATH 
  10890.                     shows the DPATH setting 
  10891. DRAW 
  10892.                     enters draw mode 
  10893. DUPMARK 
  10894.                     executes a mark action specified 
  10895. ECHO 
  10896.                     turns command trace on 
  10897.                     edit a file 
  10898. ED 
  10899.                     same as E 
  10900. EDIT 
  10901.                     same as E and ED 
  10902. ET 
  10903.                     invoke the compiler 
  10904. ETPM 
  10905.                     same as ET 
  10906. EXPAND 
  10907.                     turns syntax expansion on/off 
  10908.                     saves and quit the current file 
  10909. FILE 
  10910.                     same as F 
  10911. FILEFIND 
  10912.                     attempts to find a file 
  10913. FILL 
  10914.                     fills the marked block with a character 
  10915. FINDDLG 
  10916.                     invokes the find dialog box 
  10917. FINDFILE 
  10918.                     same as FILEFIND 
  10919. GET 
  10920.                     gets the file into the current file 
  10921. GETDMBUFF 
  10922.                     gets text from the delete mark buffer 
  10923. GETSHARBUFF 
  10924.                     gets text from the shared buffer 
  10925. HELP 
  10926.                     brings up EPM help 
  10927. KEY 
  10928.                     allows the repeat of a key or macro 
  10929.                     searches for text 
  10930. LINK 
  10931.                     links an .EX module into EPM 
  10932. LIST 
  10933.                     same as FILEFIND and FINDFILE 
  10934. LOADDEFAULTMENU 
  10935.                     loads the default action bar menu 
  10936. LOCK 
  10937.                     prevents other users from updating a file 
  10938. LOOPKEY 
  10939.                     repeats a key in a vertical direction 
  10940. LOWERCASE 
  10941.                     converts marked text into lowercase 
  10942. MA 
  10943.                     sets/displays the margin settings 
  10944. MARGINS 
  10945.                     same as MA 
  10946. MARGINSDLG 
  10947.                     brings up the margins dialog box 
  10948. MARKWORD 
  10949.                     marks the word under the mouse pointer 
  10950. MATCHTAB 
  10951.                     sets tab stops to the words in the line above 
  10952. MATH 
  10953.                     computes an expression in base 10 
  10954. MATHO 
  10955.                     computes an expression in base 8 
  10956. MATHX 
  10957.                     computes an expression in base 16 
  10958. MESSAGEBOX 
  10959.                     brings up the message review dialog box 
  10960. MH_BEGIN_MARK 
  10961.                     mouse handler begin mark 
  10962. MH_CANCEL_MARK 
  10963.                     mouse hander cancel mark 
  10964. MH_END_MARK 
  10965.                     mouse handler end mark 
  10966. MH_GOTOPOSITION 
  10967.                     mouse handler go to position 
  10968. MULT 
  10969.                     multiplies the numbers in a marked area 
  10970.                     renames the current file 
  10971. NAME 
  10972.                     same as N 
  10973.                     loads a file into a new window 
  10974. OPEN 
  10975.                     same as O 
  10976. OPENDLG 
  10977.                     brings up the OPEN dialog box 
  10978. OS2 
  10979.                     executes an OS/2 command 
  10980. PASTE 
  10981.                     copies text from the shared buffer 
  10982. PATH 
  10983.                     displays the path settings 
  10984. PRINT 
  10985.                     prints a marked area or whole file 
  10986. PROCESSBREAK 
  10987.                     stops a macro in progress 
  10988. PROOF 
  10989.                     initiates spell checking 
  10990. PROOFWORD 
  10991.                     spell checks the current word 
  10992. PUT 
  10993.                     writes the marked text to a file 
  10994. QCONTROL 
  10995.                     determines the status of windows 
  10996. QD 
  10997.                     returns the current date 
  10998. QDATE 
  10999.                     same as QD 
  11000. QL 
  11001.                     determines if a module is linked 
  11002. QLINK 
  11003.                     same as QL 
  11004. QLINKED 
  11005.                     same as QL and QLINK 
  11006. QS 
  11007.                     executes an OS/2 command w/ no results 
  11008. QUIETSHELL 
  11009.                     same as QS 
  11010. QT 
  11011.                     displays the time 
  11012. QTIME 
  11013.                     same as QT 
  11014.                     quits the current file 
  11015. QUIT 
  11016.                     same as Q 
  11017. RC 
  11018.                     returns the error code of a command 
  11019. RELINK 
  11020.                     compiles and links and E module 
  11021.                     saves a file to disk 
  11022. SAVE 
  11023.                     same as S 
  11024. SET 
  11025.                     displays all SET parameters in a temp. file 
  11026. SETSCROLLS 
  11027.                     turns the scroll bars on/off 
  11028. SORT 
  11029.                     sorts marked text or the whole file 
  11030. SORTDLL 
  11031.                     same as SORT 
  11032. STAY 
  11033.                     sets whether to move on a find & replace 
  11034. STDFILE_READ 
  11035.                     reads in from standard input stream 
  11036. STDFILE_WRITE 
  11037.                     writes out the the standard output stream 
  11038. TABS 
  11039.                     sets the tabs stops 
  11040. TOGGLECONTROL 
  11041.                     toggles the window on/off 
  11042. TOGGLEFONT 
  11043.                     toggles between large/small fonts 
  11044. TOP 
  11045.                     goes to the top of the current file 
  11046. UNLINK 
  11047.                     removes an .EX module from EPM 
  11048. UNLOCK 
  11049.                     allows other users to update a file 
  11050. UPPERCASE 
  11051.                     makes text in a marked area uppercased 
  11052. VER 
  11053.                     displays the EPM version 
  11054. VOL 
  11055.                     displays the current drive's volume info 
  11056. XCOM 
  11057.                     executes a built in command 
  11058.  
  11059.  
  11060. ΓòÉΓòÉΓòÉ 9.3. E Language Keywords ΓòÉΓòÉΓòÉ
  11061.  
  11062. AND 
  11063.                 Boolean AND function.  That is, a logical AND like REXX, not a 
  11064.                 bit operator. 
  11065. ARG 
  11066.                 is used in parse constructs 
  11067. BASE 
  11068.                 is used in defkeys construct 
  11069. BY 
  11070.                 is used in loop constructs 
  11071. CLEAR 
  11072.                 is used in defkeys construct 
  11073. COMPILE 
  11074.                 conditional compilation instruction, followed by 
  11075.                 IF/ELSE/ELSEIF/ENDIF 
  11076. CONST 
  11077.                 defines constants that the E translator uses during translation 
  11078.                 of the E procs 
  11079. DEF 
  11080.                 defines a key or pseudo-key that belongs to the current keyset 
  11081. DEFC 
  11082.                 defines new commands 
  11083. DEFINIT 
  11084.                 allows initialization of variables for use by other E 
  11085.                 procedures 
  11086. DEFKEYS 
  11087.                 names a keyset 
  11088. DEFLOAD 
  11089.                 is executed whenever a new file is loaded 
  11090. DEFMAIN 
  11091.                 allows the user to take control of the command dialog box 
  11092.                 arguments of the editor 
  11093. DEFMODIFY 
  11094.                 is executed when .modify passes certain threshold values 
  11095. DEFPROC 
  11096.                 is used to define new procedures (functions) 
  11097. DEFSELECT 
  11098.                 is executed whenever you switch to a different file 
  11099. DO 
  11100.                 is used in loop constructs 
  11101. ELSE 
  11102.                 indicates action to take place when an IF statement proves 
  11103.                 false 
  11104. ELSEIF 
  11105.                 executes a secondary IF when an IF statement proves false 
  11106. END or ENDDO 
  11107.                 is used in loop constructs, to terminate a DO block (DO WHILE, 
  11108.                 DO (FOR), or DO FOREVER) 
  11109. ENDFOR 
  11110.                 is used in loop constructs 
  11111. ENDIF 
  11112.                 marks the end of an IF block 
  11113. ENDLOOP 
  11114.                 is used in loop constructs 
  11115. ENDWHILE 
  11116.                 is used in loop constructs 
  11117. FOR 
  11118.                 is used in loop constructs 
  11119. FOREVER 
  11120.                 is used in loop constructs 
  11121. IF 
  11122.                 changes the flow of statements depending upon a condition 
  11123. INCLUDE 
  11124.                 includes another file into the current file for compilation. 
  11125. ITERATE 
  11126.                 iterates a loop, while, or do 
  11127. LEAVE 
  11128.                 exits loop, while, or do 
  11129. LOOP 
  11130.                 is used in loop constructs 
  11131. NEW 
  11132.                 is used in defkeys construct 
  11133. NOT 
  11134.                 Boolean NOT function 
  11135. OR 
  11136.                 Boolean OR function 
  11137. OVERLAY 
  11138.                 is used in defkeys construct 
  11139. PARSE 
  11140.                 is used to extract information from a string 
  11141. RETURN 
  11142.                 returns from a defined procedure or command, with an 
  11143.                 expression. 
  11144. SAY 
  11145.                 writes a line to terminal when shelled to OS/2 
  11146. SAYS 
  11147.                 writes a line to terminal when shelled to OS/2, no CR-LF 
  11148. SET 
  11149.                 defines configuration options.  Only a few options are still 
  11150.                 set in this way:  cursors and insertstate. 
  11151. THEN 
  11152.                 indicates action to take place when an IF statement proves true 
  11153. TO 
  11154.                 is used in loop constructs 
  11155. TRYINCLUDE 
  11156.                 includes another file into the current file for compilation, 
  11157.                 similar to INCLUDE, but does not stop compilation if the file 
  11158.                 cannot be found. 
  11159. UNIVERSAL 
  11160.                 specifies that a variable is available to all procs, is not 
  11161.                 local to the current one. 
  11162. VALUE 
  11163.                 is used in Parse constructs 
  11164. VAR 
  11165.                 is used in DEFPROC definitions.  Specifies that the following 
  11166.                 variable is passed by reference.  If the procedure modifies the 
  11167.                 variable its value is also changed in the caller.  Otherwise 
  11168.                 the caller's value for the variable is not modifiable by the 
  11169.                 called procedure. 
  11170. WHILE 
  11171.                 is used in loop constructs 
  11172. WITH 
  11173.                 is used in Parse constructs 
  11174.  
  11175.  
  11176. ΓòÉΓòÉΓòÉ 9.4. Field Attributes ΓòÉΓòÉΓòÉ
  11177.  
  11178. Field attributes are variables that are unique to each file. They can be 
  11179. accessed by specifying the fileid and the attribute name separated by a period. 
  11180. If the fileid is omitted, the current file is assumed. Some are able to be 
  11181. assigned and all are able to be referenced. For example: 
  11182.  
  11183.         .line = 1
  11184.         sayerror "The current line is: "||.line
  11185.         tmpfileid.line = 1
  11186.  
  11187. The first is an assignment statement. The second is reference statement. In the 
  11188. third a fileid (in the form of the variable tmpfileid) is used. For a more 
  11189. complete description of field variables see Field Variables Listed. Valid field 
  11190. variables are: 
  11191.  
  11192. .AUTOSAVE 
  11193.                     number of changes before autosaving 
  11194. .AUTOSHELL 
  11195.                     allow checking externally for commands not recognized 
  11196.                     internally 
  11197. .COL 
  11198.                     the cursor column position 
  11199. .CURSORX 
  11200.                     the cursor x coordinate 
  11201. .CURSORY 
  11202.                     the cursor y coordinate 
  11203. .DRAGCOLOR 
  11204.                     the drag color 
  11205. .DRAGSTYLE 
  11206.                     the drag style 
  11207. .FILEINFO 
  11208.                     FILESTATUS4 structure returned from the DosQueryFileInfo 
  11209.                     call when current file was opened 
  11210. .FILENAME 
  11211.                     the current file's filename 
  11212. .FONT 
  11213.                     the font id of the current file's font 
  11214. .FONTHEIGHT 
  11215.                     the font height 
  11216. .FONTWIDTH 
  11217.                     the font width 
  11218. .KEYSET 
  11219.                     the current active keyset 
  11220. .LAST 
  11221.                     the maximum file line number 
  11222. .LINE 
  11223.                     the cursor's line number 
  11224. .LINEG 
  11225.                     same as .LINE, but setting it doesn't cause scrolling 
  11226. .LOCKHANDLE 
  11227.                     determines if the file is LOCKed 
  11228. .MARGINS 
  11229.                     contains the margin settings 
  11230. .MARKCOLOR 
  11231.                     contains the mark color 
  11232. .MESSAGECOLOR 
  11233.                     contains the message color 
  11234. .MODIFY 
  11235.                     the number of modifications made 
  11236. .MOUSEX 
  11237.                     the mouse's x coordinate 
  11238. .MOUSEY 
  11239.                     the mouse's y coordinate 
  11240. .STATUSCOLOR 
  11241.                     the status bar color 
  11242. .TABS 
  11243.                     the tab settings 
  11244. .TEXTCOLOR 
  11245.                     the text color 
  11246. .USERSTRING 
  11247.                     a user definable variable 
  11248. .VISIBLE 
  11249.                     determines if the file is visible 
  11250. .WINDOWHEIGHT 
  11251.                     contains the window height 
  11252. .WINDOWWIDTH 
  11253.                     contains the window width 
  11254. .WINDOWX 
  11255.                     the window x coordinate 
  11256. .WINDOWY 
  11257.                     the window y coordinate 
  11258.  
  11259.  
  11260. ΓòÉΓòÉΓòÉ 9.5. E-Definable Keys ΓòÉΓòÉΓòÉ
  11261.  
  11262. The following keys may be defined using E.  In all cases, the prefix A_ means 
  11263. that the Alt key must be depressed at the same time as the key to get the 
  11264. desired function.  Similarly, the prefix C_ means the Ctrl key must be used, 
  11265. and S_ means the shift key must be used. For information on the format of 
  11266. defining these keys, refer to section Key Definitions (DEF and DEFKEYS) or E 
  11267. Language Syntax. 
  11268.  
  11269. A - Z 
  11270. A_A - A_Z 
  11271. A_EQUAL 
  11272. A_F1 - A_F12 
  11273. A_LEFTBRACKET 
  11274. A_MINUS 
  11275. A_RIGHTBRACKET 
  11276. A_TAB 
  11277. A_0 - A_9 
  11278. BACKSPACE 
  11279. C_A - C_Z 
  11280. C_BACKSLASH 
  11281. C_BACKSPACE 
  11282. C_DEL 
  11283. C_DOWN 
  11284. C_END 
  11285. C_ENTER 
  11286. C_F1 - C_F10 
  11287. C_HOME 
  11288. C_INS 
  11289. C_LEFT 
  11290. C_LEFTBRACKET 
  11291. C_MINUS 
  11292. C_PGDN 
  11293. C_PGUP 
  11294. C_PRTSC 
  11295. C_RIGHT 
  11296. C_RIGHTBRACKET 
  11297. C_TAB 
  11298. C_UP 
  11299. C_2, C_6 
  11300. DEL 
  11301. DOWN 
  11302. END 
  11303. ENTER 
  11304. ESC 
  11305. F1 - F10 
  11306. HOME 
  11307. INS 
  11308. LEFT 
  11309. PGDN 
  11310. PGUP 
  11311. RIGHT 
  11312. S_F1 - S_F10 
  11313. S_PAD5 
  11314. S_TAB 
  11315. TAB 
  11316. UP 
  11317. any printable character whose ASCII value is 0 to 255. 
  11318. The following name may be defined in the same manner as keys, but is used as a 
  11319. pseudo-key: 
  11320.  
  11321. ENTRY 
  11322. The following keys are available only on enhanced keyboards, which come with 
  11323. the PS/2 and AT models: 
  11324.  
  11325. A_ENTER 
  11326.  
  11327. A_F11, A_F12 
  11328.  
  11329. A_PADENTER 
  11330.  
  11331. C_F11, C_F12 
  11332.  
  11333. C_PADENTER 
  11334.  
  11335. F11, F12 
  11336.  
  11337. PADENTER 
  11338.  
  11339. S_F11, S_F12 
  11340.  
  11341.  
  11342. ΓòÉΓòÉΓòÉ 9.5.1. PM Keys ΓòÉΓòÉΓòÉ
  11343.  
  11344. The keys listed below are used be Presentation Manager to accomplish certain 
  11345. functions standard to all PM applications (set by CUA standards). To maintain 
  11346. consistency between PM applications, these keys cannot be redefined. 
  11347.  
  11348. Key            PM Function 
  11349.   F1 
  11350.                Help 
  11351.   F10 
  11352.                Goto action bar. 
  11353.   A_F7 
  11354.                Move a PM window. 
  11355.   A_F8 
  11356.                Size a PM window. 
  11357.   A_F9 
  11358.                Minimize a PM window. 
  11359.   A_F10 
  11360.                Maximize a PM window. 
  11361.   A_Esc 
  11362.                Switch application. 
  11363.   C_Esc 
  11364.                Goto Task List. 
  11365.  
  11366.  
  11367. ΓòÉΓòÉΓòÉ 10. General Structure of E-Macro Files ΓòÉΓòÉΓòÉ
  11368.  
  11369. ALL.E               Procedure for including the ALL command and the ctrl-Q key 
  11370.                     setup for paging between ALL occurrences.  This file is 
  11371.                     only included if the configuration constant WANT_ALL is 
  11372.                     TRUE. 
  11373.  
  11374. ASSIST.E            Procedure for including the bracket-matching code.  This 
  11375.                     file is only included if the configuration constant 
  11376.                     WANT_BRACKET_MATCHING is TRUE. 
  11377.  
  11378. BOOKMARK.E          Procedures for working with bookmarks, and for loading and 
  11379.                     saving EPM attributes as an Extended Attribute associated 
  11380.                     with the file.  This file is only included if the 
  11381.                     configuration constant WANT_BOOKMARKS is TRUE. 
  11382.  
  11383. BOX.E               Procedure for the BOX command. This is compiled separately 
  11384.                     into a BOX.EX file. The file is loaded when the user issues 
  11385.                     a BOX command. When the command finished, BOX is unlinked 
  11386.                     from EPM, thereby saving memory space. 
  11387.  
  11388. BUFF.E              Test procedures for the buffer() opcode. 
  11389.  
  11390. CALLREXX.E          Procedures for calling Rexx macros.  This file is only 
  11391.                     included if the configuration constant WANT_REXX is TRUE. 
  11392.  
  11393. CHAROPS.E           Procedures for block fill, copy, delete and mark, for 
  11394.                     character-marked text. 
  11395.  
  11396. CKEYS.E             Syntax aids for C files. 
  11397.  
  11398. CKEYSEL.E           A small file which selects the C keyset.  This is a 
  11399.                     separate file to allow easy omission of the 
  11400.                     syntax-expansion feature by erasing CKEYS*.E.  Only used 
  11401.                     for E3, not for EPM - as of version 4.12, this file is no 
  11402.                     longer needed.  The selection of the keyset is done in 
  11403.                     CKEYS.E where the keyset is defined. This is made possible 
  11404.                     by the new DEFLOAD feature.  Similarly, EKEYSEL.E and 
  11405.                     PKEYSEL.E are unnecessary. 
  11406.  
  11407. CLIPBRD.E           Contains procedures and commands that: 
  11408.  
  11409.    o allow a user to pass lines of text between edit windows 
  11410.    o allow text to be placed in the PM clipboard. 
  11411.  
  11412. COLORS.E            Defines default colors. 
  11413.  
  11414. DOSUTIL.E           Procedures interfacing to the operating system. 
  11415.  
  11416.                     Note:  No longer used under OS/2. 
  11417.  
  11418. DRAW.E              Includes the procedures for the DRAW command. This is 
  11419.                     compiled separately into a DRAW.EX file. The file is loaded 
  11420.                     when the user issues a DRAW command. The code is then 
  11421.                     unlinked when the DRAW command is finished. 
  11422.  
  11423. DRAWKEY.E           Includes the key definition for F6 to trigger the draw 
  11424.                     command. 
  11425.  
  11426. DYNATEST.E          An example program showing how to program in E using the 
  11427.                     DYNALINK command. 
  11428.  
  11429. E.E                 The main file containing all the include statements that 
  11430.                     create EPM. Do not compile this module, however. Compile 
  11431.                     the EPM.E file. 
  11432.  
  11433. E3EMUL.E            Includes the procedures and commands to enable E3EMUL host 
  11434.                     support. See The EPM User's Guide for more information on 
  11435.                     the E3EMUL package support. 
  11436.  
  11437. EKEYS.E             Key definitions for E syntax support. 
  11438.  
  11439. EKEYSEL.E           See CKEYSEL.E. 
  11440.  
  11441. ENGLISH.E           The file containing all the text strings used by the 
  11442.                     macros. This file is only included if the configuration 
  11443.                     constant NLS_LANGUAGE = 'ENGLISH'.  Other NLS translations 
  11444.                     exist, but are owned by Boca. 
  11445.  
  11446. EPM.E               The main file for compilation. See The EPM User's Guide for 
  11447.                     information on compiling this file. 
  11448.  
  11449. EPMDBCS.E           Procedures related to DBCS support.  This file is only 
  11450.                     included if the configuration constant WANT_DBCS is TRUE. 
  11451.  
  11452. EPMGCNF.SMP         This is a copy of the MYCNF.E used to compile the *.ex 
  11453.                     files shipped externally. 
  11454.  
  11455. EPMLEX.E            Includes spell checking and synonym support for the EPM 
  11456.                     editor. This file is only included if the configuration 
  11457.                     constant SPELL_SUPPORT = 1.  Can also be compiled 
  11458.                     separately and linked in. 
  11459.  
  11460. EPMSHELL.E          Procedures related to EPM's Shell support.  This file is 
  11461.                     only included if the configuration constant WANT_EPM_SHELL 
  11462.                     is TRUE. 
  11463.  
  11464. EPM_EA.E            Procedures dealing with extended attributes. 
  11465.  
  11466. EXIT.E              Asks the user if he really wants to leave EOS2. No longer 
  11467.                     used in EPM. 
  11468.  
  11469. EXTRA.E             A file used to split some of the function out of EPM.EX 
  11470.                     when it grew above 64k, before EPM 6.00 supported larger 
  11471.                     .ex files.  See EXTRA_EX in The EPM User's Guide. 
  11472.  
  11473. FEVSHMNU.E          An alternate to STDMENU.E that implements the "FEVSH" menu 
  11474.                     style of OS/2 Warp.  Used only if the configuration 
  11475.                     constant STD_MENU_NAME = "FEVSHMNU.E", this should only be 
  11476.                     used in EPM 6.00 or above, as it doesn't have an Options 
  11477.                     menu.  The newer settings notebook of EPM 6 allows the user 
  11478.                     to select most of the settings which would otherwise be 
  11479.                     lost. 
  11480.  
  11481. GET.E               Procedures for the GET command. This is an external package 
  11482.                     created to save memory space. When the user issues a GET 
  11483.                     command, EPM loads the GET.EX file. Once the GET command is 
  11484.                     completed, GET will unlink itself from memory to free up 
  11485.                     memory space. 
  11486.  
  11487. HELP.E              Procedure for the HELP command. This is an external package 
  11488.                     created to save memory space. When the user issues a HELP 
  11489.                     command, EPM loads the HELP.EX file. Once the user has 
  11490.                     finished viewing the EPMHELP.HLP file, HELP automatically 
  11491.                     unlinks itself from memory to free up memory space. 
  11492.  
  11493. KWHELP.E            Procedures related to EPM's keyword help feature.  This 
  11494.                     file is only included if the configuration constant 
  11495.                     WANT_KEYWORD_HELP is TRUE. 
  11496.  
  11497. LINKCMDS.E          Contains procedures and commands related to the linking of 
  11498.                     editor modules (ie. LINK, ETPM, RELINK and UNLINK). 
  11499.  
  11500. LOAD.E              This file contains the default DEFLOAD procedure. 
  11501.  
  11502. MAIN.E              Contains the DEFMAIN procedure, which is where E begins 
  11503.                     execution after all DEFINITs.  Processes the OS/2 command 
  11504.                     line. 
  11505.  
  11506. MAKETAGS.E          Procedures for the MAKETAGS command.  This is normally 
  11507.                     compiled to an external MAKETAGS.EX file rather than 
  11508.                     included in the base .ex files. 
  11509.  
  11510. MARKFILT.E          Defines procedures to extract and replace strings from 
  11511.                     marked text. 
  11512.  
  11513. MATH.E              Definitions for ADD and MULT commands. Also refer to the 
  11514.                     file MATHLIB.E for more math command definitions. 
  11515.  
  11516. MATHLIB.E           An extension of MATH.E created for EOS/2 to allow the 
  11517.                     components to compile only if needed. See MATH.E for more 
  11518.                     math command definitions. 
  11519.  
  11520. MENUHELP.H          Contains definitions of the help panel IDs.  This file is 
  11521.                     shared between the macros and the help file source. 
  11522.  
  11523. MODIFY.E            This file contains the procedures and commands executed 
  11524.                     when a DEMODIFY event is triggered. The DEMODIFY event 
  11525.                     occurs when a file's number of modifications (.modify): 
  11526.  
  11527.    o goes from zero to nonzero (first modification, so we can change the 
  11528.      textcolor or title to indicate that the file needs to be saved; 
  11529.    o goes from nonzero to zero (so we can return to the safe textcolor, usually 
  11530.      after a save); 
  11531.    o goes from less than .autosave to greater than or equal to .autosave. 
  11532.  
  11533.                     The DEMODIFY.E file is new as of EPM. 
  11534.  
  11535. MOUSE.E             Contains the commands and procedures associated with the 
  11536.                     MOUSE movements and actions. This file is new as of EPM. 
  11537.  
  11538. OS2TOOLS.CFG        This is a copy of the MYCNF.E used to compile the *.ex 
  11539.                     files shipped internally to IBM. 
  11540.  
  11541. OVSHMENU.E          An alternate to STDMENU.E that implements the proposed 
  11542.                     "OVSH" menu style. Used only if the configuration constant 
  11543.                     STD_MENU_NAME = "OVSHMENU.E", this should only be used in 
  11544.                     EPM 6.00 or above.  (See comments under FEVSHMNU.E.) 
  11545.  
  11546. PKEYS.E             Syntax aids for Pascal files. 
  11547.  
  11548. PKEYSEL.E           See CKEYSEL.E. 
  11549.  
  11550. PUT.E               Contains the procedures and statements for the PUT command. 
  11551.                     This was made an external module to save space. 
  11552.  
  11553. RETREIVE.E          Used to retrieve commands from a hidden file in E3. This 
  11554.                     file is no longer used under EPM. 
  11555.  
  11556. REXXKEYS.E          Syntax aids for Rexx command files. 
  11557.  
  11558. RKEYSEL.E           See CKEYSEL.E. 
  11559.  
  11560. SAVELOAD.E          Things common to loading and saving files (host file 
  11561.                     support). 
  11562.  
  11563. SELECT.E            Contains the procedure select_edit_keys() which selects 
  11564.                     options (like keysets) whenever you switch to a new file. 
  11565.  
  11566. SHELL.E             Presents an E interface to the internal shell command. 
  11567.  
  11568. SLNOHOST.E          Substitute for SAVELOAD.E, without host file support. 
  11569.  
  11570. SMALL.E             A version of E.E with several features removed to save 
  11571.                     memory. 
  11572.  
  11573. SORTDLL.E           Provides the link between the E's SORT command and the 
  11574.                     QISRTMEM sort DLL. 
  11575.  
  11576. SORTE.E             Definitions for the sorting using the E language. 
  11577.  
  11578. SORTEPM.E           Definitions for the sorting using the EPM 5.60 or above 
  11579.                     internal sort. 
  11580.  
  11581. STDCMDS.E           Definitions of standard E commands. 
  11582.  
  11583. STDCNF.E            Mode settings and default values for the standard E 
  11584.                     configuration. 
  11585.  
  11586. STDCONST.E          Contains EPM's standard constants. 
  11587.  
  11588. STDCTRL.E           Adds LISTBOX and MENU support.  Routines to interface with 
  11589.                     EPM and PM controls are defined here. 
  11590.  
  11591. STDKEYS.E           Standard E command-key definitions. 
  11592.  
  11593. STDMENU.E           The default action bar is defined here. 
  11594.  
  11595. STDPROCS.E          Standard procedural support for other files. 
  11596.  
  11597. TAGS.E              Procedures related to EPM's tags file support.  This file 
  11598.                     is only included if the configuration constant WANT_TAGS = 
  11599.                     1. It can also be linked dynamically. 
  11600.  
  11601. WINDOW.E            Definitions for tiled window support.  No longer used in 
  11602.                     EPM. 
  11603.  
  11604.  
  11605. ΓòÉΓòÉΓòÉ 11. Descriptions of Procedures in Standard EPM ΓòÉΓòÉΓòÉ
  11606.  
  11607. This section lists in alphabetical order all of the procedures in the *.E files 
  11608. and gives a brief description of how they function and what they are used for. 
  11609. For more detailed information, please study the comments in the .E code itself. 
  11610.  
  11611.  
  11612. ΓòÉΓòÉΓòÉ 11.1. ALREADY_IN_RING(filename, var tryid) ΓòÉΓòÉΓòÉ
  11613.  
  11614. Attempts to find the filename in the current ring. If successful tryid returns 
  11615. the file id for the filename. This function returns a one if the filename is in 
  11616. the ring and a zero if not. 
  11617.  
  11618.  
  11619. ΓòÉΓòÉΓòÉ 11.2. APPEND_PATH(filename) ΓòÉΓòÉΓòÉ
  11620.  
  11621. For use with DOS 3.30 or higher: searches the path listed in the APPEND path 
  11622. string for filename and returns the path (ended by a trailing backslash) where 
  11623. it was found; otherwise it returns null. Only included if requested with the 
  11624. USE_APPEND configuration constant. 
  11625.  
  11626.  
  11627. ΓòÉΓòÉΓòÉ 11.3. ASKYESNO() ΓòÉΓòÉΓòÉ
  11628.  
  11629. Displays the message: 'Are you sure (Y/N)' and returns an uppercase keystroke 
  11630. to the caller. If called with a string parameter, the string is displayed 
  11631. before the message: 'Are you sure (Y/N)'. An optional second argument is a flag 
  11632. to prevent the 'Are you sure (Y/N)' message from appearing. For example: 
  11633.  
  11634. usersays = askyesno("About to erase")
  11635.  
  11636. The user's response would be placed in the variable usersays. 
  11637.  
  11638.  
  11639. ΓòÉΓòÉΓòÉ 11.4. BEEP(pitch,duration) ΓòÉΓòÉΓòÉ
  11640.  
  11641. Emits a tone of pitch (range 25Hz - 7FFFHz) and a duration of duration in 
  11642. milliseconds. 
  11643.  
  11644.  
  11645. ΓòÉΓòÉΓòÉ 11.5. BREAKOUT_MVS(filename,lastqual) ΓòÉΓòÉΓòÉ
  11646.  
  11647. Breaks out a filetype from a MVS filename.  PASCAL will return PAS and C will 
  11648. return C. Only included if requested with HOST_SUPPORT. 
  11649.  
  11650.  
  11651. ΓòÉΓòÉΓòÉ 11.6. CHECK_FOR_HOST_FILE() ΓòÉΓòÉΓòÉ
  11652.  
  11653. Parses arg(1) in the host filename form:  fname ftype fmode; gives an error 
  11654. message and returns zero if not in correct format; returns one if in correct 
  11655. format. Included only if HOST_SUPPORT is requested. 
  11656.  
  11657.  
  11658. ΓòÉΓòÉΓòÉ 11.7. CHECK_FOR_PRINTER(name) ΓòÉΓòÉΓòÉ
  11659.  
  11660. Tests whether name is actually a printer device. Returns zero if not a valid 
  11661. printer device and the printer number if valid. 
  11662.  
  11663.  
  11664. ΓòÉΓòÉΓòÉ 11.8. CHECK_MARK_ON_SCREEN() ΓòÉΓòÉΓòÉ
  11665.  
  11666. Tells if a mark is visible on the screen. Returns a one if the mark is on the 
  11667. visible screen and a zero if not. Use checkmark() to see if a mark exists 
  11668. anywhere in the file. 
  11669.  
  11670.  
  11671. ΓòÉΓòÉΓòÉ 11.9. checkmark() ΓòÉΓòÉΓòÉ
  11672.  
  11673. Checks if a marked area exists in the current file. Returns a one if a mark is 
  11674. set; zero if no mark exists. 
  11675.  
  11676.  
  11677. ΓòÉΓòÉΓòÉ 11.10. CURSOROFF() ΓòÉΓòÉΓòÉ
  11678.  
  11679. Turns the cursor off. 
  11680.  
  11681.  
  11682. ΓòÉΓòÉΓòÉ 11.11. DEC2HEX() ΓòÉΓòÉΓòÉ
  11683.  
  11684. Converts a decimal number, arg(1), to a number of base arg(2) (default is 
  11685. hexadecimal). Example usage is: 
  11686.  
  11687.         HexStringOut=Dec2Hex(DecimalIn)
  11688.  
  11689.  
  11690. ΓòÉΓòÉΓòÉ 11.12. DOS_COMMAND() ΓòÉΓòÉΓòÉ
  11691.  
  11692. Executes the DOS (OS/2) command specified in the arg(1) and redirects the 
  11693. output to the file specified in vTEMP_FILENAME. Used by commands like the DIR 
  11694. command. 
  11695.  
  11696.  
  11697. ΓòÉΓòÉΓòÉ 11.13. DOS_VERSION() ΓòÉΓòÉΓòÉ
  11698.  
  11699. Returns DOS version number, multiplied by 100 so it can be treated as an 
  11700. integer string.  For example DOS 3.2 is reported as "320". 
  11701.  
  11702.  
  11703. ΓòÉΓòÉΓòÉ 11.14. EINSERT_LINE() ΓòÉΓòÉΓòÉ
  11704.  
  11705. Inserts a line after current line and positions the cursor on the same column 
  11706. number of the first nonblank character of preceding line. 
  11707.  
  11708.  
  11709. ΓòÉΓòÉΓòÉ 11.15. ENTRY_BOX(title) ΓòÉΓòÉΓòÉ
  11710.  
  11711. Creates a System-Modal Dialog Box with an entry field and two push buttons. The 
  11712. format for entry_box is: 
  11713.  
  11714. userstext = entrybox(title,buttons,entrytext,cols,
  11715.             maxchars)
  11716.  
  11717. with the following field definitions: 
  11718.  
  11719. userstext is the variable that will contain the user's text entered. 
  11720. title     the text to be displayed in the title bar. 
  11721. buttons   the labels on the buttons separated by delimiting characters. If this 
  11722.           entry is null, the EPM defaults to Enter and Cancel. 
  11723. entrytext contains the text to be entered into the user's text entry area. This 
  11724.           is useful for displaying defaults for change. 
  11725. cols      is the width of the dialog box. 
  11726. maxchars  is the maximum number of characters allowed for entry. 
  11727.  
  11728. An example of a procedure (called testit) that uses the entrybox command 
  11729. follows: 
  11730.  
  11731. defc testit
  11732.   k=entrybox('This is a test box.', '/one/two/',
  11733.              'Hi!',30, 10)
  11734.     message("The character returned was = "||k)
  11735.  
  11736. In the procedure, a dialog box with the title This is a test box will appear. 
  11737. The two buttons will be labeled one and two. Initially the word Hi! will be 
  11738. entered in the text input area. This is useful for displaying current values 
  11739. and allowing the user to change them. The dialog box will be thirty characters 
  11740. wide and allow the user to input up to ten characters. The input will be stored 
  11741. in the variable k and the command message will display the input. 
  11742.  
  11743. Also see the LISTBOX procedure in this section for an alternative means of 
  11744. getting user input. 
  11745.  
  11746.  
  11747. ΓòÉΓòÉΓòÉ 11.16. ERASETEMP(filename) ΓòÉΓòÉΓòÉ
  11748.  
  11749. Erases a file quietly (no "File not found" message) on both DOS and OS/2; 
  11750. returns 0 if successful erase, and the error code (if on DOS) which is usually 
  11751. 2 for 'file not found'. 
  11752.  
  11753.  
  11754. ΓòÉΓòÉΓòÉ 11.17. EXIST(filename) ΓòÉΓòÉΓòÉ
  11755.  
  11756. Determines whether filename exists. Returns a one if it does exist; a zero if 
  11757. it doesn't. 
  11758.  
  11759.  
  11760. ΓòÉΓòÉΓòÉ 11.18. FILETYPE() -- in SLNOHOST.E ΓòÉΓòÉΓòÉ
  11761.  
  11762. Returns the extension (everything after '.') of the current filename or fileid 
  11763. specified in arg(1). 
  11764.  
  11765.  
  11766. ΓòÉΓòÉΓòÉ 11.19. FILETYPE() -- in SAVELOAD.E ΓòÉΓòÉΓòÉ
  11767.  
  11768. Returns the 'ftype' portion of the host filename. 
  11769.  
  11770.  
  11771. ΓòÉΓòÉΓòÉ 11.20. FIND_ROUTINE(utility) ΓòÉΓòÉΓòÉ
  11772.  
  11773. Used to both verify that the external utility program exists, and to get its 
  11774. path. 
  11775.  
  11776.  
  11777. ΓòÉΓòÉΓòÉ 11.21. GET_CHAR() ΓòÉΓòÉΓòÉ
  11778.  
  11779. Returns the character at the current cursor position. 
  11780.  
  11781.  
  11782. ΓòÉΓòÉΓòÉ 11.22. GET_ENV(varname) ΓòÉΓòÉΓòÉ
  11783.  
  11784. Returns whether the variable name (varname) is found in the environment. 
  11785. Returns the setting if found; zero if not found. For example: 
  11786.  
  11787.         res=get_env('DPATH')
  11788.  
  11789. In this case the contents of the DPATH environment variable would be returned 
  11790. into the variable res. 
  11791.  
  11792.  
  11793. ΓòÉΓòÉΓòÉ 11.23. GETDATE() ΓòÉΓòÉΓòÉ
  11794.  
  11795. Returns the date in the form: Weekday Month Day, Year; MonthNum. 
  11796.  
  11797.  
  11798. ΓòÉΓòÉΓòÉ 11.24. GETTIME() ΓòÉΓòÉΓòÉ
  11799.  
  11800. Returns the time in the form: hh:mm:ss xm;hour24:hund. 
  11801.  
  11802.  
  11803. ΓòÉΓòÉΓòÉ 11.25. HEX2DEC() ΓòÉΓòÉΓòÉ
  11804.  
  11805. Converts the number in arg(1) to a decimal number; arg(1) is assumed to be a 
  11806. number of base arg(2) (hexadecimal by default). See the dec2hex() procedure for 
  11807. an example. 
  11808.  
  11809.  
  11810. ΓòÉΓòÉΓòÉ 11.26. ISA_MVS_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11811.  
  11812. Returns a zero and the error message (in error_msg) if it is not a valid MVS 
  11813. filename; and returns a one and the rest of the information if the candidate is 
  11814. a valid MVS filename. 
  11815.  
  11816.  
  11817. ΓòÉΓòÉΓòÉ 11.27. ISA_PC_FILENAME(candidate, var tempfile, var error_msg) ΓòÉΓòÉΓòÉ
  11818.  
  11819. Returns a zero and the error message (in error_msg) if it is not a valid PC 
  11820. filename; and returns a one and the rest of the information if the candidate 
  11821.  
  11822.  
  11823. ΓòÉΓòÉΓòÉ 11.28. ISA_VM_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11824.  
  11825. Returns a zero and the error message (in error_msg) if it is not a valid VM 
  11826. filename; and returns a one and the rest of the information if the candidate 
  11827.  
  11828.  
  11829. ΓòÉΓòÉΓòÉ 11.29. ISHOST(candidate, verb, var hostfile, var tempfile, var thisLT, var bin) ΓòÉΓòÉΓòÉ
  11830.  
  11831. Determines a filename's type and returns: 
  11832.  
  11833. 0 = PC filename 
  11834. 1 = VM filename 
  11835. 2 = MVS filenme 
  11836.  
  11837.  
  11838. ΓòÉΓòÉΓòÉ 11.30. ISNUM() ΓòÉΓòÉΓòÉ
  11839.  
  11840. Returns true if parameter given is a number, ignores leading and trailing 
  11841. spaces. 
  11842.  
  11843.  
  11844. ΓòÉΓòÉΓòÉ 11.31. ISOPTION(var cmdline, optionletter) ΓòÉΓòÉΓòÉ
  11845.  
  11846. Eliminates optionletter from cmdline; if optionletter occurred in the 
  11847. commandline, returns 1; returns 0 otherwise. 
  11848.  
  11849.  
  11850. ΓòÉΓòÉΓòÉ 11.32. JOINLINES() ΓòÉΓòÉΓòÉ
  11851.  
  11852. Joins the line below the cursor line with the cursor line. 
  11853.  
  11854.  
  11855. ΓòÉΓòÉΓòÉ 11.33. LISTBOX(params) ΓòÉΓòÉΓòÉ
  11856.  
  11857. Enables the dynamic creation of modal PM list boxes. A macro can pop up a list 
  11858. of items and have the user's selection returned to the macro. The entry chosen 
  11859. (with a mouse double click or enter from the keyboard) is returned. If ESC was 
  11860. hit then a null string is returned. Parameters are: 
  11861.  
  11862. param1  the title for the listbox 
  11863. param2  the list of items, separated by a common separator.  The common 
  11864.         separator is the first character in the string. 
  11865.  
  11866.                 example:  /cat/dog/fish
  11867.                           separator='/'
  11868.                           list=cat, dog, fish
  11869.                 example:  $cat/ground$fish/water
  11870.                           separator='$'
  11871.                           list=cat/ground, fish/water
  11872.  
  11873.         These lists will be displayed like the past commands are displayed in 
  11874.         the command line dialog box. If one of elements in the box is 
  11875.         double-clicked on, it will be returned. For instance, if the second 
  11876.         element of the first example list was chosen by the user, the string 
  11877.         DOG would be returned. 
  11878.  
  11879.         An alternate method, useful for long lists which might not fit into an 
  11880.         EPM string, is passing the data in a buffer.  This is indicated by 
  11881.         passing in a string starting with a hex '00', followed by the buffer 
  11882.         size, the buffer address, and an optional set of flags.  The full 
  11883.         param2 in this case would be, for 6.00 and above: 
  11884.  
  11885.                 \0 || atol(usedsize) || atoi(buffer_offset) || atoi(buffer_selector) [ || flag ]
  11886.         and for earlier versions: 
  11887.  
  11888.                 \0 || atoi(usedsize) || atoi(buffer_selector) || atoi(buffer_offset) [ || flag ]
  11889.  
  11890.         The function listbox_buffer_from_file, defined in STDCTRL.E, can be 
  11891.         used for putting the contents of a file into a buffer in a suitable 
  11892.         format for listbox(). 
  11893.  
  11894.         The default flag is 3.  The bits are: 
  11895.  
  11896.    1 Position the listbox below the points specified. 
  11897.  
  11898.    2 Map the points to the desktop. 
  11899.  
  11900.    4 Each listbox item starts with an ASCII help panel ID.  The IDs are removed 
  11901.      before filling the listbox.  The first button is assumed to be a Details 
  11902.      button.  Pressing it invokes help for the panel ID associated with the 
  11903.      current listbox item.  (This feature is used by the Workframe/2.) 
  11904. param3  (optional) button names.  A maximum of four button names can be 
  11905.         specified to allow multiple buttons. If button one is clicked on, the 
  11906.         highlighted value from the list is returned and so should probably be 
  11907.         entitled ENTER. If the second button is chosen, a null string will be 
  11908.         returned as so should have a title something equivalent to Cancel. If 
  11909.         included the third and fourth boxes return the numbers 3 and 4 
  11910.         respectively. The meanings of these buttons can be defined by the 
  11911.         programmer. If no button names are given, buttons one and two will 
  11912.         default to ENTER and CANCEL respectively. 
  11913. param4  (optional) row of text in which list box will go under. If this 
  11914.         parameter is not specified or if a parameter of zero (0) is specified, 
  11915.         the box will be placed under the cursor. 
  11916. param5  (optional) column of text in which list box will go under. If this 
  11917.         parameter is not specified or if a parameter of zero (0) is specified, 
  11918.         the box will be placed under the cursor. 
  11919.  
  11920.         Note:  If the row parameter is selected the column parameter must be 
  11921.         selected as well. 
  11922. param6  (optional) height of the listbox in characters 
  11923.  
  11924.         Note:  Since the default PM font is proportional the character height 
  11925.         and width are approximate values. 
  11926. param7  (optional) width of listbox in characters. 
  11927. param8  (optional) a buffer string - see below. 
  11928.  
  11929. An example of listbox usage is: 
  11930.  
  11931. retvalue = listbox("Pick a number",
  11932.                    "/one/two/three",
  11933.                    "/Enter/Cancel/None")
  11934.  
  11935. In this example there would be three entries in the list: one, two, and three. 
  11936. There would also be three buttons entitled: Enter, Cancel, and None. Since the 
  11937. last three parameters were omitted, the box would be located at the cursor 
  11938. position and would be wide enough to accommodate the longest element of the 
  11939. list and three buttons. 
  11940.  
  11941. The above only lets the caller get back a string containing an entry from the 
  11942. list if button 1 is selected.  The buffer string allows you to get both the 
  11943. button number and the selected text.  If present, it is a string consisting of 
  11944. (5.51 and below): 
  11945.  
  11946. item# || button# || help_ID || handle || prompt
  11947. or, in 5.60 and above, of: 
  11948.  
  11949. handle || item# || button# || help_ID || prompt
  11950. where item# is the listbox entry to be initially selected, button# is the 
  11951. button that will be the default, help_ID is a help panel ID (all shorts), 
  11952. handle is the window handle of the OWNERCLIENT (needed to call help; ignored if 
  11953. help_ID is 0), and prompt is an ASCIIZ string to be displayed below the title 
  11954. bar.  If help_ID is non-zero, the rightmost button is assumed to be the help 
  11955. button.  The new parameters are passed to the toolkit in the return buffer, 
  11956. which is padded with nulls, so only the minimum needed string need be sent. 
  11957. The old way only supported returning a string if button 1 was pressed; button 2 
  11958. was assumed to be Cancel, and returned null; anything else returned the button 
  11959. number.  The new way returns one byte representing the button number (in hex) 
  11960. followed by the selected item. A button number of 0 means Esc was pressed or 
  11961. the dialog was closed.  If param8 was passed, the listbox() routine returns 
  11962. this entire string; if not, it parses it and returns what the old callers 
  11963. expected. 
  11964.  
  11965. Examples of using all the features of listbox() can be found in BOOKMARK.E. 
  11966.  
  11967. Also see the ENTRYBOX procedure in this section for an alternative method of 
  11968. getting user input. 
  11969.  
  11970.  
  11971. ΓòÉΓòÉΓòÉ 11.34. LOADFILE(files, options) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  11972.  
  11973. Issues edit command on the specified files with the specified options. 
  11974.  
  11975.  
  11976. ΓòÉΓòÉΓòÉ 11.35. LOADFILE(files,options) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11977.  
  11978. Issues edit command on the specified files with the specified options, after 
  11979. checking for host file specification ('H:'). 
  11980.  
  11981.  
  11982. ΓòÉΓòÉΓòÉ 11.36. LOCK() ΓòÉΓòÉΓòÉ
  11983.  
  11984. Locks a file from other users in a LAN situation. Returns a zero if successful; 
  11985. one if unsuccessful. This procedure is only available if requested with the 
  11986. WANT_LAN_SUPPORT configuration constant. 
  11987.  
  11988.  
  11989. ΓòÉΓòÉΓòÉ 11.37. MakeTempName() ΓòÉΓòÉΓòÉ
  11990.  
  11991. Creates a temporary filename using the optional arguments filename and fileid. 
  11992. If no arguments are specified, the current filename and current fileid are 
  11993. used. For example, if filename = `origname' and its fileid is 2, then the 
  11994. temporary filename returned will be origname.$$2. 
  11995.  
  11996.  
  11997. ΓòÉΓòÉΓòÉ 11.38. MATHCOMMON(input, suffix) ΓòÉΓòÉΓòÉ
  11998.  
  11999. Is responsible for math computations (dec, hex, or oct) done at commandline in 
  12000. E, where input is the expression to be calculated and suffix is either 'x', 'o' 
  12001. or '' depending upon the base of the number to be returned. 
  12002.  
  12003.  
  12004. ΓòÉΓòÉΓòÉ 11.39. MAX(a,b) ΓòÉΓòÉΓòÉ
  12005.  
  12006. Returns the number which has the maximum value of those numbers in the 
  12007. arguments list. As many arguments as needed can be listed. 
  12008.  
  12009.  
  12010. ΓòÉΓòÉΓòÉ 11.40. MESSAGE(mymsg) ΓòÉΓòÉΓòÉ
  12011.  
  12012. Prints the message specified by the string mymsg on the messageline. This 
  12013. procedure is a carry-over from earlier versions of E and effectively does the 
  12014. same thing as a SAYERROR statement, except this MESSAGE() procedure takes up 
  12015. more code. 
  12016.  
  12017.  
  12018. ΓòÉΓòÉΓòÉ 11.41. MESSAGENWAIT() ΓòÉΓòÉΓòÉ
  12019.  
  12020. Prints the message passed to it in the editor messages dialog box and waits for 
  12021. Cancel or ESC. 
  12022.  
  12023.  
  12024. ΓòÉΓòÉΓòÉ 11.42. MIN(a,b) ΓòÉΓòÉΓòÉ
  12025.  
  12026. Returns the number which has the minimum value of those numbers in the list of 
  12027. parameters. As many parameters as needed can be included for comparison. 
  12028.  
  12029.  
  12030. ΓòÉΓòÉΓòÉ 11.43. MY_C_ENTER() ΓòÉΓòÉΓòÉ
  12031.  
  12032. Applies to c_enter key the appropriate action defined in C_ENTER_ACTION 
  12033. constant. 
  12034.  
  12035.  
  12036. ΓòÉΓòÉΓòÉ 11.44. MY_ENTER() ΓòÉΓòÉΓòÉ
  12037.  
  12038. Applies to enter key the appropriate action defined in ENTER_ACTION constant. 
  12039.  
  12040.  
  12041. ΓòÉΓòÉΓòÉ 11.45. NAMEFILE() -- in SLNOLOAD.e ΓòÉΓòÉΓòÉ
  12042.  
  12043. Issues name command using arg(1) as the new filename. 
  12044.  
  12045.  
  12046. ΓòÉΓòÉΓòÉ 11.46. NAMEFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12047.  
  12048. Issues name command using arg(1) as the new filename, after checking whether 
  12049. file is a host file. 
  12050.  
  12051.  
  12052. ΓòÉΓòÉΓòÉ 11.47. NO_CHAR_MARK() ΓòÉΓòÉΓòÉ
  12053.  
  12054. Checks if WANT_CHAR_OPS option was set in STDCNF.e. 
  12055.  
  12056.  
  12057. ΓòÉΓòÉΓòÉ 11.48. OPENSHELLWINDOW() ΓòÉΓòÉΓòÉ
  12058.  
  12059. Opens a edit window under a temporary filename for output. (i.e. like the DIR 
  12060. command does) 
  12061.  
  12062.  
  12063. ΓòÉΓòÉΓòÉ 11.49. PARSE_FILE_N_OPTS(argstr) ΓòÉΓòÉΓòÉ
  12064.  
  12065. Parses argstr which contains a mix of options and DOS file specs. The DOS file 
  12066. specs can contain an '=' for the path or fileid, which will be replaced by the 
  12067. corresponding part of the previous file. 
  12068.  
  12069.  
  12070. ΓòÉΓòÉΓòÉ 11.50. PARSE_FILENAME(var filename) ΓòÉΓòÉΓòÉ
  12071.  
  12072. Parses a DOS filename.  Optional second argument gives source for '=' when used 
  12073. for path of fileid.  Rc is 0 if successful, or rc is the position of '=' in 
  12074. first argument if no second argument given but was needed. 
  12075.  
  12076.  
  12077. ΓòÉΓòÉΓòÉ 11.51. PARSE_LEADING_OPTIONS(var rest, var options) ΓòÉΓòÉΓòÉ
  12078.  
  12079. Parses options portion of the edit command. It does not assume that all options 
  12080. are specified before filenames. It is called by DEFC EDIT. 
  12081.  
  12082.  
  12083. ΓòÉΓòÉΓòÉ 11.52. PBEGIN_MARK() ΓòÉΓòÉΓòÉ
  12084.  
  12085. Moves the cursor to the first character of the mark area.  If the mark area is 
  12086. not in the active file, the marked file is activated. 
  12087.  
  12088.  
  12089. ΓòÉΓòÉΓòÉ 11.53. PBEGIN_WORD() ΓòÉΓòÉΓòÉ
  12090.  
  12091. Moves the cursor to the beginning of the word if the cursor is on this word. 
  12092. If its not on a word, its moved to the beginning of the first word on the left. 
  12093. If there is no word on the left its moved to the beginning of the word on the 
  12094. right.  If the line is empty the cursor doesn't move. 
  12095.  
  12096.  
  12097. ΓòÉΓòÉΓòÉ 11.54. PBLOCK_REFLOW(option, var space, var tempofid) ΓòÉΓòÉΓòÉ
  12098.  
  12099. Reflows the text in the marked area; then the destination block area must be 
  12100. selected and a second call to this procedure to reflow the source block in the 
  12101. destination block.  The source block is filled with spaces. Option=0 saves the 
  12102. marked block in temp file; option=1 reflows temp file text and copies it to 
  12103. marked area 
  12104.  
  12105.  
  12106. ΓòÉΓòÉΓòÉ 11.55. PCENTER_MARK() ΓòÉΓòÉΓòÉ
  12107.  
  12108. Centers the strings inside a block mark. If a line mark exists, the text in the 
  12109. marked lines is centered within the current margins. If no mark exists, the 
  12110. text on the current line is centered within the current margins. 
  12111.  
  12112.  
  12113. ΓòÉΓòÉΓòÉ 11.56. PCOMMON_ADJUST_OVERLAY(letter) ΓòÉΓòÉΓòÉ
  12114.  
  12115. Implements adjust and overlay commands for character and line marks (previously 
  12116. only block marks enjoyed these privileges); parameter letter specifies 'A' for 
  12117. adjust and 'O' for overlay. This procedure is only included if requested with 
  12118. the WANT_CHAR_OPS configuration constant. 
  12119.  
  12120.  
  12121. ΓòÉΓòÉΓòÉ 11.57. PCOPY_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  12122.  
  12123. Implements the copymark statement for character marks; parameters specify the 
  12124. marked area. 
  12125.  
  12126.  
  12127. ΓòÉΓòÉΓòÉ 11.58. PDELETE_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  12128.  
  12129. Implements the deletemark statement for character marks; parameters specify the 
  12130. marked area. 
  12131.  
  12132.  
  12133. ΓòÉΓòÉΓòÉ 11.59. PDISPLAY_MARGINS() ΓòÉΓòÉΓòÉ
  12134.  
  12135. Puts the margin settings on the current line. 
  12136.  
  12137.  
  12138. ΓòÉΓòÉΓòÉ 11.60. PDISPLAY_TABS() ΓòÉΓòÉΓòÉ
  12139.  
  12140. Puts the tab stops on the current line. 
  12141.  
  12142.  
  12143. ΓòÉΓòÉΓòÉ 11.61. PEND_MARK() ΓòÉΓòÉΓòÉ
  12144.  
  12145. Moves the cursor to the end of the marked area. 
  12146.  
  12147.  
  12148. ΓòÉΓòÉΓòÉ 11.62. PEND_WORD() ΓòÉΓòÉΓòÉ
  12149.  
  12150. Moves the cursor to the end of the word if the cursor is on this word.  If it's 
  12151. not on a word, it's moved to the end of the first word on the right.  If there 
  12152. is no word on the right it's moved to the end of the word on the left.  If the 
  12153. line is empty the cursor doesn't move. 
  12154.  
  12155.  
  12156. ΓòÉΓòÉΓòÉ 11.63. PFILE_EXISTS() ΓòÉΓòÉΓòÉ
  12157.  
  12158. Checks if file already exists in ring. 
  12159.  
  12160.  
  12161. ΓòÉΓòÉΓòÉ 11.64. PFILL_MARK() ΓòÉΓòÉΓòÉ
  12162.  
  12163. Implements the fillmark statement for character marks; checks arg() to see if a 
  12164. character for fill was specified, otherwise prompts for a character. This 
  12165. procedure is available only if requested with the WANT_CHAR_OPS configuration 
  12166. constant. 
  12167.  
  12168.  
  12169. ΓòÉΓòÉΓòÉ 11.65. PFIND_BLANK_LINE() ΓòÉΓòÉΓòÉ
  12170.  
  12171. Finds first blank line starting from current line. 
  12172.  
  12173.  
  12174. ΓòÉΓòÉΓòÉ 11.66. PFIRST_NONBLANK() ΓòÉΓòÉΓòÉ
  12175.  
  12176. Finds first nonblank character in the current line. 
  12177.  
  12178.  
  12179. ΓòÉΓòÉΓòÉ 11.67. PLOWERCASE() ΓòÉΓòÉΓòÉ
  12180.  
  12181. Changes all alphabetic characters in the marked area to lowercase. 
  12182.  
  12183.  
  12184. ΓòÉΓòÉΓòÉ 11.68. PMARGINS() ΓòÉΓòÉΓòÉ
  12185.  
  12186. Returns the current margins setting.  Uses pcommon_tab_margin(). 
  12187.  
  12188.  
  12189. ΓòÉΓòÉΓòÉ 11.69. PMARK(mt) ΓòÉΓòÉΓòÉ
  12190.  
  12191. Marks at the cursor position; receives the mark type as an argument. 
  12192.  
  12193.  
  12194. ΓòÉΓòÉΓòÉ 11.70. PMARK_WORD() ΓòÉΓòÉΓòÉ
  12195.  
  12196. Marks the word pointed at by the cursor.  If the cursor is on a space the word 
  12197. at the right is marked.  If there is no word on the right, the word on the left 
  12198. is marked. 
  12199.  
  12200.  
  12201. ΓòÉΓòÉΓòÉ 11.71. PMOVE_MARK() ΓòÉΓòÉΓòÉ
  12202.  
  12203. Implements the movemark statement for character marks by calling pcopy_mark() 
  12204. and pcopy_delete(). 
  12205.  
  12206.  
  12207. ΓòÉΓòÉΓòÉ 11.72. PPUT_STRING_BACK(string) ΓòÉΓòÉΓòÉ
  12208.  
  12209. Puts string back into marked area on current line. 
  12210.  
  12211.  
  12212. ΓòÉΓòÉΓòÉ 11.73. PRESTORE_MARK(savemark) ΓòÉΓòÉΓòÉ
  12213.  
  12214. Marks the area specified in savemark, where savemark  is a concatenated string 
  12215. composed of the components: first_line, last_line, first_col, last_col, fileid, 
  12216. marktype. 
  12217.  
  12218.  
  12219. ΓòÉΓòÉΓòÉ 11.74. PRESTORE_POS(save_pos) ΓòÉΓòÉΓòÉ
  12220.  
  12221. Resets the cursor position according to save_pos, a string composed of the 
  12222. concatenation of the fields:  .col, .line, .cursorx, and .cursory. 
  12223.  
  12224.  
  12225. ΓòÉΓòÉΓòÉ 11.75. PRINTER_READY() ΓòÉΓòÉΓòÉ
  12226.  
  12227. In EPM this procedure will always return ready. It remains for compatibility 
  12228. with previous E macros. 
  12229.  
  12230.  
  12231. ΓòÉΓòÉΓòÉ 11.76. PROOF1(word) ΓòÉΓòÉΓòÉ
  12232.  
  12233. Calls Lexam to spell check for the word specified by word. 
  12234.  
  12235.  
  12236. ΓòÉΓòÉΓòÉ 11.77. PROOF2() ΓòÉΓòÉΓòÉ
  12237.  
  12238. Calls Lexam to begin spell-checking at the current word. 
  12239.  
  12240.  
  12241. ΓòÉΓòÉΓòÉ 11.78. PSAVE_MARK(var savemark) ΓòÉΓòÉΓòÉ
  12242.  
  12243. Saves the specifications of the currently marked area in savemark, a string 
  12244. composed of the concatenation of: first_line, last_line, first_col, last_col, 
  12245. fileid, and marktype. 
  12246.  
  12247.  
  12248. ΓòÉΓòÉΓòÉ 11.79. PSAVE_POS(var save_pos) ΓòÉΓòÉΓòÉ
  12249.  
  12250. Saves the cursor position according to save_pos, a string composed of the 
  12251. concatenation of the fields:  .line, .col, .cursorx, and .cursory. 
  12252.  
  12253.  
  12254. ΓòÉΓòÉΓòÉ 11.80. PSET_MARK(firstline, lastline, firstcol, lastcol, mt, fileid) ΓòÉΓòÉΓòÉ
  12255.  
  12256. Marks the area designated by the parameters.  The firstline, lastline, firstcol 
  12257. and lastcol refer to position of the text in the file.  The mt is the mark type 
  12258. (block, line, or character).  The fileid is the id number of the file to be 
  12259. marked. 
  12260.  
  12261.  
  12262. ΓòÉΓòÉΓòÉ 11.81. PTABS() ΓòÉΓòÉΓòÉ
  12263.  
  12264. Calls pcommon_tab_margin() to return tab settings. 
  12265.  
  12266.  
  12267. ΓòÉΓòÉΓòÉ 11.82. PUPPERCASE() ΓòÉΓòÉΓòÉ
  12268.  
  12269. Converts all alphabetic characters in the marked area to uppercase letters. 
  12270.  
  12271.  
  12272. ΓòÉΓòÉΓòÉ 11.83. QUITFILE() -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  12273.  
  12274. Issues quit command after checking windowing and modify status. 
  12275.  
  12276.  
  12277. ΓòÉΓòÉΓòÉ 11.84. QUITFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12278.  
  12279. Issues quit command after checking windowing and modify status. 
  12280.  
  12281.  
  12282. ΓòÉΓòÉΓòÉ 11.85. REGISTER_MOUSEHANDLER(IsGlobal, event, mcommand) ΓòÉΓòÉΓòÉ
  12283.  
  12284. Allows the binding of mouse actions to commands.  Mouse actions can be global 
  12285. or local (specific to a file).  Mouse actions will be processed as follows: 
  12286.  
  12287.  1. local mouse action definition (if defined) 
  12288.  
  12289.     Note:  Support for local mouse definitions is optional, and by default is 
  12290.            omitted (for performance reasons).  It is controlled by the 
  12291.            LOCAL_MOUSE_SUPPORT constant in MYCNF.E.
  12292.  
  12293.  
  12294.  2. else global mouse action definition (if defined) 
  12295.  3. else mouse action ignored. 
  12296.  
  12297. The variable IsGlobal determines whether the mouse action described is local or 
  12298. global. The variable event determines the mouse action to be bound with the 
  12299. command listed in the variable mcommand. Event should be in the following 
  12300. format: 
  12301.  
  12302.         'key action state'
  12303.  
  12304. The key refers to the mouse button (either 1 or 2). The action must be one of 
  12305. the following: 
  12306.  
  12307. BEGINDRAG           activates at the beginning of the drag 
  12308. CLICK               activates if a button (specified by key) is single clicked 
  12309. SECONDCLK           activates if a button (specified by key) is double clicked 
  12310.  
  12311. These actions must be capitalized and have exactly one space between the key 
  12312. and the state numbers. The state should be the sum of the following: 
  12313.  
  12314. 0 = no states active 
  12315. 1 = shift key active 
  12316. 2 = control key active 
  12317. 4 = alternate key active 
  12318.  
  12319. An Event should can also be of the following format: 
  12320.  
  12321.         'action'
  12322.  
  12323. where action must be one of the following: 
  12324.  
  12325. ENDDRAG             activates at the end of a drag 
  12326. CANCELDRAG          activates if a drag is cancelled 
  12327. CHORD               activates if both mouse button 1 and mouse button 2 are 
  12328.                     clicked at the same time.  (Generated in EPM 6 only.) 
  12329. CONTEXTMENU         activates if the defined context menu (pop-up menu) mouse 
  12330.                     action is performed.  The default is that single-clicking 
  12331.                     mouse button 2 generates this message, but it can be 
  12332.                     configured in the OS/2 System Settings. (Generated in EPM 6 
  12333.                     only.) 
  12334.  
  12335. These actions must be capitalized and unpadded by spaces. 
  12336.  
  12337. An example of a mouse action definition is: 
  12338.  
  12339. call register_mousehandler(0, '2 SECONDCLK 3', 'quit')
  12340.  
  12341. This would set the second click of button two on the mouse with the shift and 
  12342. control states activated to do a QUIT command.  This key action would be bound 
  12343. locally to a particular file. Similarly, 
  12344.  
  12345. call register_mousehandler(1, 'CANCELDRAG', 'SynthesizeVoice whoops')
  12346.  
  12347. would cause the 'SynthesizeVoice whoops' command to be invoked every time a 
  12348. drag was canceled in any file that did not have a local CANCELDRAG event 
  12349. handler defined. 
  12350.  
  12351.  
  12352. ΓòÉΓòÉΓòÉ 11.86. REMOVE_TRAILING_SPACES() ΓòÉΓòÉΓòÉ
  12353.  
  12354. Calls strip() to remove all trailing blanks; no longer used by standard EPM, 
  12355. but left in for compatibility --> use strip() directly. 
  12356.  
  12357.  
  12358. ΓòÉΓòÉΓòÉ 11.87. SAVEFILE(name) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  12359.  
  12360. Issues save command with file specified in name parameter. 
  12361.  
  12362.  
  12363. ΓòÉΓòÉΓòÉ 11.88. SAVEFILE(name) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12364.  
  12365. Issues save command with file specified, after checking whether the file is a 
  12366. host file. 
  12367.  
  12368.  
  12369. ΓòÉΓòÉΓòÉ 11.89. SAYATBOX() ΓòÉΓòÉΓòÉ
  12370.  
  12371. Use the messageNwait command instead. 
  12372.  
  12373.  
  12374. ΓòÉΓòÉΓòÉ 11.90. SCROLL_LOCK() ΓòÉΓòÉΓòÉ
  12375.  
  12376. Determines whether or not the Scroll Lock key has been set on; if so, returns 
  12377. 1; otherwise returns 0. 
  12378.  
  12379.  
  12380. ΓòÉΓòÉΓòÉ 11.91. SEARCH_PATH(AppendPath, FileName) ΓòÉΓòÉΓòÉ
  12381.  
  12382. Searches a path specifed in AppendPath for the file specified in FileName. 
  12383. Returns the pathname, if successful; a null string if unsuccessful. 
  12384.  
  12385.  
  12386. ΓòÉΓòÉΓòÉ 11.92. SELECT_EDIT_KEYS() ΓòÉΓòÉΓòÉ
  12387.  
  12388. Calls filetype() which returns the extension of the file whose fileid is 
  12389. specified in arg(1), then activates the default keyset edit_keys. In EPM this 
  12390. function is defunct. 
  12391.  
  12392.  
  12393. ΓòÉΓòÉΓòÉ 11.93. SETLT(var LT_to_use) ΓòÉΓòÉΓòÉ
  12394.  
  12395. Sets the logical terminal to use. This procedure is only active if host editing 
  12396. is included. 
  12397.  
  12398.  
  12399. ΓòÉΓòÉΓòÉ 11.94. SET_FTO(hostfile, bin var fto) ΓòÉΓòÉΓòÉ
  12400.  
  12401. Sets the file transfer options. This procedure is only active if host editing 
  12402. is included. 
  12403.  
  12404.  
  12405. ΓòÉΓòÉΓòÉ 11.95. SetMouseSet (IsGlobal, NewMSName) ΓòÉΓòÉΓòÉ
  12406.  
  12407. Sets the current mouse action definition keys to the NewMSName. If IsGlobal is 
  12408. true then the effects will be global, if IsGlobal if false then the new 
  12409. settings will only affect the local file and not the rest of the files in the 
  12410. ring. 
  12411.  
  12412.  
  12413. ΓòÉΓòÉΓòÉ 11.96. SetTitleText() ΓòÉΓòÉΓòÉ
  12414.  
  12415. Sets the text in the editor's active title bar. 
  12416.  
  12417.  
  12418. ΓòÉΓòÉΓòÉ 11.97. SHOWWINDOW() ΓòÉΓòÉΓòÉ
  12419.  
  12420. Allows the edit window to be invisible or visible. 
  12421.  
  12422.  
  12423. ΓòÉΓòÉΓòÉ 11.98. SKIP_SPACES() ΓòÉΓòÉΓòÉ
  12424.  
  12425. Performs upon universal variables input (a string) and i (a position in the 
  12426. string) set by next_sym(); increments i beyond any blank spaces. 
  12427.  
  12428.  
  12429. ΓòÉΓòÉΓòÉ 11.99. SORT(firstline, lastline, firstcol, lastcol, fileid) ΓòÉΓòÉΓòÉ
  12430.  
  12431. Sorts the text in the area specified by the parameters. The first four 
  12432. arguements outlines the area of the text to be sorted and the fifth is the id 
  12433. number of the file to be sorted. 
  12434.  
  12435.  
  12436. ΓòÉΓòÉΓòÉ 11.100. SPELLWORD() ΓòÉΓòÉΓòÉ
  12437.  
  12438. Checks the word at the cursor position, removing punctuation characters.  It is 
  12439. assumed that the cursor is positioned at the beginning of the word.  (Used by 
  12440. proof2 and proofword.)  If it's a valid word then check the spelling of the 
  12441. word using the lexam opcode.  If a valid result is returned place it in a PM 
  12442. list box using the 'listbox' procedure. Returns the length of the word found. 
  12443. The optional argument is a string containing a button name.  E.g., '/Next' 
  12444.  
  12445.  
  12446. ΓòÉΓòÉΓòÉ 11.101. SPLITLINES() ΓòÉΓòÉΓòÉ
  12447.  
  12448. Inserts a line; moves the text from the cursor position to the end of line onto 
  12449. the new line; and indents the new line to the column of the first non-blank 
  12450. character of the line preceding it. 
  12451.  
  12452.  
  12453. ΓòÉΓòÉΓòÉ 11.102. SUBDIR() ΓòÉΓòÉΓòÉ
  12454.  
  12455. Uses SUBDIR if in DOS; uses FILEFIND if in OS/2 protect mode; then calls 
  12456. find_routine() to verify that the external utility program exists, and to get 
  12457. its path. 
  12458.  
  12459.  
  12460. ΓòÉΓòÉΓòÉ 11.103. SYNONYM() ΓòÉΓòÉΓòÉ
  12461.  
  12462. Checks the next word on the line for its possible synonyms. If synonyms are 
  12463. found a PM list box is displayed showing the possible new words. 
  12464.  
  12465.  
  12466. ΓòÉΓòÉΓòÉ 11.104. TRUNC(num) ΓòÉΓòÉΓòÉ
  12467.  
  12468. Truncates that part (if any) of num after a decimal point. 
  12469.  
  12470.  
  12471. ΓòÉΓòÉΓòÉ 11.105. UNLOCK(fileid) ΓòÉΓòÉΓòÉ
  12472.  
  12473. Attempts to unlock a previously locked file in a LAN situation. Returns a zero 
  12474. if successful; a one if unsuccessful. This procedure is only available if 
  12475. requested with the WANT_LAN_SUPPORT configuration constant. 
  12476.  
  12477.  
  12478. ΓòÉΓòÉΓòÉ 11.106. VMFILE(var name, var cmdline) ΓòÉΓòÉΓòÉ
  12479.  
  12480. Checks to make sure that a host filename (name) is of the correct form. 
  12481.  
  12482.  
  12483. ΓòÉΓòÉΓòÉ 11.107. WINDOWSIZE1(row,col,x,y) ΓòÉΓòÉΓòÉ
  12484.  
  12485. Sizes a window row high and col wide based at the lower left hand corner 
  12486. coordinates of x and y. An optional fifth argument sets: 
  12487.  
  12488. 1 = size window 
  12489. 2 = move window 
  12490. 3 = both (default) 
  12491.  
  12492.  
  12493. ΓòÉΓòÉΓòÉ 12. Return Codes ΓòÉΓòÉΓòÉ
  12494.  
  12495.   RC    Error strings
  12496.  ----  -----------------
  12497.    -1  Unable to Initialize interpreter object
  12498.    -2  File not found
  12499.    -3  Path not found
  12500.    -4  Too many open files
  12501.    -5  Access denied
  12502.    -6  DOS ERROR: Message not available
  12503.    -7  Memory control blocks destroyed. Save files and reboot.
  12504.    -8  Insufficient memory
  12505.    -9  Error Building SubMenu
  12506.   -10  Error Building Menu Item
  12507.  
  12508.   -11  Error Showing Menu
  12509.   -12  Error Deleting Menu
  12510.   -13  Too Many AVIO window
  12511.   -14  DOS ERROR: Message not available
  12512.   -15  Invalid drive
  12513.   -16  DOS ERROR: Message not available
  12514.   -17  DIS ERROR: Message not available
  12515.   -18  No more files
  12516.   -19  Disk is write-protected
  12517.   -20  Unknown unit
  12518.  
  12519.   -21  Drive not ready
  12520.   -22  Unknown command
  12521.   -23  Data error (CRC)
  12522.   -24  Bad request structure length
  12523.   -25  Seek error
  12524.   -26  Unknown media type
  12525.   -27  Sector not found
  12526.   -28  Printer out of paper
  12527.   -29  Write fault
  12528.   -30  Read fault
  12529.  
  12530.   -31  General failure
  12531.   -32  ERROR: Message not available
  12532.  ...   ERROR: Message not available
  12533.  -253  ERROR: Message not available
  12534.  -254  Numeric overflow or underflow
  12535.  -255  Invalid number of arguments
  12536.  -256  Recursion too deep
  12537.  -257  Invalid number of parameters
  12538.  -258  Out of string space
  12539.  -259  Expression stack overflow
  12540.  -260  Invalid fileid
  12541.  
  12542.  -261  Illegal opcode
  12543.  -262
  12544.  -263  Invalid argument
  12545.  -264  For loops nested too deep
  12546.  -265  Divide by zero
  12547.  -266  Unable to shrink
  12548.  -267  Invalid call by reference
  12549.  -268  Procedure needs more arguments
  12550.  -269  User Break. Command halted
  12551.  -270  Not enough memory
  12552.  
  12553.  -271  Error in margin settings
  12554.  -272  Error in tab settings
  12555.  -273  String not found
  12556.  -274  Unknown command
  12557.  -275  Missing filename
  12558.  -276  Line too long to join
  12559.  -277  Too many files
  12560.  -278  Line(s) truncated
  12561.  -279  Text already marked
  12562.  -280  Text not marked
  12563.  
  12564.  -281  Source destination conflict
  12565.  -282  New file
  12566.  -283  Line mark required
  12567.  -284  Error opening file
  12568.  -285  Error writing file
  12569.  -286  Error reading file
  12570.  -287  Insufficient disk space
  12571.  -288  Block mark required
  12572.  -289  Too many rings
  12573.  -290  Invalid EX file or incorrect version.
  12574.  
  12575.  -291  No main entry point
  12576.  -292  Error closing file
  12577.  -293  has been modified
  12578.  -294  Quit without saving?
  12579.  -295
  12580.  -296
  12581.  -297
  12582.  -298
  12583.  -299
  12584.  -300  Command dialog box too long to shell
  12585.  
  12586.  -301  Cannot unlink module in use
  12587.  -302  Cannot unlink base keyset module
  12588.  -303  Internal error: unlink invalid mod
  12589.  -304  Linking module error
  12590.  -305  DEFMAIN not found
  12591.  -306  DEFINIT not found
  12592.  -307  Link: file not found
  12593.  -308  Link: invalid filename
  12594.  -309  File already linked
  12595.  -310  Unlink: unknown module
  12596.  
  12597.  -311  Unlink: bad module filename
  12598.  -312  Call: duplicated proc
  12599.  -313  Call: unknown proc
  12600.  -314  Grep: memory error
  12601.  -315  Grep: missing ]
  12602.  -316  Grep: bad range in [a-z]
  12603.  -317  Grep: empty []
  12604.  -318  Grep: regular expression too long
  12605.  -319  Dynalink: incorrect number of parameters
  12606.  -320
  12607.  
  12608.  -321  Cannot find keyset
  12609.  -322  Dynalink: unrecognized library name
  12610.  -323  Line number invalid or too large for file
  12611.  -324  Keyboard status failed
  12612.  -325  Buffer creation size too large
  12613.  -326  Dynalink: unrecognized procedure name
  12614.  -327  Too many keysets
  12615.  -328
  12616.  -328  Invalid first parameter
  12617.  -329  Invalid second parameter
  12618.  -330  Invalid third parameter
  12619.  
  12620.  -331  Invalid fourth parameter
  12621.  -332  Invalid fifth parameter
  12622.  -333  Invalid sixth parameter
  12623.  -334  Invalid seventh parameter
  12624.  -335  Invalid Subcommand
  12625.  -336  Invalid column number
  12626.  -337  Invalid array identifier
  12627.  -338  Array already exists:
  12628.  -339  ERROR: Message not available
  12629.   ...  ERROR: Message not available
  12630.   etc.
  12631.  
  12632.  
  12633. ΓòÉΓòÉΓòÉ 13. ET Compilation Error Message Explanations ΓòÉΓòÉΓòÉ
  12634.  
  12635. If you have made changes to the configuration or have programmed your own 
  12636. macros in the E language, this section is important to you. Any syntactic or 
  12637. semantic errors in your programming, will be noted by the ET compiler. The 
  12638. following section describes each compilation error in simple terms. When you 
  12639. receive an error from ET, note the error message and look it up in the 
  12640. following list. The messages appear in alphabetic order. 
  12641.  
  12642.  
  12643. ΓòÉΓòÉΓòÉ 13.1. Column specification out of range. ΓòÉΓòÉΓòÉ
  12644.  
  12645. The value specified for a column position exceeds the compiler's maximum line 
  12646. length of 255. 
  12647.  
  12648.  
  12649. ΓòÉΓòÉΓòÉ 13.2. Comment not terminated. ΓòÉΓòÉΓòÉ
  12650.  
  12651. You have begun a comment with the '/*' string but never ended it with a 
  12652. matching '*/'. This means that all code after the comment has been ignored by 
  12653. the compiler.  Reaching an end of file has alerted the compiler to the fact 
  12654. that the comment was not terminated. 
  12655.  
  12656.  
  12657. ΓòÉΓòÉΓòÉ 13.3. DEFMAIN already defined. ΓòÉΓòÉΓòÉ
  12658.  
  12659. You have defined more than one main procedure using the DEFMAIN statement. Only 
  12660. one can be defined at a time. See User's Manual section Definition Primitives 
  12661. for more information. 
  12662.  
  12663.  
  12664. ΓòÉΓòÉΓòÉ 13.4. EX code too big. ΓòÉΓòÉΓòÉ
  12665.  
  12666. The code that ET is producing after compiling your input file is taking up more 
  12667. space than allowable. The maximum amount of memory available for a .EX file is 
  12668. 65,500 bytes. 
  12669.  
  12670.  
  12671. ΓòÉΓòÉΓòÉ 13.5. Expecting '('. ΓòÉΓòÉΓòÉ
  12672.  
  12673. The compiler was expecting a left parenthesis.  Possible reasons for this are 
  12674. that you have called a procedure and omitted the parentheses after the 
  12675. procedure name. The syntax for procedure calls is either: 
  12676.  
  12677.      proc_name([parameters])
  12678.  OR  call proc_name([parameters])
  12679.  
  12680.  
  12681. ΓòÉΓòÉΓòÉ 13.6. Expecting ')'. ΓòÉΓòÉΓòÉ
  12682.  
  12683. The compiler was expecting a right parenthesis to match a left parenthesis 
  12684. which was read in earlier.  Perhaps you have not matched each parenthesis in a 
  12685. procedure call or complex expression.  For example, if the following expression 
  12686. was typed in YOUR_FILE.E:           call proc_test( k=( (a*b)+ 8 ),  you would 
  12687. have received such an error message because there are three left parentheses 
  12688. and only two right parentheses. 
  12689.  
  12690.  
  12691. ΓòÉΓòÉΓòÉ 13.7. Expecting ';'. ΓòÉΓòÉΓòÉ
  12692.  
  12693. The compiler's newline symbol is the semi-colon (';'). Therefore, they are 
  12694. often interchangeable. A statement was encountered whose syntax requires either 
  12695. a semi-colon or a new line in a specific place, but no such semi-colon or new 
  12696. line was found. For example, each INCLUDE statement is required to end with 
  12697. either a semi-colon or a new line. All of the following examples are 
  12698. syntactically correct: 
  12699.  
  12700. include 'mystuff.e' ; include 'mykeys.e'
  12701.  
  12702. AND
  12703.  
  12704. include 'mystuff.e'
  12705. include 'mykeys.e'
  12706.  
  12707. AND
  12708.  
  12709. include 'mystuff.e' ; x = 1
  12710. However, you could not have multiple INCLUDE statements on one line without a 
  12711. semi-colon as separator. 
  12712.  
  12713.  
  12714. ΓòÉΓòÉΓòÉ 13.8. Expecting ','. ΓòÉΓòÉΓòÉ
  12715.  
  12716. A statement has been found whose syntax dictates that there should be a comma 
  12717. in a specific position, yet no comma was found there. The most likely cause of 
  12718. this error message is that you have called some built-in procedure, but have 
  12719. not given the correct number of parameters.  The compiler is looking for a 
  12720. comma which would indicate that there are more parameters still to come. 
  12721.  
  12722.  
  12723. ΓòÉΓòÉΓòÉ 13.9. Expecting '='. ΓòÉΓòÉΓòÉ
  12724.  
  12725. A statement was found whose syntax dictates that an assignment operator must 
  12726. occur at some specific place in the statement, but no such assignment symbol 
  12727. was found.  One example of such a statement is the FOR statement.  As shown in 
  12728. section Conditional and Loop Statements, there must be a '=' symbol immediately 
  12729. after the loop variable name. The other likely causes of this error are syntax 
  12730. errors in a CONST declaration (see Constants). 
  12731.  
  12732.  
  12733. ΓòÉΓòÉΓòÉ 13.10. Expecting an identifier. ΓòÉΓòÉΓòÉ
  12734.  
  12735. A statement has been found whose syntax dictates that there should be an 
  12736. identifier in a specific position, yet no such identifier was found. One 
  12737. possible cause of this error message is that you have defined a keyset with the 
  12738. DEFKEYS keyword, but forgot to name the keyset. See section Key Definitions 
  12739. (DEF and DEFKEYS) for the syntax of the DEFKEYS statement. 
  12740.  
  12741. Another less obvious reason for this error is that you have used a keyword or 
  12742. procedure name in place of an identifier. For example, if you try to declare: 
  12743.  
  12744. UNIVERSAL function_key_text
  12745. Since function_key_text is a predefined universal variable, it is a reserved 
  12746. word, and therefore is not considered an identifier. 
  12747.  
  12748.  
  12749. ΓòÉΓòÉΓòÉ 13.11. Expecting constant expression. ΓòÉΓòÉΓòÉ
  12750.  
  12751. You have begun a constant definition statement by using the CONST keyword, but 
  12752. you have not assigned a constant expression (an expression involving only 
  12753. arithmetic operators, numbers and previously defined constants) to an 
  12754. identifier. Please use the following syntax: 
  12755.  
  12756. CONST
  12757.    max_id=7
  12758.    max_len=max_id * 10
  12759.  
  12760.  
  12761. ΓòÉΓòÉΓòÉ 13.12. Expecting DEFinition primitive. ΓòÉΓòÉΓòÉ
  12762.  
  12763. The compiler is expecting a definition primitive, i.e. one of the DEFxxxx 
  12764. statements, a SET statement, an INCLUDE statement or a CONST statement. 
  12765. Unfortunately, this error message can be triggered at inappropriate times when 
  12766. the compiler is confused by the syntax it has read. This error message often 
  12767. complains about a statement in the middle of a DEF construct. Do not 
  12768. necessarily assume that you need to add a DEF. Each of these cases must be 
  12769. evaluated individually. 
  12770.  
  12771. However, this error message does have value when it reports on a statement that 
  12772. has been issued outside a DEF construct. Remember that you cannot have 
  12773. statements outside a DEFxxxx block. All statements must be contained within a 
  12774. DEFxxxx primitive. Often a statement issued outside a DEF is not reported 
  12775. because since there is no keyword or statement to terminate the DEF, the 
  12776. compiler assumes that the statement belongs to the last DEF. However, there are 
  12777. cases when it will correctly report this error. For example, assume the 
  12778. following statements occur in some file TEST.E: 
  12779.  
  12780. CONST
  12781.    stuff = 1
  12782.  
  12783. sayerror "stuff is " stuff
  12784.  
  12785. defproc test1()
  12786.    temp = 45 * 36
  12787. During compilation of TEST.E, the user would receive an "Expecting DEF" error 
  12788. message with an arrow pointing to the sayerror statement. Since a CONST 
  12789. statement is a DEF primitive, it ends all previous DEFS, and since sayerror is 
  12790. not accepted as part of a CONST construct, an error is reported. 
  12791.  
  12792.  
  12793. ΓòÉΓòÉΓòÉ 13.13. Expecting DO ΓòÉΓòÉΓòÉ
  12794.  
  12795. A WHILE construct has been started, i.e. a WHILE keyword has been found, but 
  12796. the keyword DO is missing from the statement.  Please check the section on 
  12797. Conditional and Loop Statements for the syntax of the WHILE DO statement. 
  12798.  
  12799.  
  12800. ΓòÉΓòÉΓòÉ 13.14. Expecting DO WHILE or DO FOREVER ΓòÉΓòÉΓòÉ
  12801.  
  12802. One of the DO constructs has been started, i.e.  a DO keyword was found, but 
  12803. the rest of the statement's syntax does not fit any of the DO constructs ( DO 
  12804. WHILE, DO FOREVER, and/or DO (FOR) ).  See section Conditional and Loop 
  12805. Statements for the syntax of the DO construct. 
  12806.  
  12807.  
  12808. ΓòÉΓòÉΓòÉ 13.15. Expecting END to DO loop. ΓòÉΓòÉΓòÉ
  12809.  
  12810. One of the DO constructs ( DO-WHILE, DO FOREVER or DO (FOR) ) has been started, 
  12811. but no 'END' or 'ENDDO' statement has been found to end the loop. Please refer 
  12812. to section Conditional and Loop Statements for the syntax of the DO constructs. 
  12813.  
  12814.  
  12815. ΓòÉΓòÉΓòÉ 13.16. Expecting ENDFOR. ΓòÉΓòÉΓòÉ
  12816.  
  12817. A FOR construct has been started, i.e.  a FOR keyword has been found, but no 
  12818. ENDFOR keyword has been found to end the loop. Please check the section on 
  12819. Conditional and Loop Statements for the syntax of the FOR statement. 
  12820.  
  12821.  
  12822. ΓòÉΓòÉΓòÉ 13.17. Expecting ENDIF to terminate IF statement. ΓòÉΓòÉΓòÉ
  12823.  
  12824. An IF keyword has been read, but no ENDIF statement has been found to end the 
  12825. block of statements encased by the IF condition.  See the section on 
  12826. Conditional and Loop Statements for the syntax of the IF statement. 
  12827.  
  12828.  
  12829. ΓòÉΓòÉΓòÉ 13.18. Expecting ENDLOOP to terminate LOOP. ΓòÉΓòÉΓòÉ
  12830.  
  12831. A LOOP construct has been started, but no ENDLOOP statement has been found to 
  12832. end the loop.  See section Conditional and Loop Statements for the syntax of 
  12833. the LOOP construct. 
  12834.  
  12835.  
  12836. ΓòÉΓòÉΓòÉ 13.19. Expecting ENDWHILE to terminate WHILE. ΓòÉΓòÉΓòÉ
  12837.  
  12838. A WHILE construct has been started, but no ENDWHILE statement has been found to 
  12839. end the loop. Please refer to section Conditional and Loop Statements for the 
  12840. syntax of the WHILE construct. 
  12841.  
  12842.  
  12843. ΓòÉΓòÉΓòÉ 13.20. Expecting procedure name. ΓòÉΓòÉΓòÉ
  12844.  
  12845. A procedure definition has been started, i.e. a DEFPROC keyword has been found, 
  12846. but no procedure name appeared after it to identify the procedure. Please see 
  12847. the section on Definition Primitives for the syntax of a DEFPROC statement. 
  12848.  
  12849.  
  12850. ΓòÉΓòÉΓòÉ 13.21. Expecting quoted string. ΓòÉΓòÉΓòÉ
  12851.  
  12852. A statement was found whose syntax dictates that a quoted string must occur at 
  12853. some specific place in the statement, but no such quoted string was found. An 
  12854. example of such a statement is the SAY statement. As shown in section Built-in 
  12855. Statements and Procedures, there must be a quoted string immediately after the 
  12856. SAY keyword. 
  12857.  
  12858.  
  12859. ΓòÉΓòÉΓòÉ 13.22. Expecting THEN. ΓòÉΓòÉΓòÉ
  12860.  
  12861. An IF construct has been started, i.e.  an IF keyword was found, but no THEN 
  12862. keyword can been found.  See section Conditional and Loop Statements for the 
  12863. syntax of the IF-THEN-ELSE statement. 
  12864.  
  12865.  
  12866. ΓòÉΓòÉΓòÉ 13.23. Expecting TO. ΓòÉΓòÉΓòÉ
  12867.  
  12868. A FOR construct has been started, i.e. a FOR keyword has been found, but the 
  12869. keyword TO is missing from the statement.  Please check the section Conditional 
  12870. and Loop Statements for the syntax of the FOR statement. 
  12871.  
  12872.  
  12873. ΓòÉΓòÉΓòÉ 13.24. Expecting VALUE. ΓòÉΓòÉΓòÉ
  12874.  
  12875. A PARSE statement has been started, i.e. the keyword PARSE was found, but 
  12876. neither a VALUE nor an ARG keyword can been found.  See the User's Manual 
  12877. section The Parse Statement for the syntax of the PARSE statement. 
  12878.  
  12879.  
  12880. ΓòÉΓòÉΓòÉ 13.25. Expecting variable name. ΓòÉΓòÉΓòÉ
  12881.  
  12882. A statement was found whose syntax dictates that a variable name must occur at 
  12883. some specific place in the statement, but no such variable name was found. An 
  12884. example of such a statement is the FOR statement. As shown in the section on 
  12885. Conditional and Loop Statements, there must be a variable name (the loop 
  12886. variable to be incremented) immediately after the FOR keyword. 
  12887.  
  12888.  
  12889. ΓòÉΓòÉΓòÉ 13.26. Expecting WITH. ΓòÉΓòÉΓòÉ
  12890.  
  12891. A PARSE-VALUE statement has been started, i.e.  the keywords PARSE and VALUE 
  12892. were found, but a WITH keyword cannot be found.  See the section on The Parse 
  12893. Statement for the syntax of the PARSE statement. 
  12894.  
  12895.  
  12896. ΓòÉΓòÉΓòÉ 13.27. Expression not assignment compatible. ΓòÉΓòÉΓòÉ
  12897.  
  12898. The compiler has detected an assignment in which the expression on the right 
  12899. side of the assignment operator can not be assigned to the expression or 
  12900. identifier on the left side.  The most common cause of this is that you have 
  12901. tried to assign a value to something other than a variable, i.e. a constant or 
  12902. procedure. 
  12903.  
  12904.  
  12905. ΓòÉΓòÉΓòÉ 13.28. Expression too complex. ΓòÉΓòÉΓòÉ
  12906.  
  12907. An expression is any combination of identifiers (variables, constants, and/or 
  12908. procedures), numbers and operators that fit the syntax of a language. A complex 
  12909. expression is one that contains expressions within itself. For example, the 
  12910. following is an expression: 
  12911.  
  12912. test_var + 6.
  12913. An example of a complex expression would be: 
  12914.  
  12915. ( (test_var + 6) * 8).
  12916. Each of the innermost expressions must be evaluated before the entire 
  12917. expression can be assigned a value.  The specified expression in your input 
  12918. file is too complicated, i.e.  has too many expressions within itself, for the 
  12919. compiler to evaluate it.  Please break the expression into several less complex 
  12920. expressions.  For example, let us assume that the following expression was too 
  12921. complex: 
  12922.  
  12923. call proc_test( k=( (a*b)+ 8 ) ),
  12924. You could simplify the call to proc_test by assigning some of the inner 
  12925. expressions to temporary variables.  One solution would be: 
  12926.  
  12927. temp1 = a*b
  12928. k = temp1 + 8
  12929. call proc_test(k)
  12930. Note: The above expression is a simple example. It is not too complex for the 
  12931. compiler. ET allows for 40 expressions within an expression. 
  12932.  
  12933.  
  12934. ΓòÉΓòÉΓòÉ 13.29. Extraneous parameters. ΓòÉΓòÉΓòÉ
  12935.  
  12936. You have specified too many parameters in the command dialog box.  The syntax 
  12937. is:      ET [options] inputfile[.e] [outputfile[.ex]]  Remember that any 
  12938. options MUST PRECEDE the input and output filenames! 
  12939.  
  12940.  
  12941. ΓòÉΓòÉΓòÉ 13.30. Identifier already defined as same or different type. ΓòÉΓòÉΓòÉ
  12942.  
  12943. You are trying to use an identifier to name a variable, constant or procedure 
  12944. uniquely, yet the identifier has already been used in the same scope for 
  12945. another purpose. Check over your program and rename the appropriate 
  12946. identifiers. 
  12947.  
  12948.  
  12949. ΓòÉΓòÉΓòÉ 13.31. Identifier too long. ΓòÉΓòÉΓòÉ
  12950.  
  12951. The number of characters in the name of the specified variable, constant, 
  12952. procedure, etc. exceeds the maximum allowance of 255 characters. Please rename 
  12953. it with fewer letters and/or numbers. 
  12954.  
  12955.  
  12956. ΓòÉΓòÉΓòÉ 13.32. Illegal character. ΓòÉΓòÉΓòÉ
  12957.  
  12958. This character does not make sense or is not allowed in the E language. One 
  12959. example of E code which would yield this error message is if a unary minus or 
  12960. plus operator is used preceding an alphabetic character rather than a digit. 
  12961. For example, 
  12962.  
  12963. temp = +c
  12964. These unary operators make sense only with numeric operands. 
  12965.  
  12966.  
  12967. ΓòÉΓòÉΓòÉ 13.33. Illegal operator. ΓòÉΓòÉΓòÉ
  12968.  
  12969. An operator is some function to be performed on its operands. Operands are 
  12970. identifiers or constant values that are acted upon by operators.  Examples of 
  12971. operators are: '+' (addition), '=' (assignment), 'NOT' (logical negation), and 
  12972. '<=' (less than or equal). The operator you have specified does not exist in 
  12973. the E language. Please check the Operators section for a complete list of 
  12974. operators. 
  12975.  
  12976.  
  12977. ΓòÉΓòÉΓòÉ 13.34. INCLUDES nested too deep. ΓòÉΓòÉΓòÉ
  12978.  
  12979. A nested INCLUDE statement means that a file, for example FILE1.E, contains a 
  12980. statement:           include 'file2.e'  and that file2.e also contains an 
  12981. INCLUDE statement, which includes a third file. ET only allows for 5 levels of 
  12982. nested include files. You have exceeded this limit. Please reorganize your 
  12983. files. 
  12984.  
  12985.  
  12986. ΓòÉΓòÉΓòÉ 13.35. Internal error in POPS. ΓòÉΓòÉΓòÉ
  12987.  
  12988. This error is internal to the workings of the ET compiler. It has nothing to do 
  12989. with user input. Please send a note to the userid EOS2 at YORKTOWN with 
  12990. information regarding the error. 
  12991.  
  12992.  
  12993. ΓòÉΓòÉΓòÉ 13.36. Invalid argument. ΓòÉΓòÉΓòÉ
  12994.  
  12995. The argument specified in the procedure call is incorrect. Specifically, the 
  12996. string argument in the SAYERROR() procedure call does not match any of the 
  12997. strings associated with error messages known to the compiler. Read the 
  12998. description of the usage of the SAYERROR() procedure in section Built-in 
  12999. Statements and Procedures for more information. 
  13000.  
  13001.  
  13002. ΓòÉΓòÉΓòÉ 13.37. Invalid color. ΓòÉΓòÉΓòÉ
  13003.  
  13004. You are trying to redefine the colors of the E editor; however the syntax of 
  13005. your statement is incorrect.  Possible explanations of this are that: (1) you 
  13006. have not used an identifier to name the constant, (2) you have not used a valid 
  13007. color value name, or (3) you have not separated each assignment with either a 
  13008. semi-colon or a new line. An example of the syntax is:    /* color example */ 
  13009. TEXTCOLOR   = BLUE  For more information on usage, see section Changing the 
  13010. Default Configuration in The EPM User's Guide. For a list of valid color value 
  13011. names, see the top of the COLORS.E file which contains the values of the 
  13012. defaults. 
  13013.  
  13014.  
  13015. ΓòÉΓòÉΓòÉ 13.38. Invalid cursor setting. ΓòÉΓòÉΓòÉ
  13016.  
  13017. You are trying to set the default cursor sizes, but the values you have given 
  13018. in the set cursors statement are not valid. Valid values are 1 through 15. 
  13019.  
  13020.  
  13021. ΓòÉΓòÉΓòÉ 13.39. Invalid expression. ΓòÉΓòÉΓòÉ
  13022.  
  13023. This expression is not a valid expression in the E language. Please refer to E 
  13024. Language Syntax for a list of all valid expressions. 
  13025.  
  13026.  
  13027. ΓòÉΓòÉΓòÉ 13.40. Invalid field name. ΓòÉΓòÉΓòÉ
  13028.  
  13029. You have attempted to manipulate a field in the fileid structure; however the 
  13030. field you have named does not exist. Check section Fileid Structure for a list 
  13031. of all field names. 
  13032.  
  13033.  
  13034. ΓòÉΓòÉΓòÉ 13.41. Invalid key name. ΓòÉΓòÉΓòÉ
  13035.  
  13036. A KEY keyword has been found, but no valid keyname followed the keyword. There 
  13037. are a limited number of keys on the keyboard that can be redefined. For a 
  13038. complete list of those keys, see E Language Syntax. 
  13039.  
  13040.  
  13041. ΓòÉΓòÉΓòÉ 13.42. Invalid margin setting. ΓòÉΓòÉΓòÉ
  13042.  
  13043. You are trying to reset the margins for the E editor, but the column values of 
  13044. your desired margin settings are invalid. Possible causes of this error are 
  13045. that you have tried: (1) to set a margin past E's maximum margin column (254), 
  13046. (2) to set a margin in a zero or negative column, or (3) to set the left margin 
  13047. in a column greater than the right margin. Please refer to The EPM User's Guide 
  13048. for examples of the correct syntax. 
  13049.  
  13050.  
  13051. ΓòÉΓòÉΓòÉ 13.43. Invalid number of parameters. ΓòÉΓòÉΓòÉ
  13052.  
  13053. You have called a procedure with fewer parameters than it is defined to have. 
  13054. For example, in the section Built-in Statements and Procedures, look at the 
  13055. description of the procedure SUBSTR(). SUBSTR() is defined to have two, three 
  13056. or four parameters, but it requires AT LEAST two parameters to perform its 
  13057. function.  If the user invokes the function with only one argument, for example 
  13058. SUBSTR('abc'), an error will occur. 
  13059.  
  13060.  
  13061. ΓòÉΓòÉΓòÉ 13.44. Invalid numeric. ΓòÉΓòÉΓòÉ
  13062.  
  13063. You have attempted to perform some arithmetic function on variables that are 
  13064. not numeric; or you have mixed other characters in with some digits. For 
  13065. example, 35.x or 3temp_var are not valid expressions. The compiler expects 
  13066. identifiers to BEGIN WITH AN ALPHABETIC CHARACTER, and expects numbers to 
  13067. consist solely of digits and certain special characters (for example, the 
  13068. decimal point "."). 
  13069.  
  13070.  
  13071. ΓòÉΓòÉΓòÉ 13.45. Invalid option. ΓòÉΓòÉΓòÉ
  13072.  
  13073. You have specified an option in the command dialog box which does not exist. 
  13074. Check The EPM User's Guide or section Command Summary for all possible command 
  13075. dialog box options. 
  13076.  
  13077.  
  13078. ΓòÉΓòÉΓòÉ 13.46. Invalid set name. ΓòÉΓòÉΓòÉ
  13079.  
  13080. You are trying to set a configurable option for the E editor, but the option 
  13081. you have named in the SET statement does not exist. Please check The EPM User's 
  13082. Guide for a complete list of options. 
  13083.  
  13084.  
  13085. ΓòÉΓòÉΓòÉ 13.47. Invalid tab setting. ΓòÉΓòÉΓòÉ
  13086.  
  13087. You are trying to reset the tabs for the E editor, but the column values of 
  13088. your desired tab settings are invalid. Possible causes of this error are that: 
  13089. (1) you have tried to set a tab past E's maximum column (255), (2) you have 
  13090. tried to set a tab in a negative column, or (3) you have not typed the tab 
  13091. settings in ascending order. Tab settings CANNOT be listed in a mixed order, 
  13092. for example:           tabs 5 10 20 15 30 25 ...  They must be written in 
  13093. ascending order. In the above example, the statement must be rewritten as 
  13094. follows:           tabs 5 10 15 20 25 30 ... 
  13095.  
  13096.  
  13097. ΓòÉΓòÉΓòÉ 13.48. ITERATE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  13098.  
  13099. An ITERATE statement has been issued outside one of the loop constructs (WHILE, 
  13100. LOOP, or DO).  Since the ITERATE statement only makes sense in combination with 
  13101. a loop, this is an error. See section Conditional and Loop Statements for the 
  13102. rules governing and syntax of the ITERATE statement. 
  13103.  
  13104.  
  13105. ΓòÉΓòÉΓòÉ 13.49. Keyset not defined. ΓòÉΓòÉΓòÉ
  13106.  
  13107. You have issued a KEYS statement to change the keyset to a predefined keyset; 
  13108. however the named keyset has not been defined in the current scope. In order to 
  13109. use a KEYS keyset_name statement, you must have issued a DEFKEYS keyset_name 
  13110. statement to define the named keyset and then issued a series of DEF statements 
  13111. to define the new function of the desired keys.  A sample keyset definition can 
  13112. be found in section Key Definitions (DEF and DEFKEYS). 
  13113.  
  13114.  
  13115. ΓòÉΓòÉΓòÉ 13.50. LEAVE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  13116.  
  13117. A LEAVE statement has been issued outside one of the loop constructs (WHILE, 
  13118. LOOP, or DO).  Since the LEAVE statement only makes sense in combination with a 
  13119. loop, this is an error.  See section on Conditional and Loop Statements for the 
  13120. rules governing and syntax of the LEAVE statement. 
  13121.  
  13122.  
  13123. ΓòÉΓòÉΓòÉ 13.51. Line too long. ΓòÉΓòÉΓòÉ
  13124.  
  13125. The number of characters in this line exceeds the maximum. The maximum line 
  13126. length is 255 characters. Please break-up the line using the technique 
  13127. discussed in section Line Continuations. 
  13128.  
  13129.  
  13130. ΓòÉΓòÉΓòÉ 13.52. More than max number of global variables. ΓòÉΓòÉΓòÉ
  13131.  
  13132. You have defined more global variables than the compiler allows. The maximum 
  13133. number of global variables is 8200.  Note Any variable preceded by the 
  13134. UNIVERSAL keyword is considered global, i.e. any procedure can access it. 
  13135.  
  13136.  
  13137. ΓòÉΓòÉΓòÉ 13.53. More than max number of local variables. ΓòÉΓòÉΓòÉ
  13138.  
  13139. Your procedure has been defined with more than the compiler's maximum number of 
  13140. allowable local variables, i.e. variables defined within the procedure.  The 
  13141. maximum number of locals is 1038. 
  13142.  
  13143.  
  13144. ΓòÉΓòÉΓòÉ 13.54. Not enough core. ΓòÉΓòÉΓòÉ
  13145.  
  13146. Your computer does not have enough core memory (primary memory not disk space) 
  13147. to compile the specified input file and write compiled code to an output file. 
  13148. Typically, 320K of memory is required; however if you have added a great amount 
  13149. of code to the e.e file, more memory may be necessary. 
  13150.  
  13151.  
  13152. ΓòÉΓòÉΓòÉ 13.55. Number out of range or expecting number. ΓòÉΓòÉΓòÉ
  13153.  
  13154. This error could occur for a few different reasons. The first possible cause of 
  13155. the error is incorrect syntax or semantics in a parse statement. If a '+' or 
  13156. '-' was encountered in the template portion of a PARSE statement, a number is 
  13157. expected to follow it. Either a number did not follow one of these operators or 
  13158. the number that did follow exceeded 255. Remember that the numbers in the 
  13159. template represent column specifications and therefore cannot exceed the 
  13160. maximum column. Please see section The Parse Statement for the exact syntax of 
  13161. the parse statement. 
  13162.  
  13163. Another possible cause of this error is that an arithmetic operator symbol was 
  13164. found in an expression, and yet all of the operands were either not numeric or 
  13165. exceeded the compiler's maximum number of 32,767. 
  13166.  
  13167.  
  13168. ΓòÉΓòÉΓòÉ 13.56. Number too large. ΓòÉΓòÉΓòÉ
  13169.  
  13170. This error occurs only when the compiler is translating ASCII codes preceded by 
  13171. the '\' operator. Values following such a '\' cannot exceed 255. See section 
  13172. String Expressions for a more detailed explanation of this use of the backslash 
  13173. character. 
  13174.  
  13175.  
  13176. ΓòÉΓòÉΓòÉ 13.57. Numeric overflow. ΓòÉΓòÉΓòÉ
  13177.  
  13178. You have attempted to perform some arithmetic function where the result has an 
  13179. exponent greater than 999999999. 
  13180.  
  13181.  
  13182. ΓòÉΓòÉΓòÉ 13.58. Out of symbol table space. ΓòÉΓòÉΓòÉ
  13183.  
  13184. The compiler allocates a certain amount of memory space for each variable. The 
  13185. space is needed to store necessary information relevant to that variable. 
  13186. There is not enough primary memory (not disk space) on your computer to allow 
  13187. any more variables to be used. 
  13188.  
  13189.  
  13190. ΓòÉΓòÉΓòÉ 13.59. Procedure not defined. ΓòÉΓòÉΓòÉ
  13191.  
  13192. You have called or made reference to a procedure which was never defined. 
  13193. Please define the procedure or delete the call to it.  Note: the compiler will 
  13194. not tell you where the call to the undefined procedure occurred or whether 
  13195. there are many such occurrences. 
  13196.  
  13197.  
  13198. ΓòÉΓòÉΓòÉ 13.60. String not terminated. ΓòÉΓòÉΓòÉ
  13199.  
  13200. The specified string was not enclosed with quote marks. The final quote was 
  13201. omitted. 
  13202.  
  13203.  
  13204. ΓòÉΓòÉΓòÉ 13.61. Too many arguments. ΓòÉΓòÉΓòÉ
  13205.  
  13206. You have defined a procedure or function with more than the compiler's maximum 
  13207. number of allowable arguments. The maximum number of arguments is 8. 
  13208.  
  13209.  
  13210. ΓòÉΓòÉΓòÉ 13.62. Unable to open input file. ΓòÉΓòÉΓòÉ
  13211.  
  13212. The compiler could not open the file which you listed in the command dialog box 
  13213. as the input file.  This is probably due to the fact that no such file exists. 
  13214. Check your spelling of the filename and make sure the file is in the current 
  13215. directory. 
  13216.  
  13217.  
  13218. ΓòÉΓòÉΓòÉ 13.63. Unable to open output file. ΓòÉΓòÉΓòÉ
  13219.  
  13220. The compiler cannot create the file you named in the command dialog box as the 
  13221. output file. This probably occurred because you gave a nonexistent path to the 
  13222. file. Check the spelling and accuracy of the pathname. (The default pathname is 
  13223. the current directory.) 
  13224.  
  13225.  
  13226. ΓòÉΓòÉΓòÉ 13.64. Unable to read input file. ΓòÉΓòÉΓòÉ
  13227.  
  13228. The compiler was unable to read from the input file you specified in the 
  13229. command dialog box. This maybe due to the fact that the file is locked or 
  13230. damaged. Please check the file. 
  13231.  
  13232.  
  13233. ΓòÉΓòÉΓòÉ 13.65. Unable to write output file. ΓòÉΓòÉΓòÉ
  13234.  
  13235. The compiler cannot write to the file you named in the command line as the 
  13236. output file.  This error could occur because the file is read-only or because 
  13237. no space is left on the disk. 
  13238.  
  13239.  
  13240. ΓòÉΓòÉΓòÉ 13.66. Variable not initialized. ΓòÉΓòÉΓòÉ
  13241.  
  13242. You have used a variable which was never initialized.  The variable has no 
  13243. value; therefore the expression containing it cannot be evaluated. 
  13244.  
  13245. Another common cause for this error is when a command has been issued within an 
  13246. E statement, but the command has not been quoted. Please read the section Using 
  13247. EPM Commands in E Statements for information on how to use commands in an E 
  13248. program. 
  13249.  
  13250.  
  13251. ΓòÉΓòÉΓòÉ 14. Ordinal Values of Functions Accessed via DOSCALLS.DLL ΓòÉΓòÉΓòÉ
  13252.  
  13253. This list shows the mapping between the DOS system function names and their 
  13254. ordinal values.  In order to access one of these system functions in OS/2, you 
  13255. must make a call to the function DYNALINK(), and include the function's ordinal 
  13256. value in the parameter list.  For more information, see the DYNALINK() entry in 
  13257. section Built-in Statements and Procedures. 
  13258.  
  13259. Function Name                   Ordinal Value
  13260. -------------                   -------------
  13261. DBGETKVAR                           109
  13262. DBGETOWNER                          117
  13263. DBMEMFREE                           116
  13264. DBMEMLOCK                           112
  13265. DBMEMREALLOC                        115
  13266. DBMEMUNLOCK                         113
  13267. DBPHYSINFO                          118
  13268. DBSEGALLOC                          114
  13269. DOSALLOCHUGE                         40
  13270. DOSALLOCSEG                          34
  13271. DOSALLOCSHRSEG                       35
  13272. DOSBEEP                              50
  13273. DOSBUFRESET                          56
  13274. DOSCALLBACK                         157
  13275. DOSCHDIR                             57
  13276. DOSCHGFILEPTR                        58
  13277. DOSCLIACCESS                         51
  13278. DOSCLOSE                             59
  13279. DOSCLOSESEM                          23
  13280. DOSCREATECSALIAS                     43
  13281. DOSCREATESEM                         24
  13282. DOSCWAIT                              2
  13283. DOSDELETE                            60
  13284. DOSDEVCONFIG                         52
  13285. DOSDEVIOCTL                          53
  13286. DOSDEVIOCTL2                         99
  13287. DOSDUPHANDLE                         61
  13288. DOSENTERCRITSEC                       3
  13289. DOSENUMATTRIBUTE                    204
  13290. DOSERROR                            120
  13291. DOSEXIT                               5
  13292. DOSEXITCRITSEC                        6
  13293. DOSEXITLIST                           7
  13294. DOSFILELOCKS                         62
  13295. DOSFINDCLOSE                         63
  13296. DOSFINDFIRST                         64
  13297. DOSFINDNEXT                          65
  13298.  
  13299. DOSFLAGPROCESS                       15
  13300. DOSFREEMODULE                        46
  13301. DOSFREESEG                           39
  13302. DOSGETCP                            130
  13303. DOSGETDATETIME                       33
  13304. DOSGETENV                            91
  13305. DOSGETHUGESHIFT                      41
  13306. DOSGETINFOSEG                         8
  13307. DOSGETMACHINEMODE                    49
  13308. DOSGETMODHANDLE                      47
  13309. DOSGETMODNAME                        48
  13310. DOSGETPID                            94
  13311. DOSGETPROCADDR                       45
  13312. DOSGETPRTY                            9
  13313. DOSGETSEG                           121
  13314. DOSGETSHRSEG                         36
  13315. DOSGETSTDA                          119
  13316. DOSGETVERSION                        92
  13317. DOSGIVESEG                           37
  13318. DOSGLOBALSEG                        132
  13319. DOSHOLDSIGNAL                        13
  13320. DOSHUGEINCR                         136
  13321. DOSHUGESHIFT                        135
  13322. DOSICANONICALIZE                    100
  13323. DOSICREATETHREAD                      1
  13324. DOSIEXECPGM                           4
  13325. DOSIRAMSEMWAKE                      125
  13326. DOSIREAD                             79
  13327. DOSISEMREQUEST                       18
  13328. DOSISEMWAIT                          21
  13329. DOSISETCP                           131
  13330. DOSISYSSEMCLEAR                      17
  13331. DOSISYSSEMSET                        19
  13332. DOSIWRITE                            87
  13333. DOSKILLPROCESS                       10
  13334. DOSLIBINIT                           96
  13335. DOSLOADMODULE                        44
  13336. DOSLOCKSEG                          122
  13337. DOSMAKEPIPE                          16
  13338. DOSMEMAVAIL                         127
  13339. DOSMKDIR                             66
  13340. DOSMOVE                              67
  13341. DOSMUXSEMWAIT                        22
  13342. DOSNEWSIZE                           68
  13343. DOSOPEN                              70
  13344. DOSOPEN2                             95
  13345. DOSOPENSEM                           25
  13346. DOSPHYSICALDISK                     129
  13347. DOSQPATHINFO                         98
  13348. DOSSETPATHINFO                      104
  13349. DOSPOKETESTDAEMON                   104
  13350. DOSPORTACCESS                        69
  13351. DOSPROFILE                          133
  13352. DOSPTRACE                            12
  13353. DOSQCURDIR                           71
  13354. DOSQCURDISK                          72
  13355. DOSQFHANDSTATE                       73
  13356. DOSQFILEINFO                         74
  13357. DOSQFILEMODE                         75
  13358. DOSQFSINFO                           76
  13359. DOSQHANDTYPE                         77
  13360. DOSQPROCSTATUS                      154
  13361. DOSQTRACEINFO                        93
  13362. DOSQVERIFY                           78
  13363. DOSREADPHYS                         103
  13364. DOSREALLOCHUGE                       42
  13365. DOSREALLOCSEG                        38
  13366. DOSRESUMETHREAD                      26
  13367. DOSRMDIR                             80
  13368. DOSSELECTDISK                        81
  13369. DOSSEMSETWAIT                        20
  13370. DOSSENDSIGNAL                       134
  13371. DOSSETCP                            153
  13372. DOSSETDATETIME                       28
  13373. DOSSETFGND                          101
  13374. DOSSETFHANDSTATE                     82
  13375. DOSSETFILEINFO                       83
  13376. DOSSETFILEMODE                       84
  13377. DOSSETFSINFO                         97
  13378. DOSSETINFOSEG                       128
  13379. DOSSETMAXFH                          85
  13380. DOSSETPRTY                           11
  13381. DOSSETSIGHANDLER                     14
  13382. DOSSETVEC                            89
  13383. DOSSETVERIFY                         86
  13384. DOSSGSWITCH                          54
  13385. DOSSGSWITCHME                        55
  13386. DOSSGSWITCHPROC                     124
  13387. DOSSICG                              95
  13388. DOSSIZESEG                          126
  13389. DOSSLEEP                             32
  13390. DOSSUSPENDTHREAD                     27
  13391. DOSSWAPTASKINIT                     102
  13392. DOSSYSTEMSERVICE                     88
  13393. DOSSYSTRACE                          90
  13394. DOSTIMERASYNC                        29
  13395. DOSTIMERSTART                        30
  13396. DOSTIMERSTOP                         31
  13397. DOSUNLOCKSEG                        123
  13398. GETADDR                             111
  13399. GETHEADERS                          108
  13400. GETSELADDR                          110
  13401. PANICWRITE                          105
  13402. STRUCHECK                           106
  13403. STRURESUPDATE                       107
  13404. UNUSEDA                              98
  13405. UNUSEDB                              99
  13406.  
  13407. The following Operating System entry points are defined in the library 
  13408. DOSCALL1. In this case, the procedures must be called by name rather than 
  13409. ordinal value. For an example of this usage, see the explanation of the 
  13410. DYNALINK() function. 
  13411.  
  13412. DOSREAD
  13413. DOSWRITE
  13414. DOSERRCLASS
  13415. DOSSEMREQUEST
  13416. DOSSEMCLEAR
  13417. DOSSEMWAIT
  13418. DOSSEMSET
  13419. DOSEXECPGM
  13420. DOSCREATETHREAD
  13421. DOSSUBSET
  13422. DOSSUBALLOC
  13423. DOSSUBFREE
  13424. DOSREADASYNC
  13425. DOSWRITEASYNC
  13426. DOSSEARCHPATH
  13427. DOSSCANENV
  13428.  
  13429.  
  13430. ΓòÉΓòÉΓòÉ 15. Advanced Compiler Features ΓòÉΓòÉΓòÉ
  13431.  
  13432. Advanced compiler features. 
  13433.  
  13434.  
  13435. ΓòÉΓòÉΓòÉ 15.1. Compile time variables ΓòÉΓòÉΓòÉ
  13436.  
  13437. Compile time variables. 
  13438.  
  13439.  
  13440. ΓòÉΓòÉΓòÉ 15.1.1. Definition ΓòÉΓòÉΓòÉ
  13441.  
  13442. E provides certain language extensions and configuration options by means of a 
  13443. single pass symbol table access facility. This means that the macro programmer 
  13444. can assign a compile time variable and later test the value of that variable. 
  13445.  
  13446.  
  13447. ΓòÉΓòÉΓòÉ 15.1.2. Advantages ΓòÉΓòÉΓòÉ
  13448.  
  13449. The usage of compile time variables can aid in the portability of the macro 
  13450. language. This means that one set of macros can be used in DOS, OS/2, and the 
  13451. Presentation Manager environments. For examples of this see the current 
  13452. E-macros. By testing the version, the compiler can know which code to include. 
  13453. This means later versions can make use of the newest features while still 
  13454. maintain compatibility with older versions of the E family of editors. 
  13455.  
  13456. The usage of compile time variables saves disk space.  The reason for this is 
  13457. that universal variables must be actually saved on the disk in the resultant 
  13458. .EX file.  Compile-time variables are saved in far memory while the translation 
  13459. process executes and are freed when the translation process ends. 
  13460.  
  13461.  
  13462. ΓòÉΓòÉΓòÉ 15.1.3. Compile-time variable assignment ΓòÉΓòÉΓòÉ
  13463.  
  13464. We allow a compile-time variable assignment by means of the define statement in 
  13465. the macro language. An example of such as assignment is the following: 
  13466.  
  13467. define compile_variable = 'this is a compile-time variable'
  13468.  
  13469. In addition, the C preprocessor #define is supported, in order to allow sharing 
  13470. *.H files between C code and E macro code. 
  13471.  
  13472. #define MB_OK         0000
  13473. #define MB_OKCANCEL   0001
  13474.  
  13475. Note:  Starting with EPM 6.03 in May, 1995, the letter L may immediately follow 
  13476.        a numeric constant on a #define statement, and will be ignored.  This is 
  13477.        to allow sharing *.H files containing definitions such as: 
  13478.  
  13479.               #define WS_VISIBLE    0x80000000L
  13480.               #define WS_DISABLED   0x40000000L
  13481.  
  13482.  
  13483. ΓòÉΓòÉΓòÉ 15.1.4. Compile-time variable and conditional compilation ΓòÉΓòÉΓòÉ
  13484.  
  13485. Compile-time variables can be used in concert with the translator's compile if 
  13486. statements to provide a powerful conditional compilation facility.  An example 
  13487. of the usage of compile if is the following: 
  13488.  
  13489. compile if compile_variable = 'this is a compile-time variable'
  13490.   sayerror 'compile_variable exists'
  13491. compile else
  13492.   sayerror 'compile_variable does not exists'
  13493. compile endif
  13494.  
  13495.  
  13496. ΓòÉΓòÉΓòÉ 15.1.5. Compile `defined' test ΓòÉΓòÉΓòÉ
  13497.  
  13498. In addition to the straightforward test of a compile-time variable value,  we 
  13499. can also test whether a variable is defined or not. This is useful in cases 
  13500. where the macro programmer does not wish to expressly assign a value to a 
  13501. compile-time variable, but simply would like to know if the variable has any 
  13502. value.  For example: 
  13503.  
  13504. compile if defined(compile_variable)
  13505.   sayerror 'compile_variable is defined'
  13506. compile else
  13507.   sayerror 'compile_variable is not defined'
  13508. compile endif
  13509.  
  13510.  
  13511. ΓòÉΓòÉΓòÉ 15.1.6. Text replacement ΓòÉΓòÉΓòÉ
  13512.  
  13513. A powerful text replacement function is part of the translator language. This 
  13514. text replacement option allows one to literally change the text upon which the 
  13515. translator is operating during the translation process. The text replacement 
  13516. option is initiated when the translator encounters a '$' (dollar sign). When 
  13517. the text replacement character is encountered the translator  places the value 
  13518. of the compile-time variable that follows the '$' into a text buffer and begins 
  13519. to use the that buffer as the input buffer to the translator. When the buffer 
  13520. is empty, we switch back to the previous translation buffer. For example: 
  13521.  
  13522. define sayinformation = 'sayerror'
  13523. $sayinformation 'this is information'
  13524.  
  13525. In the preceding example,  we have defined our own language extension. The 
  13526. example is equivalent to the standard E code of: 
  13527.  
  13528. sayerror 'this is information'
  13529.  
  13530.  
  13531. ΓòÉΓòÉΓòÉ 16. Toolbar ΓòÉΓòÉΓòÉ
  13532.  
  13533. EPM version 6 introduces a user-configurable Toolbar, using the UCMENUS package 
  13534. (which EPM uses as ETKUCMS.DLL). The built-in toolbar is defined in the macros. 
  13535. The user can configure the toolbar to execute any of the available toolbar 
  13536. actions, which are defined in the *.ex files listed in the ACTIONS.LST file, or 
  13537. any other EPM or OS/2 command by selecting either * or ExecuteProgram as the 
  13538. action to be executed.  * executes its parameter as though it were entered on 
  13539. the EPM command line, while for ExecuteProgram, the parameters are executed 
  13540. directly by the UCMENUS code as an external program. 
  13541.  
  13542. See the following sections for additional information. 
  13543.  
  13544. o Building a toolbar from the macros 
  13545.  
  13546. o The ACTIONS.LST file 
  13547.  
  13548. o Creating a toolbar actions file 
  13549.  
  13550.  
  13551. ΓòÉΓòÉΓòÉ 16.1. Building a toolbar from the macros ΓòÉΓòÉΓòÉ
  13552.  
  13553. The default toolbar is built in STDCTRL.E, in the loaddefaulttoolbar command. A 
  13554. toolbar is another type of menu, and as such is built using the buildsubmenu 
  13555. opcode. The first paramater to buildsubmenu consists of a delimiter character, 
  13556. the button text, the delimiter, the button bitmap (the name of a *.BMP file, or 
  13557. a number corresponding to a built-in resource ID), the delimiter, the command 
  13558. to be executed, the delimiter, the command's parameters (if any), the 
  13559. delimiter, and the name of the *.ex file in which the command is defined. 
  13560.  
  13561.  
  13562. ΓòÉΓòÉΓòÉ 16.2. The ACTIONS.LST file ΓòÉΓòÉΓòÉ
  13563.  
  13564. The ACTIONS.LST file contains a list of actions files. When the user selects 
  13565. Edit item from the toolbar's pop-up menu, the LOAD_ACTIONS command (defined in 
  13566. STDCTRL.E) is executed.  The first time it is executed, the ACTIONS.LST file is 
  13567. searched for (using findfile with the 'D' option) and loaded.  Each line in the 
  13568. file contains the name of an actions file. For each line, the corresponding 
  13569. action_name.ex file is linked, the action_name_actionlist command is executed 
  13570. to obtain a list of actions defined in that file, and the .ex file is unlinked. 
  13571. The resulting list of available actions is passed to the UCMENUS code, which 
  13572. uses it to fill the Function listbox on the Action page of the configuration 
  13573. dialog. 
  13574.  
  13575.  
  13576. ΓòÉΓòÉΓòÉ 16.3. Creating a toolbar actions file ΓòÉΓòÉΓòÉ
  13577.  
  13578. A toolbar actions file is simply a filename.ex file which contains a 
  13579. filename_actionlist command.  When a list of actions is generated, the 
  13580. filename_actionlist command is executed, and it adds one line for each action 
  13581. it defines to the file whose fileid is contained in the universal variable 
  13582. ActionsList_FileID.  Each line added consists of a delimiter character, the 
  13583. name of the action, the delimiter, a string to go in the Function description 
  13584. section of the Action page of the Toolbar's configuration dialog, the 
  13585. delimiter, and finally the name of the .ex file in which the action command is 
  13586. defined. 
  13587.  
  13588. An action command is a normal DEFC, but it must expect to be invoked by way of 
  13589. the toolbar.  This is because the action command is passed a parameter 
  13590. consisting of a letter, possibly followed by a space and then the parameters 
  13591. entered in the Parameters field of the Action page of the Toolbar's 
  13592. configuration dialog.  The possible values for the letter are: 
  13593.  
  13594. I   Initialized - the toolbar button has been depressed.  A prompt may be 
  13595.     given, indicating what action will be performed if this toolbar item is 
  13596.     selected, but no other action should be performed. 
  13597.  
  13598. S   Selected - the toolbar button has been selected.  The action associated 
  13599.     with this button should be performed. 
  13600.  
  13601. E   Ended - either the initialization or selection has ended.  Nothing is 
  13602.     normally done when this parameter is passed. 
  13603.  
  13604. H   The user has asked for help, by pressing F1 while the button associated 
  13605.     with this action was initialized.  Some of the supplied toolbar actions 
  13606.     invoke the OS/2 Help manager and bring up a panel in the standard EPM.HLP 
  13607.     (e.g., most of the ones in SAMPACTN.E); some provide their own help file, 
  13608.     which they dynamically add (e.g., TREE.E), and some just pop up a message 
  13609.     box containing their prompt string (e.g., JOT.E). 
  13610.  
  13611.  
  13612. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13613.  
  13614. An alternative approach might involve having a handle to an attribute record. 
  13615. In such an approach one can still refer to an attribute record by the same 
  13616. handle even if the attribute record changes location.  On the other hand, 
  13617. implementation of this approach is often inefficient because it often includes 
  13618. generation of new handles when text containing attributes is copied so that a 
  13619. handle only refers to a single attribute record.
  13620.  
  13621.  
  13622. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13623.  
  13624. Note in this diagram, the attribute records are delimited by brackets. 
  13625. Throughout this document I will only use brackets to delimit attribute records. 
  13626. To avoid confusion, I will refrain from using brackets as a textual character 
  13627. in my examples.  The use of capital letters here between brackets is only used 
  13628. in this example as a means of referring to individual attribute records.  In 
  13629. other examples in this document, I might actually put words or numbers between 
  13630. the brackets if I want to denote some characteristic of an attribute record.
  13631.  
  13632.  
  13633. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13634.  
  13635. The last character of line in the example is the "h". There is an attribute 
  13636. record located immediately to the right of that character.  Because it is at 
  13637. the end of the line there is no character to the right of it.  This is 
  13638. acceptable because there is a virtual character to the right of it.  (In the 
  13639. case of line mode, there is a virtual space, and in the case of stream mode 
  13640. there is a virtual CR/LF or questionably a soft linebreak.)  The F attribute 
  13641. record in the example is a slightly different situation.  It is similar in that 
  13642. its positional notation is derived from the assumed existence of virtual spaces 
  13643. beyond the end of line.  It differs from the previous attribute record in that 
  13644. its location is invalid in stream mode and may not be effectively supported by 
  13645. some operations.
  13646.  
  13647.  
  13648. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13649.  
  13650. The exception to this is the '/' (search) command. When this command is 
  13651. invoked, E searches for the 'L' command definition. 
  13652.  
  13653.  
  13654. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13655.  
  13656. DEFC's and DEFPROC's cannot be redefined.  CONSTants can be redefined (to the 
  13657. same value) without penalty. 
  13658.  
  13659.  
  13660. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13661.  
  13662. The ET compiler does a simple substitution for every occurrence of a constant. 
  13663. If you define a long string constant and reference it ten times, its value is 
  13664. included ten times and takes up ten times its length in the resulting EX file. 
  13665. You might prefer to make a long string value a universal variable rather than a 
  13666. constant. 
  13667.  
  13668.  
  13669. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13670.  
  13671. By "event" we mean a procedure that is automatically invoked when a certain 
  13672. condition becomes true.  Previous examples are DEFINIT (executed when you start 
  13673. the editor or a new module) and DEFEXIT (executed when you quit the editor or a 
  13674. module).  In a sense keystrokes are also events, and in the past we sometimes 
  13675. called events "pseudo-keys". 
  13676.  
  13677.  
  13678. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13679.  
  13680. Understand that the word var is only a notational convenience. Do not include 
  13681. the word literally in your program. 
  13682.  
  13683.  
  13684. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13685.  
  13686. AF_ constants:
  13687.    AF_CHAR        =   1  -- 'key' represents an ASCII value
  13688.    AF_VIRTUALKEY  =   2  -- 'key' is a VK_ constant
  13689.    AF_SCANCODE    =   4  -- 'key' represents a keyboard scan code
  13690.    AF_SHIFT       =   8  -- The Shift key must be pressed along with 'key'
  13691.    AF_CONTROL     =  16  -- The Control key must be pressed along with 'key'
  13692.    AF_ALT         =  32  -- The Alt key must be pressed along with 'key'
  13693.    AF_LONEKEY     =  64  -- 'key' is a shift key, but is used by itself
  13694.    AF_SYSCOMMAND  = 256  -- 'index' should be sent in a WM_SYSCOMMAND message
  13695.    AF_HELP        = 512  -- 'index' should be sent in a WM_HELP message
  13696.  
  13697.  
  13698. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13699.  
  13700. See the OS/2 2.x Presentation Manager Reference from the OS/2 2.x Toolkit for a 
  13701. description of the various menu styles.  Assuming that you have the toolkit 
  13702. installed on your system, you can enter the command 
  13703.  
  13704. view PMREF Menu Item Styles
  13705. to see the menu styles, and can edit \toolkt2x\c\os2h\pmwin.h to determine what 
  13706. value to specify for each style.
  13707.  
  13708.  
  13709. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13710.  
  13711. See the OS/2 2.x Presentation Manager Reference from the OS/2 2.x Toolkit for a 
  13712. description of the various menu attributes.  Assuming that you have the toolkit 
  13713. installed on your system, you can enter the command 
  13714.  
  13715. view PMREF Menu Item Attributes
  13716. to see the menu attributes, and can edit \toolkt2x\c\os2h\pmwin.h to determine 
  13717. what value to specify for each attribute.
  13718.  
  13719.  
  13720. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13721.  
  13722. As described in the OS/2 Technical Reference Manual section 2.3.8.1 entitled 
  13723. Dynamic Linking. 
  13724.  
  13725.  
  13726. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13727.  
  13728. In the 'printable_char' cases, the keyname must be quoted in an E program. For 
  13729. example, the following example redefines the '~' key on the keyboard to toggle 
  13730. the cursor between the text and the command dialog box, and redefines some of 
  13731. the alphabetic keys to produce help information:      def '~' = command_toggle 
  13732. def 'a' - 'z' = 'help' However, the rest of the keynames need not be quoted, 
  13733. e.g. KEY c_end 
  13734.  
  13735.  
  13736. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13737.  
  13738. In all constructs which require a numeric_term, a numeric value is expected. 
  13739. The following can be substituted for a number: 
  13740.  
  13741. o the name of a variable representing a numeric value, or 
  13742. o a procedure call which returns a numeric value 
  13743.  
  13744. Starting with EPM 6.03 in May, 1995, a numeric term may also be given as a 
  13745. hexadecimal number, in the format 0Xhhhh, where hhhh represents 1 to 8 
  13746. hexadecimal digits. 
  13747.  
  13748.  
  13749. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13750.  
  13751. In all constructs which require a string_expression, a string value is 
  13752. expected. The following can be substituted for a string: 
  13753.  
  13754. o the name of a variable representing a string, or 
  13755. o a procedure call which returns a string 
  13756.  
  13757.  
  13758. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13759.  
  13760. In a constant_expression, any identifiers or designators must be the names of 
  13761. constants; no variables are permitted. 
  13762.  
  13763.  
  13764. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13765.  
  13766. There may not be spaces between the identifier and the '('. 
  13767.  
  13768.  
  13769. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13770.  
  13771. A macro-defined command is any command defined using a DEFC construct in the E 
  13772. macro code, whether it is part of the distributed macros written by the E 
  13773. developers or added later by a user. For an example of such a DEFC construct, 
  13774. see section Using EPM Commands in E Statements. 
  13775.  
  13776.  
  13777. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13778.  
  13779. Note: Two double quotes inside a double-quoted string will output one double 
  13780. quote character. For example, the string: "She said, ""Oh, that's 
  13781. fascinating."" " will yield the following output: She said, "Oh, that's 
  13782. fascinating." There can be no spaces between the two double quotes. 
  13783.  
  13784.  
  13785. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13786.  
  13787. Note: Two single quotes inside a single-quoted string will output one single 
  13788. quote character. For example, the string: 'I went to Jim Kennedy''s house' 
  13789. will yield the following output: I went to Jim Kennedy's house. There can be no 
  13790. spaces between the two single quotes. 
  13791.  
  13792.  
  13793. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13794.  
  13795. Any number to be interpreted or manipulated by the editor cannot exceed 32,767.