home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epm603a.zip / EPMBK.ZIP / EPMTECH.INF (.txt) next >
OS/2 Help File  |  1995-11-13  |  383KB  |  13,757 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. FONT                          the font id of the current file's font 
  794. FONTHEIGHT                    contains the current font height in pixels. 
  795. FONTWIDTH                     contains the current font height in pixels. 
  796. KEYSET                        the name of the keyset bound to the file, a 
  797.                               string like "EDIT_KEYS". 
  798. LAST                          the total number of lines in the current file. 
  799. LEVELOFATTRIBUTESUPPORT       A bit field indicating the level of attribute 
  800.                               support desired.  The bits are: 
  801.  
  802.    1   Display color attributes. 
  803.    2   Don't skip over attributes when moving the cursor. 
  804.    4   Display font attributes. 
  805.    8   Save attributes in an Extended Attribute when saving the file. 
  806.    16  Used by the macros to indicate that the Compiler menu was added (part of 
  807.        the Workframe support). 
  808.  
  809.                               Note:  Displaying mixed fonts can slow down 
  810.                                      screen refresh considerably.
  811.  
  812.  
  813. LINE                          the line number of the cursor's position, ranging 
  814.                               from 0 to LAST. 
  815. LINEG                         returns the same value as .LINE.  When set, 
  816.                               doesn't cause scrolling, so has less overhead 
  817.                               than setting .LINE when making temporary line 
  818.                               changes. .* 
  819. LOCKHANDLE                    can be used as a Boolean variable determining 
  820.                               whether the current file is locked against other 
  821.                               user's access in a LAN situation. (If non-zero, 
  822.                               the actual value is the file handle of the file, 
  823.                               which is kept open.) 
  824. MARGINS                       the margin settings for the file, a string like 
  825.                               "1 79 1". 
  826. MARKCOLOR                     contains the color for marked text. 
  827. MESSAGECOLOR                  contains the message display color. 
  828. MESSAGELINE                   in older versions of EPM, contained the contents 
  829.                               of the message line. Replaced by the 
  830.                               SetMessageLine command. 
  831. MODIFY                        The number of modifications to the file since it 
  832.                               was loaded or last saved.  Normally ranges 
  833.                               between 1 and .AUTOSAVE. 
  834. MOUSEX                        the column of the mouse location. This variable 
  835.                               is only valid when processing a mouse message. 
  836. MOUSEY                        the row of the mouse location. This variable is 
  837.                               only valid when processing a mouse message. 
  838. STATUSCOLOR                   contains the color of the status line. 
  839. STATUSLINE                    in older versions of EPM, contained the template 
  840.                               for the status line. Replaced by the 
  841.                               SetStatusLine command. 
  842. TABS                          the tab settings for the file, a string like "1 4 
  843.                               7 10" of up to 32 values. The tabs settings is 
  844.                               not a single global setting, but is remembered 
  845.                               for each file. 
  846. TEXTCOLOR                     shows the current textcolor setting. 
  847. TITLETEXT                     contains text to be displayed in the title bar 
  848.                               when this file is the current file. By default, 
  849.                               this field is empty, in which case the .filename 
  850.                               field is used. 
  851. USERSTRING                    this is a temporary storage string for the E 
  852.                               programmer to use for file specific information. 
  853.                               If used in your macro work files, you can do 
  854.                               anything you like with it.  If used in normal 
  855.                               text files being edited, it is suggested that you 
  856.                               add uniquely-delimited tags to the .userstring 
  857.                               rather than simply replacing it, in order to 
  858.                               allow other macros to share the string.  For 
  859.                               example: 
  860.  
  861.                                                             parse value .userstring with '[MyTag:' old_val ']'
  862.                                                             if old_val = '' then
  863.                                                                new_val = my_process_new_file()
  864.                                                                .userstring = .userstring '[MyTag:'new_val']'
  865.                                                             endif
  866.  
  867. VISIBLE                       contains a one if the file is displayable (ie. 
  868.                               not hidden) and a zero if the file is a hidden 
  869.                               file. 
  870. WINDOWHEIGHT                  contains the height of the current window. 
  871. WINDOWWIDTH                   contains the width of the current window. 
  872. WINDOWX                       gap between the right edge of the client windows 
  873.                               presentation space and the right edge of the 
  874.                               client window. 
  875. WINDOWY                       gap between the bottom end of the client windows 
  876.                               presentation space and the bottom end of the 
  877.                               client window. 
  878.  
  879. Some fields with numeric values also follow certain constraints about their 
  880. maximum and minimum values.  Some fields are dependent upon other fields.  The 
  881. following chart shows these dependencies and some of the fields' ranges of 
  882. values. 
  883.  
  884. Field name                Max value                          Min value
  885. ----------                ---------                          ---------
  886.  .AUTOSAVE                 65535                                  0
  887.  .COL                      255                                    1
  888.  .CURSORX                  .windowwidth                           1
  889.  .CURSORY                  .windowheight                          1
  890.  .FILENAME                 a string like 'C:\TESTFILE.DOC'
  891.  .KEYSET                   a string like 'EDIT_KEYS'
  892.  .LINE                     .last                                  0
  893.  .MARGINS                  a string like '1 254 1'
  894.  .MARKCOLOR                255                                    0
  895.  .MESSAGECOLOR             255                                    0
  896.  .MODIFY                   65535                                  0
  897.  .STATUSCOLOR              255                                    0
  898.  .TABS                     a string like '1 4 7 10' or '3'
  899.  
  900.  
  901. ΓòÉΓòÉΓòÉ 2.9. Attribute Pairs ΓòÉΓòÉΓòÉ
  902.  
  903. EPM provides one with the ability to associate information with positions and 
  904. regions of a file without modifying the content of the file.  This capability 
  905. is called attribute support and can be used to provide features like embedded 
  906. objects, hidden text, bookmarks, hypertext links, and structured text editing. 
  907.  
  908. In most editors files/buffers are treated as streams of characters.  EPM 
  909. differs from most editors in that a file/buffer is treated (for display) as a 
  910. stream of characters and attribute records.  Attribute support simply provides 
  911. an interface for managing files/buffers that contain attribute records. 
  912.  
  913. Attribute records themselves are essentially invisible, but because they can be 
  914. used to pass information to the rendering, live parsing, and formatting 
  915. components of the editor, a user of the editor can often ascertain the 
  916. existence and location of some attribute records based on the effect these 
  917. attribute records have on the rendering of the file/buffer. 
  918.  
  919. In order to manage attribute records, it is useful to have a notation system 
  920. for referencing individual attribute records within a file/buffer.  In EPM the 
  921. notation system is positional-- that is, one points to location of the 
  922. attribute record when one wants to reference it. 
  923.  
  924. In an ordinary text editor one can refer to any position in a file/buffer by 
  925. specifying a line number and column number.  This approach is not adequate for 
  926. an editor like EPM that has the dual goal of supporting attributes record 
  927. management and yet minimizing the impact of attribute support on 
  928. applications/macros that are not attribute-aware.  In order to best achieve 
  929. both goals, EPM has replaced the common line/column coordinate system with a 
  930. line/column/atoffset based coordinate system.  In this system each character of 
  931. a line occupies a unique column, but individual attribute records are denoted 
  932. by their attribute offset relative to the next character in the buffer/file. 
  933. The characters themselves always have an atoffset value of zero, so the 
  934. atoffset value is often omitted when referring to characters.  An attribute 
  935. record located immediately to the left of a character is said to be located at 
  936. the same column as that character but at an atoffset of -1.  An attribute 
  937. record immediately to the left of that is said to be at atoffset -2.  The 
  938. following diagram illustrates the notation for various characters and 
  939. attributes on a line: 
  940.  
  941.     abcd[A]efg[B][C][D]h[E]  [F]
  942.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöé
  943.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöö col 11 atoffset -1
  944.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöö column 9  atoffset -1
  945.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöö column 8  (atoffset 0)
  946.     Γöé  Γöé Γöé Γöé   Γöé     Γöö column 8  atoffset -1
  947.     Γöé  Γöé Γöé Γöé   Γöö column 8  atoffset -3
  948.     Γöé  Γöé Γöé Γöö column 5  (atoffset 0)
  949.     Γöé  Γöé Γöö column 5  atoffset -1
  950.     Γöé  Γöö column 4  (atoffset 0)
  951.     Γöö column 1  (atoffset 0)
  952.  
  953. Note:  The text in the example will simply appear as a sequence characters from 
  954.        "a" to "h" because attribute records are invisible.  An exception to 
  955.        this might be if the attributes effect the formatting, parsing, or 
  956.        rendering of the text.
  957.  
  958. As you can see in this first example, each of the characters resides at a 
  959. unique column number and has an implicit atoffset of zero.  You can also see 
  960. all attribute records reside at negative atoffsets and that it is possible for 
  961. more than one attribute record to reside between any two adjacent characters. 
  962. In this example, three attribute records reside between the "g" in column 7 and 
  963. the "h" in column 8. 
  964.  
  965. It should be noted that negative column numbers and positive at offset values 
  966. are invalid.  In previous versions of EPM it was possible to have positive 
  967. atoffsets.  This has been changed because it complicates the implementation 
  968. without providing a satisfactory solution to any problem.  It also be noted 
  969. that overly negative atoffset values have undefined semantics that may vary 
  970. depending on the operation requested.  Most operations will flag an error when 
  971. overly negative values are specified.  ((Footnote:  It is recognized by the 
  972. developers of EPM that people tend to deal with positive numbers better than 
  973. with negative. For this reason, we'd like to change the notation to be positive 
  974. and to represent the position of attributes relative to the character to the 
  975. left. Unfortunately, we are unlikely to find the time to make this change.)) 
  976.  
  977. When working with attributes records it is also important to have a notation 
  978. for the spaces between characters and attribute records.  The convention is 
  979. that each interstitial is reference by the same coordinate as the character or 
  980. attribute to its right.  In the first example, the position on the left side of 
  981. the "c" character is referred to column 3 atoffset 0. Similarly the 
  982. interstitial between the C and D attribute records is referred to as column 8 
  983. atoffset -1. 
  984.  
  985. In addition to positional information, attribute records also contain class, 
  986. value, and range information. 
  987.  
  988. Each attribute record has a class field that is used to categorize the 
  989. attribute record based on its purpose.  For example, one might be a member of a 
  990. bookmark class or sgml tag class.  Certain predetermined classes are supported 
  991. by the editor:  AC_FONT, AC_COLOR, AC_HSPACE.  Internal support for additional 
  992. classes will be added later, and applications can create and support additional 
  993. classes.  This is done by registering a class.  The editor provides C and E 
  994. macro API's for this. 
  995.  
  996. In addition to a class field, each attribute record has a four byte "value" 
  997. field whose interpretation is based on the class field of the attribute record. 
  998. For example, the value field of an SGML class attribute record might be a 
  999. pointer to meta information about the SGML element enclosed by the attribute 
  1000. record.  The interpretation of the value fields of the internally supported 
  1001. attribute classes are: 
  1002.  
  1003. AC_FONT   The value fields of AC_FONT attribute records is interpreted as a 
  1004.           font ID. (See pregister_font for further info about font ID's.) 
  1005.  
  1006. AC_HSPACE This attribute records are always interpreted has having point range 
  1007.           and their value field is interpreted as the amount of horizontal 
  1008.           white space that should be added at this point in the file when 
  1009.           rendered. 
  1010.  
  1011. AC_COLOR  The value fields of AC_COLOR attribute records is interpreted in the 
  1012.           same fashion that the attribute byte of CGA monitors was interpreted. 
  1013.           That is, the high nibble is the background color and the low nibble 
  1014.           is the foreground color. In the future this class may be broken down 
  1015.           into a foreground color class and a background color class so that 
  1016.           support can be added for more than 16 colors. 
  1017.  
  1018. In the current implementation the class field is only one byte long.  In 
  1019. addition, the classes below 64 are reserved for internal use.  This leaves only 
  1020. 192 classes for application use.  This is a relatively small domain, so it 
  1021. suggested that applications try to use as few classes as reasonable.  For 
  1022. example, if one were to implement a SGML tag set where each tag type was a 
  1023. class, one could easily consume most of the available classes.  In a situation 
  1024. like this it is suggested that the application just register a single SGML tag 
  1025. class and make the value field a pointer to a record that describes among other 
  1026. things, the type of SGML tag being represented by the attribute record. 
  1027.  
  1028. Each attribute record has a range field.  The range field indicates over what 
  1029. domain the attribute record rules.  That is, if the attribute record indicates 
  1030. that text should be colored red, the range value indicates what text should be 
  1031. colored red.  There are currently four types of range values supported in EPM: 
  1032. point, set, push, and pop. 
  1033.  
  1034. The "point" range is simply used to remember a location.  Attributes with this 
  1035. range might be used as book marks for example.  Attribute records with such a 
  1036. range effect no text, they just mark a location.  For example if one put a 
  1037. color attribute record with a point range into the document, no text would 
  1038. change color. 
  1039.  
  1040. The "set" range simply indicates that it's attribute record rules over all the 
  1041. text that follows until another set attribute record of the same class is 
  1042. encountered.  Attribute records of this class can easily be used to simulate 
  1043. character oriented attribute support much like that seen in most word 
  1044. processors. 
  1045.  
  1046. The "push" range simply indicates that it's attribute record rules over the the 
  1047. text that follows until suspended with another push attribute record of the 
  1048. same class or until a matching "pop" attribute record is encountered. 
  1049.  
  1050. The "pop" range indicates that the text that follows should be ruled by the 
  1051. attribute record (of the same class) that was suspended by "push" attribute 
  1052. record that currently rules the text to the left of this pop attribute record. 
  1053. Together the push and the pop attribute records are ideally suited implement a 
  1054. structured text system or to do GML and SGML like text tagging. 
  1055.  
  1056. The above definitions of push, pop, and set attribute records are a bit 
  1057. ambiguous on what is done if a file contains both push/pop and set attribute 
  1058. records of the same class.  In actuality the behavior is undefined.  In the 
  1059. current implementation, push and set are actually the same value so the editor 
  1060. can not distinguish between them.  In the future this may change in order to 
  1061. enable some optimizations.  Therefore one should stick to the AR_PUSH, AR_POP, 
  1062. AR_SET, and AR_POINT constant definitions provided in ATTR.E and ATTRIB.H, and 
  1063. one should not mix push/pop attributes with set attributes of the same class. 
  1064. It is anticipated that when one uses several modules/utilties at the same time, 
  1065. each utility might choose to use a different set a ranges for a given attribute 
  1066. class.  No solution to this problem has been adequately worked out at this 
  1067. point, but we don't expect this to be a major problem. 
  1068.  
  1069. Potential solutions might be to register each as being either push/pop or set 
  1070. and point. 
  1071.  
  1072.  
  1073. ΓòÉΓòÉΓòÉ 3. Definition Primitives ΓòÉΓòÉΓòÉ
  1074.  
  1075. The E language has a rich collection of primitives. These primitives are the 
  1076. building blocks of E programs since all E statements must occur within a 
  1077. definition construct. Definition primitives define procedures, commands, keys 
  1078. and initializations. Some definition primitives may be considered procedures. 
  1079. When distinguishing between these DEF procedures, one must consider three 
  1080. factors: how many of each type of definition may coexist in one program, when 
  1081. they are executed and what parameters they can be passed. The definition 
  1082. primitives are : 
  1083.  
  1084. o DEFINIT 
  1085.  
  1086.   These procedures may be multiply defined. All DEFINIT procedures are executed 
  1087.   first upon initialization of the EPM editor, one after another in the order 
  1088.   in which they were encountered during compilation.  (That's what we mean by 
  1089.   "may be multiply defined" - you can have several DEFINIT procedures and they 
  1090.   will be executed in sequence as if they were concatenated.) They take no 
  1091.   arguments and are typically used to initialize universal variables. 
  1092.  
  1093. o DEFEXIT 
  1094.  
  1095.   The converse of DEFINIT.  E executes all DEFEXIT procedures last, just before 
  1096.   it returns to the operating system.  DEFEXIT procedures are also called 
  1097.   during unlinking. Like DEFINITs, these procedures may be multiply defined and 
  1098.   take no arguments. 
  1099.  
  1100. o DEFMAIN 
  1101.  
  1102.   This procedure may be defined only once. DEFMAIN is executed after the 
  1103.   DEFINIT procedures are executed. This procedure is typically used to take 
  1104.   control of the editor's command dialog box arguments and options before the 
  1105.   editor. This can be particularly handy when you want the edit command to take 
  1106.   your own arguments or funky file names like "h:profile exec a". The 
  1107.   parameters that followed the epm command at the OS/2 prompt can be retrieved 
  1108.   by ARG(1), ARG(2), ARG(3), etc. function calls for as many arguments as are 
  1109.   passed. The number of arguments can be determined with the ARG() function. 
  1110.   This type of retrieval will be discussed in the next section. 
  1111.  
  1112. o DEFPROC 
  1113.  
  1114.   This kind of procedure is called by other procedures. It has a much more 
  1115.   sophisticated parameter passing capability to make the programming of other 
  1116.   procedures easier. Its capabilities include call by reference, call by value 
  1117.   and the ability to receive a variable number of arguments. 
  1118.  
  1119. o DEFC 
  1120.  
  1121.   This procedure allows the user to define new commands or redefine internal 
  1122.   editor commands as well as external commands. The command dialog box 
  1123.   arguments may be retrieved by an ARG(1) function call. 
  1124.  
  1125. o DEF 
  1126.  
  1127.   This defines the operation of a key.  It takes no arguments. 
  1128.  
  1129. o DEFKEYS 
  1130.  
  1131.   This is not a procedure and will be talked about in the key definitions 
  1132.   section of this document. This primitive allows KEY procedures to be grouped 
  1133.   into a keyset. 
  1134.  
  1135. o SET 
  1136.  
  1137.   This is not a procedure and will be talked about in the SET definitions 
  1138.   section of this document. This primitive is used for setting some of the 
  1139.   default configurations of the E editor. 
  1140.  
  1141. o CONST 
  1142.  
  1143.   This is not a procedure and will be talked about in the CONST section of this 
  1144.   document. This primitive is used for defining constants used by the E 
  1145.   translator. Constants do not change during execution of the E procs. 
  1146.  
  1147. o DEFMODIFY 
  1148.  
  1149.   DEFMODIFY, DEFLOAD and DEFSELECT are three "events". They are described more 
  1150.   fully later in this section.  DEFMODIFY is automatically triggered when the 
  1151.   file's number of modifications crosses certain threshold values. 
  1152.  
  1153. o DEFLOAD 
  1154.  
  1155.   DEFLOAD is invoked whenever a new file is created in the ring. 
  1156.  
  1157. o DEFSELECT 
  1158.  
  1159.   This event is automatically triggered whenever you switch files. 
  1160.  
  1161. The procedure definition primitives DEFINIT, DEFMAIN, DEFPROC, DEF and DEFC 
  1162. have no explicit termination keyword. Each definition is ended by the beginning 
  1163. of another DEFxxx. The rest of this chapter will explain each definition 
  1164. primitive in more detail. 
  1165.  
  1166.  
  1167. ΓòÉΓòÉΓòÉ 3.1. Parameter Retrieval using ARG(1) ΓòÉΓòÉΓòÉ
  1168.  
  1169. A DEFC or DEFMAIN receives only one argument/parameter: the command string. The 
  1170. command string consists of what was last typed at the command dialog box. The 
  1171. string may contain several words separated by spaces. In the case of DEFC, its 
  1172. sole argument will consist of all the characters typed at the E command dialog 
  1173. box after the name of the command. This argument is not declared as a parameter 
  1174. in the DEFC declaration. The DEFC construct does not allow for any parameter 
  1175. declarations. Instead, the argument can be retrieved via a function call, 
  1176. ARG(1). An example of this usage is: 
  1177.  
  1178.  
  1179.   defc test
  1180.     sayerror "arg(1) is " arg(1)
  1181.  
  1182. The user activates this command by typing test on the E command dialog box. 
  1183. This would result in the following being printed on the message area: arg(1) is 
  1184. . If the user added a parameter when calling test, for example test stuff, then 
  1185. the following string would be printed: arg(1) is stuff. 
  1186.  
  1187. In DEFMAIN, as with a DEFC, the only way to access the argument is to use an 
  1188. ARG(1) function call. DEFMAIN's argument/command string will consist of 
  1189. everything the user typed after the epm command at the OS/2 prompt. For 
  1190. example, assume that the following lines are added to the file MYMAIN.E: 
  1191.  
  1192.  
  1193.   defmain
  1194.     sayerror "arg(1) is " arg(1)
  1195.  
  1196. If the user invokes the editor with the command epm `list *.e', DEFMAIN will 
  1197. print arg(1) is  'list *.e' in the message area. 
  1198.  
  1199. A DEFPROC can receive multiple arguments separated by commas from the primitive 
  1200. that calls it. In a DEFPROC, ARG(1) is only the first parameter. An example of 
  1201. this usage is: 
  1202.  
  1203. defc test2
  1204.    call test2('actual param 1', 'actual param 2')
  1205.  
  1206. defproc test2(param1_decl, param2_decl)
  1207.    sayerror "arg(1) is " arg(1)
  1208. If the user types test2 at the command dialog box, the procedure will print 
  1209. arg(1) is actual param 1. 
  1210.  
  1211. For the exact syntax of the ARG() procedure, please refer to section Built-in 
  1212. Statements and Procedures. 
  1213.  
  1214.  
  1215. ΓòÉΓòÉΓòÉ 3.2. DEFINIT ΓòÉΓòÉΓòÉ
  1216.  
  1217. The DEFINIT keyword allows the initialization of variables for use by other E 
  1218. procedures. There is no limit to the number of DEFINIT definitions in an E 
  1219. source file. The order of execution of the DEFINIT definitions is the same as 
  1220. their compilation order. All DEFINIT definitions are executed before the 
  1221. DEFMAIN definition is executed. The general syntax is: 
  1222.  
  1223.   DEFINIT
  1224.   {UNIVERSAL variable  {,variable} }
  1225.   {statement}
  1226.  
  1227.  
  1228. ΓòÉΓòÉΓòÉ 3.3. DEFEXIT ΓòÉΓòÉΓòÉ
  1229.  
  1230. The DEFEXIT keyword allows for statements to be executed only when leaving the 
  1231. editor or unlinking a module. This is useful for any tasks the user wishes to 
  1232. perform once per session after any and all changes are made to a file. For 
  1233. example, this allows the user to keep files or communication channels open 
  1234. throughout the editing session for speed, and only close then when the user 
  1235. really exits from E. 
  1236.  
  1237. The syntax is the same as that of DEFINIT: 
  1238.  
  1239.   DEFEXIT
  1240.   {UNIVERSAL variable  {,variable} }
  1241.   {statement}
  1242.  
  1243.  
  1244. ΓòÉΓòÉΓòÉ 3.4. DEFMAIN ΓòÉΓòÉΓòÉ
  1245.  
  1246. The DEFMAIN construct allows the user to take control of the command line 
  1247. arguments, i.e. those arguments and options that the user specifies when 
  1248. invoking the editor at the OS/2 prompt. The command line arguments may be 
  1249. retrieved by an ARG(1) function call. The following example comes from the E 
  1250. editor's DEFMAIN in file MAIN.E: 
  1251.  
  1252. defmain
  1253.     os2cmdline = 'e 'arg(1)
  1254.  
  1255. The DEFMAIN definition is not required, and if present, it is executed after 
  1256. all DEFINIT definitions. To avoid an undefined state of the editor, a blank 
  1257. file is inserted in the top ring of the editor before DEFMAIN is executed. The 
  1258. general syntax is: 
  1259.  
  1260.   DEFMAIN
  1261.   {UNIVERSAL variable  {,variable} }
  1262.   statement  {statement}
  1263.  
  1264.  
  1265. ΓòÉΓòÉΓòÉ 3.5. Procedure Definitions (DEFPROC) ΓòÉΓòÉΓòÉ
  1266.  
  1267. The DEFPROC primitive is used to define new procedures (functions). The general 
  1268. syntax is: (See E language syntax for precise description). 
  1269.  
  1270.   DEFPROC  name [( [ [VAR] p1]  {, [VAR] p2})] [=]
  1271.      {UNIVERSAL variable  {,variable} }
  1272.      statement  {statement}
  1273.      [RETURN [expression] ].
  1274.  
  1275.    where name, p's and v's are valid E identifiers.
  1276.  
  1277. Procedures can return a string of 255 characters or less. If no string is 
  1278. returned, or if a simple RETURN statement with no value is issued, a null 
  1279. string is automatically returned when the procedure definition ends. 
  1280.  
  1281. The maximum number of DEFPROC arguments is 8. If parameters are specified (like 
  1282. p1 and p2 above) then the function is assumed to require a minimum of that many 
  1283. arguments. For example, if you've defined defproc myproc(x,y,z) but call it 
  1284. elsewhere with call myproc(a,b), you'll get an error when the call occurs (at 
  1285. run-time) "Procedure needs more arguments". But you can pass MORE than the 
  1286. minimum number of arguments. That is, call myproc(a,b,c,d) will work.  The 
  1287. number of arguments can be retrieved inside the procedure using arg(). You saw 
  1288. earlier how arg(1) retrieved the first parameter. Similarly, arg(2) retrieves 
  1289. the second parameter and arg(3) retrieves the third, etc. In the above example, 
  1290. the parameters c and d can be retrieved using the calls arg(3) and arg(4), 
  1291. respectively. For an illustration of this technique, see the file SORTE.E. 
  1292.  
  1293. If the keyword VAR prefaces a parameter name in the called procedure's 
  1294. parameter list, then the variable that the caller passes in the corresponding 
  1295. position may be changed (call by reference). If the caller passes a parameter 
  1296. in this position that is not a variable, the E interpreter will detect the 
  1297. error at run time and halt. 
  1298.  
  1299. In example 3, call by reference is demonstrated. If the user types test at the 
  1300. command dialog box, the defc test will call the defproc myproc() which will 
  1301. print: a and b are 1  2. After the procedure returns, defc test will print : a 
  1302. and b are 3  2. Variable b was permanently changed by the assignment in 
  1303. procedure myproc() because it had the var prefix. Variable a's value was 
  1304. unchanged once procedure myproc() returned. If defc test had made the following 
  1305. call: call myproc(a, 5*6), an invalid call by reference message would appear at 
  1306. run time. 
  1307.  
  1308.  
  1309. ΓòÉΓòÉΓòÉ 3.5.1. Example 1: ΓòÉΓòÉΓòÉ
  1310.  
  1311.      defproc  myproc               /* Define a new procedure */
  1312.        return  arg()               /* Return number of arguments */
  1313.                                    /* passed to procedure.*/
  1314.  
  1315.      def a_l                       /* Define the key Alt-L */
  1316.        call myproc()               /* Throw away 0 returned by myproc */
  1317.        Nofargs=myproc('a','b')     /* Sets Nofargs to 2 */
  1318.  
  1319.  
  1320. ΓòÉΓòÉΓòÉ 3.5.2. Example 2: ΓòÉΓòÉΓòÉ
  1321.  
  1322.      defproc  myproc               /* Define a new procedure */
  1323.        return  arg(1)              /* Return first argument  */
  1324.                                    /* passed to procedure.*/
  1325.  
  1326.      def a_l                       /* Define the key Alt-L */
  1327.        call myproc()               /* Throw away '' returned by myproc */
  1328.        Firstarg=myproc('a','b')    /* Sets Firstarg to 'a' */
  1329.        Firstarg=myproc()           /* Sets Firstarg to ''  */
  1330.  
  1331.  
  1332. ΓòÉΓòÉΓòÉ 3.5.3. Example 3: ΓòÉΓòÉΓòÉ
  1333.  
  1334.      definit
  1335.        universal  always_around    /* Define a global variable */
  1336.  
  1337.        always_around=0             /* set global variable to 0*/
  1338.  
  1339.  
  1340.      defc test
  1341.        a = 3
  1342.        b = 5
  1343.        call myproc(a, b)
  1344.        sayerror "a and b are " a b
  1345.  
  1346.      defproc  myproc(a,var b)      /* Define a new procedure */
  1347.        universal  always_around
  1348.  
  1349.        always_around=1             /* set global variable to 1*/
  1350.        a=1                         /* Change local parameter */
  1351.        b=2                         /* Change callers variable */
  1352.        i=10                        /* Set local variable */
  1353.        sayerror "a and b are " a b
  1354.  
  1355.  
  1356. ΓòÉΓòÉΓòÉ 3.6. Command Definitions (DEFC) ΓòÉΓòÉΓòÉ
  1357.  
  1358. The DEFC construct is used to define new commands. When a command is issued, E 
  1359. will search for the first word of the command as follows: 
  1360.  
  1361.  
  1362. ΓòÉΓòÉΓòÉ 3.6.1. Command search order: ΓòÉΓòÉΓòÉ
  1363.  
  1364.  1. Look for a DEFC command (i.e. one defined in a .E file) 
  1365.  2. Look for an internal editor command (e.g. MARGINS or EDIT) 
  1366.  3. Search the directories in the PATH environment variable for any executable 
  1367.     file, as follows: 
  1368.  
  1369.     a. a .EXE, .CMD, .EX file in current directory 
  1370.     b. a .EXE, .CMD, .EX file in the PATH or EPMPATH directories 
  1371.     c. a .EXE, .CMD, .EX file in the same directory as EPM.EXE. 
  1372.  
  1373. Because of the search order, user-defined commands with the same name as 
  1374. built-in commands can override internal editor commands. The XCOM command may 
  1375. be used to force execution of an internal editor command in the case of 
  1376. duplicates. 
  1377.  
  1378.  
  1379. ΓòÉΓòÉΓòÉ 3.6.2. Example: ΓòÉΓòÉΓòÉ
  1380.  
  1381.   defc   edit=              /* Redefine the edit command. */
  1382.     'xcom edit 'arg(1)      /* Pass command through to the editor  */
  1383. The general syntax is (See E language syntax for precise description): 
  1384.  
  1385.   DEFC  name {,name}  [=]
  1386.      {UNIVERSAL variable  {,variable} }
  1387.      statement  {statement}
  1388.      [RETURN [expression] ].
  1389.  
  1390.     where name is a valid E identifier.
  1391.  
  1392.  
  1393. ΓòÉΓòÉΓòÉ 3.7. Key Definitions (DEF and DEFKEYS) ΓòÉΓòÉΓòÉ
  1394.  
  1395. A keyset is a named collection of keys.  Typically, this collection defines a 
  1396. particular mode of editing. For example, you might want the keyboard to behave 
  1397. one way in a drawing mode and another way in an editing mode. Therefore, each 
  1398. of these modes would warrant its own keyset. You can have many keysets defined, 
  1399. but only one can be used at any time. 
  1400.  
  1401. The DEFKEYS keyword names the keyset. The KEYS statement activates a keyset. 
  1402. The DEF keyword defines a key or pseudo-key that belongs to the current keyset. 
  1403.  
  1404. Note:  Keys may be redefined.  If you create a DEF and the same DEF already 
  1405. exists in an earlier place in the compilation, the compiler will not issue an 
  1406. error.  It will forget the previous definition.  The penalty is that the 
  1407. previous code is not removed (difficult to do in a fast one-pass compiler), so 
  1408. a little memory will be wasted in the E.EX file. For a list of definable keys, 
  1409. see E-Definable Keys. 
  1410.  
  1411. DEF key_name|ch [-ch] {, key_name|ch [-ch]}[=] 
  1412.                     Define key. ch represents any printable character. A 
  1413.                     line-break (newline) is allowed after the comma, which can 
  1414.                     help readability if you're defining many keynames at once. 
  1415.  
  1416.                                         Example:
  1417.                                         /* Define 27 different keys to do same function,
  1418.                                                                                  pagedown. */
  1419.                                         def 'a'-'z', a_t = pagedown
  1420.  
  1421.                                         def '#' = 'add' /* define single key for add command */
  1422.  
  1423.                     Note that keys can only be defined to execute code.  If you 
  1424.                     want to remap the keyboard, you have to use the keyin 
  1425.                     statement for text characters, and for keys defined to 
  1426.                     execute code, either call the same routine as that key is 
  1427.                     defined to call or, for keys which don't have a simple 
  1428.                     definition and which you don't need to remap, define the 
  1429.                     new key to execute the old one using the executekey 
  1430.                     statement. 
  1431.  
  1432.                                           -- Define all alphabetic keys to type their upper-case equivalents
  1433.                                         def 'a' - 'z' = keyin upcase(lastkey())
  1434.  
  1435.                                           -- Define Alt+A to type a lower-case 'a'
  1436.                                         def a_A = keyin 'a'
  1437.  
  1438.                                           -- Define 'G' to enter an ASCII 234 (omega symbol)
  1439.                                         def 'G' = keyin \234
  1440.  
  1441.                                           -- Define Alt+0 to execute the same command executed by another key
  1442.                                         def a_0=    /* same as Alt+Equal, for sake of German keyboards */
  1443.                                            'dolines'
  1444.  
  1445.                                           -- Define Ctrl+P to execute whatever code the Alt+P key does
  1446.                                         def c_P = executekey a_p
  1447.  
  1448. DEFKEYS  name  [NEW | BASE | OVERLAY | CLEAR] 
  1449.                     Define keyset.  If the OVERLAY or no option is specified, 
  1450.                     then the last set of key definitions is copied onto the 
  1451.                     named set of keys.  The named keyset thus starts out with 
  1452.                     the same keys as the last one.  The NEW (or equivalent 
  1453.                     BASE) option starts a keyset with only the alphabetic, 
  1454.                     numeric and control characters. The CLEAR option starts an 
  1455.                     empty keyset. Please refer to section Keysets for more 
  1456.                     information on the BASE, OVERLAY and CLEAR options. 
  1457.  
  1458. A sample keyset named test_keys is defined below. This example shows the 
  1459. redefinition of the Enter and Space keys: 
  1460.  
  1461.                    defkeys test_keys
  1462.  
  1463.                    def ' '=
  1464.                       universal expand_on
  1465.                       if expand_on then
  1466.                          if  e_first_expansion()=0 then
  1467.                             keyin ' '
  1468.                          endif
  1469.                       else
  1470.                          keyin ' '
  1471.                       endif
  1472.  
  1473.                    def enter=
  1474.                       universal expand_on
  1475.  
  1476.                       if insertstate() then
  1477.                          insert
  1478.                       else
  1479.                          call maybe_autosave()
  1480.                          if expand_on then
  1481.                             if e_second_expansion()=0 then
  1482.                                call einsert_line()
  1483.                             endif
  1484.                          else
  1485.                             call einsert_line()
  1486.                          endif
  1487.                       endif
  1488.  
  1489.  
  1490. ΓòÉΓòÉΓòÉ 3.8. SET Definitions ΓòÉΓòÉΓòÉ
  1491.  
  1492. The E editor has a set of configuration options which may be reconfigured by a 
  1493. SET definition. SET definitions are executed before the DEFINIT procedure 
  1494. definitions are executed.  For examples of these configuration options, refer 
  1495. to The EPM User's Guide. 
  1496.  
  1497. It can be seen that there isn't much need for the SET definition primitive 
  1498. since most editor options can be set in DEFINIT and DEFMAIN. (We hope to do 
  1499. away with them in the future, in favor of straightforward commands like 'tabs' 
  1500. and 'margins'.) 
  1501.  
  1502. Most users will care to change only insert_state. 
  1503.  
  1504.  
  1505. ΓòÉΓòÉΓòÉ 3.9. Constants ΓòÉΓòÉΓòÉ
  1506.  
  1507. The CONST keyword allows a user to define constants that the E translator 
  1508. remembers during the translation of the E procs. ET substitutes the value 
  1509. whenever it sees the constant name. Constants serve no purpose at run-time. 
  1510.  
  1511. Constants may be redefined to the same value without causing an error or loss 
  1512. of memory space.  This is useful if you wish to develop a package for 
  1513. distribution, since you can define the constants you need without worrying 
  1514. about conflict with other files installed by the user.  The syntax for defining 
  1515. constants is: 
  1516.  
  1517.    CONST
  1518.       c1 = exp1 [,]
  1519.       c2 = exp2 [,]
  1520.       ...
  1521.  
  1522.  example
  1523.     CONST
  1524.        a=3
  1525.        b=a * 2
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ 3.10. DEFMODIFY ΓòÉΓòÉΓòÉ
  1529.  
  1530. The DEFMODIFY event is executed when a file's number of modifications: 
  1531.  
  1532. o goes from zero to nonzero (the first modification - we might want to change 
  1533.   the screen color); 
  1534. o goes from nonzero to zero (after a save - we might want to change the screen 
  1535.   color back again); 
  1536. o goes from less than .autosave to greater than or equal to .autosave (so we 
  1537.   can autosave). 
  1538.  
  1539. See the file MODIFY.E for more details. 
  1540.  
  1541.  
  1542. ΓòÉΓòÉΓòÉ 3.11. DEFLOAD ΓòÉΓòÉΓòÉ
  1543.  
  1544. DEFLOAD is invoked whenever a new file is created in the ring, whether loaded 
  1545. from disk or created by 'edit /n' or 'edit /c'. 
  1546.  
  1547. It is invoked at the end of all processing, the last thing before returning 
  1548. control to the user, so as not to be fooled by the file moving around in the 
  1549. ring or being renamed. If a file is loaded from disk and renamed, DEFLOAD gets 
  1550. the right filename. 
  1551.  
  1552. After all new files are defload-processed, the expected current file is 
  1553. restored.  Thus the command 'e one two' loads both files, invokes defload on 
  1554. 'one', then on 'two', and finally re-activates 'one'; the user is left looking 
  1555. at the same file as in the old days.  This is done internally so the defload 
  1556. procs don't have to worry about restoring fileids.  Understand this example: 
  1557.  
  1558.    defc rcedit
  1559.       'edit 'arg(1)
  1560.       if rc=sayerror('New file') then
  1561.          sayerror "It's a new file"
  1562.       endif
  1563.  
  1564.    defload  -- this defload procedure need not be close to the defc.
  1565.       sayerror "DEFLOAD for ".filename
  1566.  
  1567. When you type 'rcedit nosuch', the file nosuch (which doesn't exist on disk) is 
  1568. created in the ring.  DEFLOAD is not triggered until after all other procs are 
  1569. done, so RCEDIT runs to completion with the proper RC value.  You'll see 'It's 
  1570. a new file' and then 'DEFLOAD for nosuch'. For another example of a DEFLOAD 
  1571. definition statement see sample menu addition. 
  1572.  
  1573. It's not guaranteed that the files will be defload-processed in the same order 
  1574. as they're loaded.  They're processed in fileid order.  So 'two' might have 
  1575. been processed before 'one' if fileids are reused. 
  1576.  
  1577. The DEFLOAD event is also triggered whenever the name of the file changes. 
  1578. Typically a DEFLOAD will do things like set tabs and margins based on the 
  1579. filetype, so a name change is treated the same as a new load. 
  1580.  
  1581.  
  1582. ΓòÉΓòÉΓòÉ 3.12. DEFSELECT ΓòÉΓòÉΓòÉ
  1583.  
  1584. This event is automatically triggered whenever you switch files.  To be exact, 
  1585. it is invoked after all other command processing is done, if the then-current 
  1586. file is different from the current file before the command.  Thus if a command 
  1587. switches to a temporary file but switches back to the original file before 
  1588. ending, this event will not be triggered. 
  1589.  
  1590. This replaces the clumsy previous method, a procedure select_edit_keys() which 
  1591. had to be explicitly called at the end of any action that might have switched 
  1592. files. 
  1593.  
  1594. But there's not much work to be done in this event because most of the things 
  1595. that used to be done in select_edit_keys() are now done only once at file-load 
  1596. time, in the DEFLOAD event.  The keyset, tabs and margins stick with the file 
  1597. from then on.  In the standard macros nothing is done in the DEFSELECT. 
  1598.  
  1599. Starting with EPM 6, the DEFSELECT event is also triggered whenever the name of 
  1600. the file changes, just like the DEFLOAD. 
  1601.  
  1602. Note:  The order of events at start-up is:  definit, defmain, defload, 
  1603. defmodify and defselect.  The defmodify event would not normally occur at 
  1604. start-up, unless your defmain modified the newly-loaded file. 
  1605.  
  1606. These three events can be multiply defined.  You can have multiple procedures 
  1607. under the same name scattered throughout your macro set, and they'll be run in 
  1608. succession.  (As DEFINIT procedures have been scattered around the E files in 
  1609. the past.)  This helps keep the macros modular - if you're writing an editor 
  1610. application that needs to get control whenever a new file is loaded (the old 
  1611. BOOKMARK application comes to mind), you can write a DEFLOAD within your module 
  1612. without having to alter the base E files. 
  1613.  
  1614.  
  1615. ΓòÉΓòÉΓòÉ 4. Statements ΓòÉΓòÉΓòÉ
  1616.  
  1617. Procedures, commands and key definitions are composed of statements. Valid 
  1618. statements in the E language are: 
  1619.  
  1620. Construct:                          Example: 
  1621.  
  1622. assignment statements 
  1623.                                     temp = 36 
  1624.  
  1625. built-in statements 
  1626.                                     insertline "Written by the Yorktown E 
  1627.                                     group", 2 
  1628.  
  1629. conditional statements 
  1630.                                     to be discussed in section Conditional and 
  1631.                                     Loop Statements 
  1632.  
  1633. parse statements 
  1634.                                     to be discussed in section The Parse 
  1635.                                     Statement 
  1636.  
  1637. compiler directive statements 
  1638.                                     to be discussed in section Compiler 
  1639.                                     Directive Statements 
  1640.  
  1641. procedure calls 
  1642.                                     testproc(arg1, arg2) 
  1643.  
  1644. commands 
  1645.                                     to be discussed in section Using EPM 
  1646.                                     Commands in E Statements 
  1647.  
  1648.  
  1649. ΓòÉΓòÉΓòÉ 4.1. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  1650.  
  1651. In the following syntactic description the same symbolic conventions are used 
  1652. as in The EPM User's Guide section "E Commands". In addition, the word var 
  1653. followed by an argument means that the argument must be a variable, i.e. a 
  1654. number, string or expression is not acceptable. 
  1655.  
  1656. Most of the following statements can be optionally spelled with underscores 
  1657. between the words. Please refer to E Language Syntax for more information. 
  1658.  
  1659. Those commands followed by parentheses are procedures; those not followed by 
  1660. parentheses are statements. Each can be followed by arguments. Only procedures 
  1661. can return values. 
  1662.  
  1663.  
  1664. ΓòÉΓòÉΓòÉ 4.1.1. ABBREV(information, info [, length] ) ΓòÉΓòÉΓòÉ
  1665.  
  1666. Choose: 
  1667.  
  1668. o Syntax 
  1669. o Definition 
  1670. o Example 
  1671. o E Language Syntax 
  1672.  
  1673.  
  1674. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1675.  
  1676. ABBREV(information, info [, length]) 
  1677.  
  1678.  
  1679. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1680.  
  1681. ABBREV returns 1 if info is equal to the leading characters of information and 
  1682. the length of info is not less than length. ABBREV returns 0 if neither of 
  1683. these conditions is met. 
  1684.  
  1685. If specified, length must be a nonnegative whole number. The default for length 
  1686. is the number of characters in info. 
  1687.  
  1688.  
  1689. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1690.  
  1691. Here are some examples: 
  1692.  
  1693.  ABBREV('Print','Pri')      ->    1
  1694.  ABBREV('PRINT','Pri')      ->    0
  1695.  ABBREV('PRINT','PRI',4)    ->    0
  1696.  ABBREV('PRINT','PRY')      ->    0
  1697.  ABBREV('PRINT','')         ->    1
  1698.  ABBREV('PRINT','',1)       ->    0
  1699.  
  1700. Note:  A null string will always match if a length of 0 (or the default) is 
  1701.        used. This allows a default keyword to be selected automatically if 
  1702.        desired. For example:
  1703.  
  1704. option = entrybox('Enter option:')
  1705.         /* keyword1 is to be the default */
  1706. if abbrev('keyword1',option) then ...
  1707. elseif abbrev('keyword2',option) then ...
  1708.   ...
  1709. endif
  1710.  
  1711.  
  1712. ΓòÉΓòÉΓòÉ 4.1.2. ACTIVATEACCELTABLE var fileid ΓòÉΓòÉΓòÉ
  1713.  
  1714. Choose: 
  1715.  
  1716. o Syntax 
  1717. o Definition 
  1718. o E Language Syntax 
  1719.  
  1720.  
  1721. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1722.  
  1723. ACTIVATEACCELTABLE  table_name 
  1724.  
  1725.  
  1726. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1727.  
  1728. Makes the named accelerator table the active one. 
  1729.  
  1730. See also: 
  1731.  
  1732. o Building Accelerator Tables from the Macro Language 
  1733. o BUILDACCELTABLE 
  1734. o DELETEACCEL 
  1735. o QUERYACCELSTRING 
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ 4.1.3. ACTIVATEFILE var fileid ΓòÉΓòÉΓòÉ
  1739.  
  1740. Choose: 
  1741.  
  1742. o Syntax 
  1743. o Definition 
  1744. o Example 
  1745. o E Language Syntax 
  1746.  
  1747.  
  1748. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1749.  
  1750. ACTIVATEFILE  fileid 
  1751.  
  1752.  
  1753. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1754.  
  1755. Makes the file identified by the variable fileid the current file. 
  1756.  
  1757. Fileid must be a simple variable (as indicated by the word var)  containing a 
  1758. valid file id number.  If you give an expression, the compiler will stop and 
  1759. complain, "Expression not assignment compatible." 
  1760.  
  1761.  
  1762. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1763.  
  1764.       Correct usage:
  1765.       ACTIVATEFILE myfileid
  1766.  
  1767.       The following expressions will not work:
  1768.       ACTIVATEFILE  fileid' '
  1769.       ACTIVATEFILE ARG(1)
  1770.  
  1771.  
  1772. ΓòÉΓòÉΓòÉ 4.1.4. ADDRESS(variable) ΓòÉΓòÉΓòÉ
  1773.  
  1774. Choose: 
  1775.  
  1776. o Syntax 
  1777. o Definition 
  1778. o Definition 
  1779. o E Language Syntax 
  1780.  
  1781.  
  1782. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1783.  
  1784. ADDRESS( variable ) 
  1785.  
  1786.  
  1787. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1788.  
  1789. Returns the address of a variable. Intended for use in dynalink calls, the 
  1790. format of the address depends on the version of EPM being used. 
  1791.  
  1792.  
  1793. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1794.  
  1795. In 16-bit versions (EPM 5.xx), 
  1796.  
  1797.   ADDRESS(varname) == SELECTOR(varname) || OFFSET(varname)
  1798.  
  1799. In 32-bit versions (EPM 6.xx), 
  1800.  
  1801.   ADDRESS(varname) ==  OFFSET(varname) || SELECTOR(varname)
  1802.  
  1803.  
  1804. ΓòÉΓòÉΓòÉ 4.1.5. ADJUSTBLOCK ΓòÉΓòÉΓòÉ
  1805.  
  1806. Choose: 
  1807.  
  1808. o Syntax 
  1809. o Definition 
  1810. o E Language Syntax 
  1811.  
  1812.  
  1813. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1814.  
  1815. ADJUSTBLOCK | ADJUST_BLOCK 
  1816.  
  1817.  
  1818. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1819.  
  1820. Overlays marked block at cursor, like the standard key definition Alt-A.  The 
  1821. source block is filled with spaces. 
  1822.  
  1823.  
  1824. ΓòÉΓòÉΓòÉ 4.1.6. ADJUSTMARK ΓòÉΓòÉΓòÉ
  1825.  
  1826. Choose: 
  1827.  
  1828. o Syntax 
  1829. o Definition 
  1830. o E Language Syntax 
  1831.  
  1832.  
  1833. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1834.  
  1835. ADJUSTMARK 
  1836.  
  1837.  
  1838. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1839.  
  1840. Moves marked text to the location of the cursor by overlaying. The old location 
  1841. is filled with blanks. 
  1842.  
  1843.  
  1844. ΓòÉΓòÉΓòÉ 4.1.7. ARG([numeric_expression]) ΓòÉΓòÉΓòÉ
  1845.  
  1846. Choose: 
  1847.  
  1848. o Syntax 
  1849. o Definition 
  1850. o Example 
  1851. o E Language Syntax 
  1852.  
  1853.  
  1854. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1855.  
  1856. ARG([numeric_expression]) 
  1857.  
  1858.  
  1859. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1860.  
  1861. May be used only in a DEFMAIN, DEFC or DEFPROC. In the case of a DEFPROC, if 
  1862. numeric_expression is not given, the number of arguments passed to the macro is 
  1863. returned.  Otherwise the expression is evaluated to a number and the 
  1864. corresponding argument is returned. If there are fewer arguments than specified 
  1865. by the expression, a null string is returned. 
  1866.  
  1867.  
  1868. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1869.  
  1870. For example: 
  1871.  
  1872.   numofargs = arg()
  1873.   argfour = arg(4)
  1874.  
  1875. In the first example, the number of arguments that were passed is returned in 
  1876. the variable numofargs. In the second example the four argument is returned in 
  1877. the variable argfour. 
  1878.  
  1879.  
  1880. ΓòÉΓòÉΓòÉ 4.1.8. ASC(character) ΓòÉΓòÉΓòÉ
  1881.  
  1882. Choose: 
  1883.  
  1884. o Syntax 
  1885. o Definition 
  1886. o Example 
  1887. o E Language Syntax 
  1888.  
  1889.  
  1890. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1891.  
  1892. ASC('character') 
  1893.  
  1894.  
  1895. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1896.  
  1897. Returns the ASCII decimal value of the character expression. 
  1898.  
  1899.  
  1900. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1901.  
  1902. For example: 
  1903.  
  1904.   ASC('A') = 65
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 4.1.9. ATOI(numeric_expression) ΓòÉΓòÉΓòÉ
  1908.  
  1909. Choose: 
  1910.  
  1911. o Syntax 
  1912. o Definition 
  1913. o Example 
  1914. o E Language Syntax 
  1915.  
  1916.  
  1917. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1918.  
  1919. ATOI('numeric_expression') 
  1920.  
  1921.  
  1922. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1923.  
  1924. Converts the E language representation of a number (as a string) to the C 
  1925. language representation of an integer (data type int). Since many functions 
  1926. that are available through the function DYNALINK() require input to be in 
  1927. binary numbers as opposed to ASCII strings, we provide functions to convert 
  1928. ASCII strings into binary numbers. For an example of this usage see the 
  1929. DYNALINK() entry in this section. 
  1930.  
  1931.  
  1932. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1933.  
  1934. The following shows the high-level strings and the equivalent machine 
  1935. representation: 
  1936.  
  1937. string     machine representation  (hexadecimal digits)
  1938. '40'           34 30    /* '4' is 0x34 & '0' is 0x30 */
  1939.  
  1940. atoi('40')     28 00    /* 28 00 is 40 decimal       */
  1941.                         /* since byte swapping       */
  1942.                         /* exists in the Intel       */
  1943.                         /* architecture              */
  1944.                         /* In reality the word       */
  1945.                         /* would be 0x0028           */
  1946.  
  1947.  
  1948. ΓòÉΓòÉΓòÉ 4.1.10. ATOL(numeric_expression) ΓòÉΓòÉΓòÉ
  1949.  
  1950. Choose: 
  1951.  
  1952. o Syntax 
  1953. o Definition 
  1954. o E Language Syntax 
  1955.  
  1956.  
  1957. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1958.  
  1959. ATOL('numeric_expression') 
  1960.  
  1961.  
  1962. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1963.  
  1964. Converts the E language representation of a number (as a string) to the C 
  1965. language representation of a long integer (data type long). For use with C 
  1966. functions that require numeric parameters, for example function calls via 
  1967. DYNALINK(). 
  1968.  
  1969.  
  1970. ΓòÉΓòÉΓòÉ 4.1.11. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var fileid] ΓòÉΓòÉΓòÉ
  1971.  
  1972. Choose: 
  1973.  
  1974. o Syntax 
  1975. o Definition 
  1976. o Example 
  1977. o E Language Syntax 
  1978.  
  1979.  
  1980. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1981.  
  1982. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var 
  1983. fileid] 
  1984.  
  1985.  
  1986. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1987.  
  1988. subop is one of the following: 
  1989.  
  1990. const
  1991.    FIND_NEXT_ATTR_SUBOP =  1
  1992.    FIND_PREV_ATTR_SUBOP =  2
  1993.    FIND_MATCH_ATTR_SUBOP = 3
  1994.    DELETE_ATTR_SUBOP =    16
  1995.  
  1996. The use of the remaining parameters varies with the operation to be performed. 
  1997.  
  1998. FIND_NEXT_ATTR_SUBOP This action finds the next occurance (not including the 
  1999.           specified location) of an attribute record of the specified class. 
  2000.  
  2001.    class   On input, this specifies the attribute class of the attribute 
  2002.            records of interest.  A value of ANY_CLASS (zero) indicates that the 
  2003.            position of the next attribute record of any class should be 
  2004.            returned. On output, the class of the found attribute.  A class of 
  2005.            zero indicates that no attribute record was found. 
  2006.    offset  On input, the location (non-inclusive) where the search is to begin. 
  2007.            On output, the location of the found attribute record.  If none was 
  2008.            found, then the parameter will not be modified. 
  2009.    column  On input, the location where the search is to begin. On output, the 
  2010.            location of the found attribute record.  If none was found, then the 
  2011.            parameter will not be modified. 
  2012.    line    On input, the location where the search is to begin. On output, the 
  2013.            location of the found attribute record.  If none was found, then the 
  2014.            parameter will not be modified. 
  2015.    fileid  The fileid of the file where the search is to occur.  The default is 
  2016.            the current file. 
  2017.  
  2018. FIND_PREV_ATTR_SUBOP This action is just like the FIND_NEXT_ATTR_SUBOP except 
  2019.           that it finds the previous occurance of an attribute record of the 
  2020.           specified class rather than the next occurance. 
  2021.  
  2022. FIND_MATCH_ATTR_SUBOP This action finds the (push/pop model) attribute record 
  2023.           that matches the specified attribute record. For example, if a push 
  2024.           attribute record was specified, the location of the corresponding pop 
  2025.           attribute record is returned. 
  2026.  
  2027.    class   Unused parameter 
  2028.    offset  On input, the location (non-inclusive) where the search for the 
  2029.            match is to begin.  An attribute record must exist at this location 
  2030.            or an error code will be flagged. On output, the location of the 
  2031.            found attribute record.  If none was found, then the parameter will 
  2032.            not be modified. 
  2033.    column  On input, the location where the search is to begin. On output, the 
  2034.            location of the found attribute record.  If none was found, then the 
  2035.            parameter will not be modified. 
  2036.    line    On input, the location where the search is to begin. On output, the 
  2037.            location of the found attribute record.  If none was found, then the 
  2038.            parameter will not be modified. 
  2039.    fileid  The fileid of the file where the search is to occur.  The default is 
  2040.            the current file. 
  2041.  
  2042. DELETE_ATTR_SUBOP Deletes the attribute record at the specified location.  If 
  2043.           attribute records exists at the specified character position having 
  2044.           an offset of the same sign as the specified attribute record but of 
  2045.           larger magnitude, then those attribute records will be shifted in 
  2046.           (their offset will be incremented or decremented) to fill in the 
  2047.           vacated location. 
  2048.  
  2049.    class   On input, this  is unused On output, the class of the deleted 
  2050.            attribute record.  Zero if no attribute record exists at the 
  2051.            specified location. 
  2052.    offset  The location of the attribute record to be deleted. 
  2053.    column  The location of the attribute record to be deleted. 
  2054.    line    The location of the attribute record to be deleted. 
  2055.    fileid  The fileid of the file where the specified attribute record is to be 
  2056.            found.  The default is the current file. 
  2057.  
  2058. See Attribute Pairs for additional information on attributes. 
  2059.  
  2060.  
  2061. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2062.  
  2063. class = 1         -- 1 = COLOR_CLASS
  2064. offst1 = -255
  2065. col = .col
  2066. line = .line
  2067. getfileid fileid
  2068. attribute_action 1, class, offst1, col, line, fileid -- 1=FIND NEXT ATTR
  2069. if class & col = .col & line = .line  then  -- Found one on this character.
  2070.    offst2 = offst1
  2071.    attribute_action 3, class, offst2, col, line, fileid -- 3=FIND MATCH ATTR
  2072.    if class then      -- Found a match; delete them both.
  2073.       attribute_action 16, class, offst1, .col, .line, fileid -- 16=DELETE ATTR
  2074.       attribute_action 16, class, offst2, col, line, fileid -- 16=DELETE ATTR
  2075.    endif
  2076. endif
  2077.  
  2078. This code checks for a color attribute on the current character.  If found, it 
  2079. checks for the matching attribute.  If both a Push and Pop exist, both are 
  2080. deleted. 
  2081.  
  2082.  
  2083. ΓòÉΓòÉΓòÉ 4.1.12. BACKTAB ΓòÉΓòÉΓòÉ
  2084.  
  2085. Choose: 
  2086.  
  2087. o Syntax 
  2088. o Definition 
  2089. o E Language Syntax 
  2090.  
  2091.  
  2092. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2093.  
  2094. BACKTAB 
  2095.  
  2096.  
  2097. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2098.  
  2099. Moves cursor to previous tab stop.  Like the standard Shift-Tab. 
  2100.  
  2101.  
  2102. ΓòÉΓòÉΓòÉ 4.1.13. BACKTABWORD ΓòÉΓòÉΓòÉ
  2103.  
  2104. Choose: 
  2105.  
  2106. o Syntax 
  2107. o Definition 
  2108. o E Language Syntax 
  2109.  
  2110.  
  2111. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2112.  
  2113. BACKTABWORD | BACKTAB_WORD 
  2114.  
  2115.  
  2116. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2117.  
  2118. Positions cursor on first character of previous word, like the standard 
  2119. Ctrl-Left. If there are no more previous words the cursor is positioned at 
  2120. beginning of line. 
  2121.  
  2122.  
  2123. ΓòÉΓòÉΓòÉ 4.1.14. BACKWARD ΓòÉΓòÉΓòÉ
  2124.  
  2125. Choose: 
  2126.  
  2127. o Syntax 
  2128. o Definition 
  2129. o E Language Syntax 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2133.  
  2134. BACKWARD 
  2135.  
  2136.  
  2137. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2138.  
  2139. Same as page_up. 
  2140.  
  2141.  
  2142. ΓòÉΓòÉΓòÉ 4.1.15. BEEP([pitch [, duration] ]) ΓòÉΓòÉΓòÉ
  2143.  
  2144. Choose: 
  2145.  
  2146. o Syntax 
  2147. o Definition 
  2148. o Example 
  2149. o E Language Syntax 
  2150.  
  2151.  
  2152. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2153.  
  2154. BEEP( [ pitch [, duration] ] ) 
  2155.  
  2156.  
  2157. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2158.  
  2159. Sounds a beep defined by pitch (in Hertz) and duration (in milliseconds).  The 
  2160. default pitch is 900 and the defualt duration is 500. 
  2161.  
  2162.  
  2163. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2164.  
  2165.     BEEP(850,1000)
  2166.  
  2167. This example will produce a beep with a frequency of 850 Hertz for a duration 
  2168. of 1 second. 
  2169.  
  2170.  
  2171. ΓòÉΓòÉΓòÉ 4.1.16. BEGINLINE ΓòÉΓòÉΓòÉ
  2172.  
  2173. Choose: 
  2174.  
  2175. o Syntax 
  2176. o Definition 
  2177. o E Language Syntax 
  2178.  
  2179.  
  2180. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2181.  
  2182. BEGINLINE | BEGIN_LINE 
  2183.  
  2184.  
  2185. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2186.  
  2187. Moves cursor to beginning of current line, like the standard Home key. 
  2188.  
  2189.  
  2190. ΓòÉΓòÉΓòÉ 4.1.17. BINSEARCH( string [, fileid [, flags [, startcol]]]) ΓòÉΓòÉΓòÉ
  2191.  
  2192. New in EPM 6. 
  2193.  
  2194. Choose: 
  2195.  
  2196. o Syntax 
  2197. o Definition 
  2198. o E Language Syntax 
  2199.  
  2200.  
  2201. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2202.  
  2203. BINSEARCH( string [, fileid, [, flags [, start_col ]]] ) 
  2204.  
  2205.  
  2206. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2207.  
  2208. Performs a binary search in the current or specified file for the specified 
  2209. search_string.  Returns the line number on which a match was found, or 0 for 
  2210. failure.  The comparison starts at column start_col in the file (the default 
  2211. column is 1). The default value for flags is 0.  Possible values are any 
  2212. combination of: 
  2213.  
  2214. 1   Perform a case-insensitive comparison. 
  2215. 2   Compare only the first length(string) characters; don't require that the 
  2216.     entire line matches. 
  2217.  
  2218. Note:  The file to be searched must be sorted in the same way that the search 
  2219.        is being performed (case-sensitive or case-insensitive).
  2220.  
  2221.  
  2222. ΓòÉΓòÉΓòÉ 4.1.18. BOTTOM, BOT ΓòÉΓòÉΓòÉ
  2223.  
  2224. Choose: 
  2225.  
  2226. o Syntax 
  2227. o Definition 
  2228. o E Language Syntax 
  2229.  
  2230.  
  2231. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2232.  
  2233. BOTTOM | BOT 
  2234.  
  2235.  
  2236. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2237.  
  2238. Moves cursor to last line of file, like the standard Ctrl-End. 
  2239.  
  2240.  
  2241. ΓòÉΓòÉΓòÉ 4.1.19. BROWSE( 0 | 1 ) ΓòÉΓòÉΓòÉ
  2242.  
  2243. Choose: 
  2244.  
  2245. o Syntax 
  2246. o Definition 
  2247. o E Language Syntax 
  2248.  
  2249.  
  2250. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2251.  
  2252. BROWSE([0 | 1]) 
  2253.  
  2254.  
  2255. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2256.  
  2257. Turns browse mode on for the current file. Browse mode is a read-only mode. 0 
  2258. turns the browse mode off; 1 turns it on.  If no argument is given BROWSE 
  2259. returns the current mode. 
  2260.  
  2261.  
  2262. ΓòÉΓòÉΓòÉ 4.1.20. BUFFER( subfunction_number, parameters... ) ΓòÉΓòÉΓòÉ
  2263.  
  2264. Choose: 
  2265.  
  2266. o Syntax 
  2267. o Definition 
  2268. o E Language Syntax 
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2272.  
  2273. BUFFER() 
  2274.  
  2275.  
  2276. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2277.  
  2278. Is for developers of advanced applications who want to share text with external 
  2279. processes.  It allows an E application to create a shared memory buffer of a 
  2280. specified name and copy text to it, so that other processes can open the buffer 
  2281. and read the text from E. (For those interested in OS/2 internals, the buffer 
  2282. creation calls DosAllocShrSeg().) 
  2283.  
  2284. The buffer function provides several subfunctions:  create a new buffer; open 
  2285. an existing buffer; free a buffer; get and put text; query the allocated and 
  2286. used size of a buffer.  You specify the subfunction you want with the first 
  2287. argument, one of: CREATEBUF, OPENBUF, FREEBUF, GETBUF, PUTBUF, MAXSIZEBUF, or 
  2288. USEDSIZEBUF. (These are only numeric constants from 0 to 6, as defined in 
  2289. STDCONST.E.)  The meaning of the remaining arguments to buffer() depends on the 
  2290. subfunction, as shown in the seven cases below. 
  2291.  
  2292. The maximum buffer size is 65535 bytes.  E uses the first 32 bytes of the 
  2293. buffer for status information: 
  2294.  
  2295.    2 bytes:  bufsize available for text,
  2296.                    without the header
  2297.    2 bytes:  amount of buffer filled, <= bufsize
  2298.    2 bytes:  format (explained below)
  2299.    2 bytes:  number of lines if known
  2300.                    (E fills this in on a PUT)
  2301.   26 bytes:  reserved for anything
  2302.                    the application might want.
  2303. Thus the maximum space available for text is 65535-32 = 65503 bytes. 
  2304.  
  2305. bufhndl = buffer( CREATEBUF, name [,size [,private]])
  2306.  
  2307. CREATEBUF allocates a shared memory segment of name "\SHAREMEM\name". The 
  2308. prefix "\SHAREMEM\" is automatic and shouldn't be supplied. The size 
  2309. specification is optional.  If it's zero or omitted, it defaults to the maximum 
  2310. size of 65503. 
  2311.  
  2312. A last optional argument, private, can be supplied with a nonzero value if you 
  2313. do not want want the buffer to be shared by other processes.  You might wish to 
  2314. create a memory buffer for use by your application only, in which case you 
  2315. should specify private to avoid using one of the limited number of OS/2 shared 
  2316. buffers.  (Technically, a private buffer is created with DosAllocSeg() rather 
  2317. than DosAllocShrSeg().) 
  2318.  
  2319. The return value from CREATEBUF is a handle or ID, to be used by the other 
  2320. subfunctions.  (Actually the handle is the buffer segment selector, in string 
  2321. form like that returned by seg(), ready for use by peek and poke.)  A return 
  2322. value of 0 means an error; RC will contain the error code given by OS/2. 
  2323.  
  2324. bufhndl = buffer( OPENBUF, name)
  2325.  
  2326. OPENBUF shares a buffer created by another process.  Again, bufhndl is 
  2327. returned; zero means a system error is returned in RC.  It is expected that the 
  2328. other process has put the format and size into the first 2 words of the buffer, 
  2329. and starts the data at offset 32. 
  2330.  
  2331. success = buffer( FREEBUF, bufhndl)
  2332.  
  2333. FREEBUF frees the buffer.  It's not required if you're exiting from E, but 
  2334. recommended.  The return value is zero if an error occurred, for consistency; 
  2335. zero means an error for all these subfunctions. 
  2336.  
  2337. noflines= buffer( GETBUF, bufhndl)
  2338.  
  2339. GETBUF loads all of a buffer into the current file at the current location, in 
  2340. the same manner as a GET command.  You have no control over the number of 
  2341. lines; normally you'll do the GETBUF into a new empty file.  The return value 
  2342. is the number of lines transferred. A zero value along with a zero RC means the 
  2343. buffer was empty. (Note:  RC is automatically zeroed at the start of any 
  2344. buffer() function.) 
  2345.  
  2346. noflines= buffer( PUTBUF, bufhndl, startline
  2347.           [,endline [,format]])
  2348.  
  2349. PUTBUF copies the current file's text from startline through endline. If 
  2350. endline is omitted, or specified as zero or a huge value, as many whole lines 
  2351. are copied as will fit, stopping at the end of file of course. The return value 
  2352. is the number of lines transferred. 
  2353.  
  2354. size    = buffer( MAXSIZEBUF, bufhndl)
  2355.  
  2356. MAXSIZEBUF returns the buffer capacity, in case some other process created it 
  2357. and you don't know its size.  (This subfunction gives the same value as 
  2358. peek(bufhndl,0,2).) 
  2359.  
  2360. size    = buffer( USEDSIZEBUF, bufhndl)
  2361.  
  2362. USEDSIZEBUF returns the size of data in the buffer. (This gives the same value 
  2363. as peek(bufhndl,2,2).) 
  2364.  
  2365. The format word in the header determines how the lines are formatted. It's a 
  2366. bit string so you can mix and match options: 
  2367.  
  2368. APPENDCR     1   append ASCII 13 after each line
  2369. APPENDLF     2   append ASCII 10 after the CR if any
  2370. APPENDNULL   4   append ASCII  0 after the CR-LF if any
  2371. TABCOMPRESS  8   tab-compress the line
  2372. STRIPSPACES 16   remove trailing spaces as usual in a save
  2373. FINALNULL   32   append a null at end of the buffer
  2374. The default format if unspecified is 19, for CR-LF and remove trailing spaces. 
  2375.  
  2376. Note:  The format is ignored on a GET.  E handles whatever characters it finds, 
  2377. in the same manner as loading a disk file.  CR-LF's are dropped, tabs are 
  2378. expanded. 
  2379.  
  2380. Note 2:  if an external process fills a buffer, it should make sure that the 
  2381. last line is properly terminated with the appropriate end-of-line.  E will 
  2382. double-check for this to protect against overrunning the end of the buffer.  E 
  2383. will deposit an end-of-line if needed and restore whatever character was there, 
  2384. but this might not be what the other process expected. 
  2385.  
  2386. For sample usages, see the file BUFF.E. 
  2387.  
  2388.  
  2389. ΓòÉΓòÉΓòÉ 4.1.21. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  2390.  
  2391. Choose: 
  2392.  
  2393. o Syntax 
  2394. o Definition 
  2395. o E Language Syntax 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2399.  
  2400. BUILDACCELTABLE table_name, command, accel_flags, key, index 
  2401.  
  2402.  
  2403. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2404.  
  2405. Adds an entry to an accelerator table. 'tablename' is the name of the 
  2406. accelerator table being built (and is later passed as a parameter to the 
  2407. activateacceltable statement), 'command' is the command to be executed when the 
  2408. accelerator key is pressed, accel_flags is the sum of some AF_ constants from 
  2409. STDCONST.E, 'key' is as ASCII value for AF_CHAR, a VK_ constant for 
  2410. AF_VIRTUALKEY, etc., and 'index' is a unique index number for that table.  You 
  2411. can reuse an index value to replace an entry in the accelerator table. 
  2412.  
  2413. Note:  Index values must be unique in both the current accelerator table and 
  2414. the current action bar. 
  2415.  
  2416. Some of the VK_ constants are defined in STDCONST.E; the full set can be found 
  2417. in PMWIN.H in the OS/2 toolkit. 
  2418.  
  2419. See also: 
  2420.  
  2421. o Building Accelerator Tables from the Macro Language 
  2422. o ACTIVATEACCELTABLE 
  2423. o DELETEACCEL 
  2424. o QUERYACCELSTRING 
  2425.  
  2426.  
  2427. ΓòÉΓòÉΓòÉ 4.1.22. BUILDMENUITEM ΓòÉΓòÉΓòÉ
  2428.  
  2429. Choose: 
  2430.  
  2431. o Syntax 
  2432. o Definition 
  2433. o E Language Syntax 
  2434.  
  2435.  
  2436. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2437.  
  2438. BUILDMENUITEM 
  2439.  
  2440.  
  2441. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2442.  
  2443. Is used to build entries on the action bar menu. See Building Menus from the 
  2444. Macro Language for more information on the BUILDMENUITEM statement. 
  2445.  
  2446.  
  2447. ΓòÉΓòÉΓòÉ 4.1.23. BUILDSUBMENU ΓòÉΓòÉΓòÉ
  2448.  
  2449. Choose: 
  2450.  
  2451. o Syntax 
  2452. o Definition 
  2453. o E Language Syntax 
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2457.  
  2458. BUILDSUBMENU 
  2459.  
  2460.  
  2461. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2462.  
  2463. Is used to build sub menu entries on the action bar menu. 
  2464.  
  2465.  
  2466. ΓòÉΓòÉΓòÉ 4.1.24. CALL  procedurename() ΓòÉΓòÉΓòÉ
  2467.  
  2468. Choose: 
  2469.  
  2470. o Syntax 
  2471. o Definition 
  2472. o E Language Syntax 
  2473.  
  2474.  
  2475. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2476.  
  2477. CALL  procedurename 
  2478.  
  2479.  
  2480. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2481.  
  2482. Throws away the result of the procedure call. You could substitute any 
  2483. expression for procedurename, e.g. call 2*2, but typically it will be a 
  2484. procedure call such as "call machine()". 
  2485.  
  2486. Throwing away the result of a procedure call is often necessary because 
  2487. otherwise the result is executed.  If a procedure returns 0, the valid command 
  2488. '0' is executed which takes the cursor to the "Top of File" header (line 0). 
  2489.  
  2490. Generally is always advisable to use the call statement unless the returned 
  2491. value is used in some manner. 
  2492.  
  2493.  
  2494. ΓòÉΓòÉΓòÉ 4.1.25. CENTER(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2495.  
  2496. Choose: 
  2497.  
  2498. o Syntax 
  2499. o Definition 
  2500. o Example 
  2501. o E Language Syntax 
  2502.  
  2503.  
  2504. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2505.  
  2506. CENTER( string, length [, pad] ) 
  2507.  
  2508.  
  2509. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2510.  
  2511. Returns a string of length length with string centered in it, with pad 
  2512. characters added as necessary to make up length. The default pad character is a 
  2513. space. If the string is longer than length, it will be truncated at both ends 
  2514. to fit. If an odd number of characters are truncated or added, the right hand 
  2515. end loses or gains one more character than the left hand end. 
  2516.  
  2517.  
  2518. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2519.  
  2520. Here are some examples: 
  2521.  
  2522.  CENTER(abc,7)               ->    '  ABC  '
  2523.  CENTER(abc,8,'-')           ->    '--ABC---'
  2524.  CENTRE('The blue sky',8)    ->    'e blue s'
  2525.  CENTRE('The blue sky',7)    ->    'e blue '
  2526.  
  2527.  
  2528. ΓòÉΓòÉΓòÉ 4.1.26. CENTRE(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2529.  
  2530. Choose: 
  2531.  
  2532. o Syntax 
  2533. o Definition 
  2534. o Example 
  2535. o E Language Syntax 
  2536.  
  2537.  
  2538. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2539.  
  2540. CENTRE( string, length [, pad] ) 
  2541.  
  2542.  
  2543. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2544.  
  2545. (same as CENTER) 
  2546.  
  2547.  
  2548. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2549.  
  2550. (same as CENTER) 
  2551.  
  2552.  
  2553. ΓòÉΓòÉΓòÉ 4.1.27. CHR(numeric_expression) ΓòÉΓòÉΓòÉ
  2554.  
  2555. Choose: 
  2556.  
  2557. o Syntax 
  2558. o Definition 
  2559. o Example 
  2560. o E Language Syntax 
  2561.  
  2562.  
  2563. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2564.  
  2565. CHR( value ) 
  2566.  
  2567.  
  2568. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2569.  
  2570. Is the inverse of ASC(), CHR() returns the character corresponding to the ASCII 
  2571. value. 
  2572.  
  2573.  
  2574. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2575.  
  2576. For example, 
  2577.  
  2578. CHR( ASC('A') ) = 'A'
  2579. CHR(65)='A'
  2580.  
  2581.  
  2582. ΓòÉΓòÉΓòÉ 4.1.28. CIRCLEIT ΓòÉΓòÉΓòÉ
  2583.  
  2584. Choose: 
  2585.  
  2586. o Syntax 
  2587. o Definition 
  2588. o E Language Syntax 
  2589.  
  2590.  
  2591. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2592.  
  2593. CIRCLEIT style, line, col1, col2, attribute1, attribute2 
  2594.  
  2595.  
  2596. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2597.  
  2598. Draws a circle on the screen for highlighting a section of text. The circle 
  2599. goes away when the screen is refreshed.  'line' is the line number of the file 
  2600. to be highlighted, and col1 and col2 are the first and last columns.  There are 
  2601. five styles of circle; only the first two are available to EPM 5.51. 
  2602.  
  2603.  1. a perfect circle or oval. 
  2604.  
  2605.  2. a rougher version with the ends crossing rather than meeting, and drawn 
  2606.     using 2 different colors. 
  2607.  
  2608.  3. a wider version of (1). 
  2609.  
  2610.  4. a wider version of (2). 
  2611.  
  2612.  5. a perfect, solid (filled-in) circle or oval. 
  2613.  
  2614. In EPM 5.51, the highlighting is added by XORing onto the screen, so the color 
  2615. displayed is a function of the screen background color and can not be directly 
  2616. controlled.  ('Attribute' is currently unused.)  The two styles use different 
  2617. XOR masks. 
  2618.  
  2619. In EPM 6, the color of the highlighting is specified by attribute1 (and by 
  2620. attribute2 for the styles which use 2 colors).  The value for each can either 
  2621. be a number 0 to 15, corresponding to one of the foreground colors defined in 
  2622. COLORS.E, or it can be an XOR mask (indicated by adding 16,777,216 to the value 
  2623. of the desired mask).  An XOR mask is generally preferable, since the color 
  2624. will automatically be adjusted according to the background - a specific color 
  2625. might not show up if the background or mark color is the same color.  The 
  2626. values corresponding to the built-in defaults of EPM 5.51 are 16777220 for 
  2627. attribute1 and 16777218 for attribute2. 
  2628.  
  2629.  
  2630. ΓòÉΓòÉΓòÉ 4.1.29. COMPARE(string1, string2 [, pad] ) ΓòÉΓòÉΓòÉ
  2631.  
  2632. Choose: 
  2633.  
  2634. o Syntax 
  2635. o Definition 
  2636. o Example 
  2637. o E Language Syntax 
  2638.  
  2639.  
  2640. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2641.  
  2642. COMPARE( string1, string2 [, pad] ) 
  2643.  
  2644.  
  2645. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2646.  
  2647. Returns 0 if the strings, string1 and string2, are identical. If they are not, 
  2648. the returned number is non-zero and is the position of the first character that 
  2649. does not match. The shorter string is padded on the right with pad if 
  2650. necessary. The default pad character is a space. 
  2651.  
  2652.  
  2653. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2654.  
  2655. Here are some examples: 
  2656.  
  2657.  COMPARE('abc','abc')         ->    0
  2658.  COMPARE('abc','ak')          ->    2
  2659.  COMPARE('ab ','ab')          ->    0
  2660.  COMPARE('ab ','ab',' ')      ->    0
  2661.  COMPARE('ab ','ab','x')      ->    3
  2662.  COMPARE('ab-- ','ab','-')    ->    5
  2663.  
  2664.  
  2665. ΓòÉΓòÉΓòÉ 4.1.30. COPIES(string, n) ΓòÉΓòÉΓòÉ
  2666.  
  2667. Choose: 
  2668.  
  2669. o Syntax 
  2670. o Definition 
  2671. o Example 
  2672. o E Language Syntax 
  2673.  
  2674.  
  2675. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2676.  
  2677. COPIES( string, n ) 
  2678.  
  2679.  
  2680. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2681.  
  2682. Returns n concatenated copies of string. n must be positive or 0. 
  2683.  
  2684.  
  2685. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2686.  
  2687. Examples: 
  2688.  
  2689.     COPIES('abc',3)      ->    'abcabcabc'
  2690.     COPIES('abc',0)      ->    ''
  2691.  
  2692.  
  2693. ΓòÉΓòÉΓòÉ 4.1.31. COPYMARK ΓòÉΓòÉΓòÉ
  2694.  
  2695. Choose: 
  2696.  
  2697. o Syntax 
  2698. o Definition 
  2699. o E Language Syntax 
  2700.  
  2701.  
  2702. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2703.  
  2704. COPYMARK | COPY_MARK 
  2705.  
  2706.  
  2707. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2708.  
  2709. Copies marked text to cursor position, like standard Alt-C. 
  2710.  
  2711.  
  2712. ΓòÉΓòÉΓòÉ 4.1.32. COUNT(string1, string2) ΓòÉΓòÉΓòÉ
  2713.  
  2714. Choose: 
  2715.  
  2716. o Syntax 
  2717. o Definition 
  2718. o Definition 
  2719. o E Language Syntax 
  2720.  
  2721.  
  2722. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2723.  
  2724. COUNT( string1, string2 ) 
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2728.  
  2729. Returns the number of occurrances of string1 that appear in string2. 
  2730.  
  2731. Note:  This procedure is only available in EPM 5.60 or above.
  2732.  
  2733.  
  2734. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2735.  
  2736.  COUNT('abc','abcdef')     == 1
  2737.  COUNT('abc','abcabc')     == 2
  2738.  COUNT('abc','abxc')       == 0
  2739.  COUNT('xx ','xxx')        == 2
  2740.  
  2741.  
  2742. ΓòÉΓòÉΓòÉ 4.1.33. CURSOR_DIMENSIONS ΓòÉΓòÉΓòÉ
  2743.  
  2744. Choose: 
  2745.  
  2746. o Syntax 
  2747. o Definition 
  2748. o E Language Syntax 
  2749.  
  2750.  
  2751. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2752.  
  2753. CURSOR_DIMENSIONS cursorw, cursorh 
  2754.  
  2755.  
  2756. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2757.  
  2758. Queries or sets the cursor dimensions. 'cursorw' and 'cursorh' must be 
  2759. variables. If their values are question marks, they will be changed to reflect 
  2760. the current dimensions. If their values are numbers, this will set the size of 
  2761. the text cursor. A positive number represents that number of pixels; a negative 
  2762. number represents a proportional value of the size of the current character. 
  2763. The absolute value of that number is used as the number of 128ths of the height 
  2764. or width of the current character that the cursor should be drawn. 
  2765.  
  2766.  
  2767. ΓòÉΓòÉΓòÉ 4.1.34. C2X(string) ΓòÉΓòÉΓòÉ
  2768.  
  2769. Choose: 
  2770.  
  2771. o Syntax 
  2772. o Definition 
  2773. o Definition 
  2774. o E Language Syntax 
  2775.  
  2776.  
  2777. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2778.  
  2779. C2X( string ) 
  2780.  
  2781.  
  2782. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2783.  
  2784. Returns a printable hexadecimal representation of the binary string string. 
  2785.  
  2786.  
  2787. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2788.  
  2789.  C2X('abc123')       == '616263313233'
  2790.  C2X( \15' '\240 )   == '0f20f0'
  2791.  C2X( atoi(255) )    == 'ff00'
  2792.  
  2793.  
  2794. ΓòÉΓòÉΓòÉ 4.1.35. DELETE ΓòÉΓòÉΓòÉ
  2795.  
  2796. Choose: 
  2797.  
  2798. o Syntax 
  2799. o Definition 
  2800. o E Language Syntax 
  2801.  
  2802.  
  2803. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2804.  
  2805. DELETE 
  2806.  
  2807.  
  2808. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2809.  
  2810. Deletes the line the cursor is located on. Note that the statement DELETELINE 
  2811. allows parameters, but DELETE does not. 
  2812.  
  2813. Note:  Previously, DELETE_LINE was a synonym for DELETE. This was dropped 
  2814.        because it was felt that it was too confusing to have two statements, 
  2815.        DELETE_LINE and DELETELINE, with different behaviors.
  2816.  
  2817.  
  2818. ΓòÉΓòÉΓòÉ 4.1.36. DELETEACCEL ΓòÉΓòÉΓòÉ
  2819.  
  2820. Choose: 
  2821.  
  2822. o Syntax 
  2823. o Definition 
  2824. o E Language Syntax 
  2825.  
  2826.  
  2827. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2828.  
  2829. DELETEACCEL tablename 
  2830.  
  2831.  
  2832. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2833.  
  2834. Deletes the named accelerator table. 
  2835.  
  2836. See also: 
  2837.  
  2838. o Building Accelerator Tables from the Macro Language 
  2839. o ACTIVATEACCELTABLE 
  2840. o BUILDACCELTABLE 
  2841. o QUERYACCELSTRING 
  2842.  
  2843.  
  2844. ΓòÉΓòÉΓòÉ 4.1.37. DELETECHAR ΓòÉΓòÉΓòÉ
  2845.  
  2846. Choose: 
  2847.  
  2848. o Syntax 
  2849. o Definition 
  2850. o E Language Syntax 
  2851.  
  2852.  
  2853. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2854.  
  2855. DELETECHAR | DELETE_CHAR 
  2856.  
  2857.  
  2858. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2859.  
  2860. Deletes character under cursor, like standard Del. 
  2861.  
  2862.  
  2863. ΓòÉΓòÉΓòÉ 4.1.38. DELETELINE  [line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  2864.  
  2865. Choose: 
  2866.  
  2867. o Syntax 
  2868. o Definition 
  2869. o E Language Syntax 
  2870.  
  2871.  
  2872. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2873.  
  2874. DELETELINE  line_number [, {;}  fileid] 
  2875.  
  2876.  
  2877. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2878.  
  2879. Deletes a specified line from a specified file. Defaulted values for omitted 
  2880. parameters are line_number = current line, and fileid = current file. 
  2881.  
  2882. This is NOT the same as DELETE_LINE: see the clarification above, under DELETE. 
  2883.  
  2884.  
  2885. ΓòÉΓòÉΓòÉ 4.1.39. DELETEMARK ΓòÉΓòÉΓòÉ
  2886.  
  2887. Choose: 
  2888.  
  2889. o Syntax 
  2890. o Definition 
  2891. o E Language Syntax 
  2892.  
  2893.  
  2894. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2895.  
  2896. DELETEMARK | DELETE_MARK 
  2897.  
  2898.  
  2899. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2900.  
  2901. Deletes marked text, like standard Alt-D. 
  2902.  
  2903.  
  2904. ΓòÉΓòÉΓòÉ 4.1.40. DELETEMENU ΓòÉΓòÉΓòÉ
  2905.  
  2906. Choose: 
  2907.  
  2908. o Syntax 
  2909. o Definition 
  2910. o E Language Syntax 
  2911.  
  2912.  
  2913. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2914.  
  2915. DELETEMENU (stmt) 
  2916.  
  2917.  
  2918. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2919.  
  2920. Deletes a menu option or submenu option from the action bar. For more 
  2921. information on DELETEMENU see Building Menus from the Macro Language. 
  2922.  
  2923.  
  2924. ΓòÉΓòÉΓòÉ 4.1.41. DELSTR(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2925.  
  2926. Choose: 
  2927.  
  2928. o Syntax 
  2929. o Definition 
  2930. o Example 
  2931. o E Language Syntax 
  2932.  
  2933.  
  2934. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2935.  
  2936. DELSTR( string, n [, length] ) 
  2937.  
  2938.  
  2939. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2940.  
  2941. Deletes the substring of string that begins at the nth character, and is of 
  2942. length length, and returns the result. If length is not specified, the rest of 
  2943. string is deleted. If n is greater than the length of string, the string is 
  2944. returned unchanged. n must be positive. 
  2945.  
  2946.  
  2947. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2948.  
  2949. Here are some examples: 
  2950.  
  2951.  DELSTR('abcd',3)       ->    'ab'
  2952.  DELSTR('abcde',3,2)    ->    'abe'
  2953.  DELSTR('abcde',6)      ->    'abcde'
  2954.  
  2955.  
  2956. ΓòÉΓòÉΓòÉ 4.1.42. DELWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2957.  
  2958. Choose: 
  2959.  
  2960. o Syntax 
  2961. o Definition 
  2962. o Example 
  2963. o E Language Syntax 
  2964.  
  2965.  
  2966. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2967.  
  2968. DELWORD( string, n [,  length] ) 
  2969.  
  2970.  
  2971. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2972.  
  2973. Deletes the substring of string that begins at the nth word, and is of length 
  2974. length blank-delimited words, and returns the result. If length is not 
  2975. specified, the rest of string is deleted. n must be positive. If n is greater 
  2976. than the number of words in string, the string is returned unchanged. The 
  2977. string deleted includes any blanks following the final word involved. 
  2978.  
  2979.  
  2980. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2981.  
  2982. Here are some examples: 
  2983.  
  2984.  DELWORD('Now is the  time',2,2)  ->  'Now time'
  2985.  DELWORD('Now is the time ',3)    ->  'Now is '
  2986.  DELWORD('Now is the  time',5)    ->  'Now is the  time'
  2987.  
  2988.  
  2989. ΓòÉΓòÉΓòÉ 4.1.43. DIRECTORY([path]) ΓòÉΓòÉΓòÉ
  2990.  
  2991. Choose: 
  2992.  
  2993. o Syntax 
  2994. o Definition 
  2995. o Example 
  2996. o E Language Syntax 
  2997.  
  2998.  
  2999. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3000.  
  3001. DIRECTORY( [string_expression] ) 
  3002.  
  3003.  
  3004. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3005.  
  3006. Returns current directory. If path parameter is given, the current drive and 
  3007. path are changed accordingly. 
  3008.  
  3009. Note:  The drive and path are changed before the current directory is returned. 
  3010.  
  3011.  
  3012. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3013.  
  3014. This provides a way of verifying that a user-supplied path is valid. 
  3015.  
  3016. current_dir = directory()                                -- Save current
  3017. if upcase(directory(user_dir)) <> upcase(user_dir) then  -- Try user's
  3018.    sayerror 'Directory 'user_dir' is invalid.'           -- Warn
  3019. endif
  3020. call directory(current_dir)                              -- Restore
  3021.  
  3022.  
  3023. ΓòÉΓòÉΓòÉ 4.1.44. DISPLAY  '-4' | '-2' | '-1' | '1' | '2' | '4' ΓòÉΓòÉΓòÉ
  3024.  
  3025. Choose: 
  3026.  
  3027. o Syntax 
  3028. o Definition 
  3029. o Example 
  3030. o E Language Syntax 
  3031.  
  3032.  
  3033. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3034.  
  3035. DISPLAY -4|-2|-1|1|2|4 
  3036.  
  3037.  
  3038. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3039.  
  3040. Allows screen updates to be turned off (-1) or on (1); non-critical messages to 
  3041. be turned off (-2) or on (2); and errors to be forced to the message box (-4) 
  3042. or to the default messageline (4). 
  3043.  
  3044. These numbers can be combined. (DISPLAY -3 would turn off the screen updates 
  3045. and the error messages.) 
  3046.  
  3047. DISPLAY -1 prevents the screen from begin updated until a DISPLAY 1 statement 
  3048. is issued. This can eliminate files being flashed on the screen briefly while 
  3049. an application loads and manipulates files. 
  3050.  
  3051. When a DISPLAY 4 is in effect, all messages (unless explicitly sent to a dialog 
  3052. box) will be sent to: 
  3053.  
  3054.  1. first to the message line, unless toggled off; 
  3055.  2. next to the status line, unless toggled off; 
  3056.  3. or else overwrites the first line of text temporarily. 
  3057.  
  3058.  
  3059. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3060.  
  3061. An sample usage of DISPLAY is: 
  3062.  
  3063.   display -3            -- turn off display updates
  3064.   getfileid startfid    --      and error messages
  3065.   'xcom e profile.xxx'  -- load the profile
  3066.   getfileid profile_fid --      won't show on screen
  3067.   .visible = 0          -- make a hidden file
  3068.   'xcom 1 /define'      -- if not found, no error message
  3069.   activatefile startfid -- activate the file
  3070.   display 3             -- turn updates & messages on
  3071.  
  3072. In this example the user would see no screen flashing or "Not found" error 
  3073. message. 
  3074.  
  3075.  
  3076. ΓòÉΓòÉΓòÉ 4.1.45. DO ΓòÉΓòÉΓòÉ
  3077.  
  3078. Choose: 
  3079.  
  3080. o Syntax 
  3081. o Definition 
  3082. o E Language Syntax 
  3083.  
  3084.  
  3085. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3086.  
  3087. Is described in the section Conditional and Loop Statements. 
  3088.  
  3089.  
  3090. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3091.  
  3092. Is described in the section Conditional and Loop Statements. 
  3093.  
  3094.  
  3095. ΓòÉΓòÉΓòÉ 4.1.46. DO_ARRAY ΓòÉΓòÉΓòÉ
  3096.  
  3097. Choose: 
  3098.  
  3099. o Syntax 
  3100. o Definition 
  3101. o E Language Syntax 
  3102.  
  3103.  
  3104. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3105.  
  3106. DO_ARRAY 
  3107.  
  3108.  
  3109. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3110.  
  3111. Handles arrays in E. The DO_ARRAY statement can create an array, add to the 
  3112. array, and lookup information from the array. The syntax for these functions 
  3113. is: 
  3114.  
  3115. do_array 1, array_id, arrayname 
  3116.                                    Creates an array of arrayname and returns 
  3117.                                    the array_id in the variable array_id. 
  3118. do_array 2, array_id, index, value 
  3119.                                    Adds the value to the array under the index 
  3120.                                    in the array denoted by array_id. 
  3121. do_array 3, array_id, index, result 
  3122.                                    Looks up the contents of the index entry of 
  3123.                                    the array specified by array_id and places 
  3124.                                    the value into result.  If the index is not 
  3125.                                    found, an error message is given (Invalid 
  3126.                                    third parameter), the return code is set to 
  3127.                                    -330, and the result variable is set to the 
  3128.                                    null string. 
  3129. do_array 4, array_id, index 
  3130.                                    This will delete an entry specified, by 
  3131.                                    INDEX, from the array. 
  3132. do_array 6, array_id, array_name 
  3133.                                    Returns the array_id associated with the 
  3134.                                    array name specified by array_name 
  3135. do_array 7, array_id, index, result 
  3136.                                    (32-bit EPM only.)  Looks up the contents of 
  3137.                                    the index entry of the array specified by 
  3138.                                    array_id and places the value into result. 
  3139.                                    If the index is not found, the value of the 
  3140.                                    array's .userstring is returned, and no 
  3141.                                    error message is given, nor is the return 
  3142.                                    code set. 
  3143.  
  3144. See Arrays in EPM for more information on arrays and the DO_ARRAY statement. 
  3145.  
  3146.  
  3147. ΓòÉΓòÉΓòÉ 4.1.47. DO_OVERLAYWINDOWS ΓòÉΓòÉΓòÉ
  3148.  
  3149. Choose: 
  3150.  
  3151. o Syntax 
  3152. o Definition 
  3153. o E Language Syntax 
  3154.  
  3155.  
  3156. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3157.  
  3158. DO_OVERLAYWINDOWS 
  3159.  
  3160.  
  3161. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3162.  
  3163. Provides various functions for the manipulation of graphics within a document. 
  3164. Further information on graphics within EPM and the E Toolkit will be made 
  3165. available. 
  3166.  
  3167.  
  3168. ΓòÉΓòÉΓòÉ 4.1.48. DOWN ΓòÉΓòÉΓòÉ
  3169.  
  3170. Choose: 
  3171.  
  3172. o Syntax 
  3173. o Definition 
  3174. o E Language Syntax 
  3175.  
  3176.  
  3177. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3178.  
  3179. DOWN 
  3180.  
  3181.  
  3182. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3183.  
  3184. Moves the cursor down 1 line, like the standard Down key. 
  3185.  
  3186.  
  3187. ΓòÉΓòÉΓòÉ 4.1.49. DYNAFREE(library_name) ΓòÉΓòÉΓòÉ
  3188.  
  3189. Choose: 
  3190.  
  3191. o Syntax 
  3192. o Definition 
  3193. o E Language Syntax 
  3194.  
  3195.  
  3196. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3197.  
  3198. DYNAFREE( number ) 
  3199.  
  3200.  
  3201. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3202.  
  3203. Releases a dynalink library that has been previously called using the dynalink 
  3204. statment. Also see the DYNALINK and DYNALINKC statements for more information. 
  3205.  
  3206.  
  3207. ΓòÉΓòÉΓòÉ 4.1.50. DYNALINK(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3208.  
  3209. Choose: 
  3210.  
  3211. o Syntax 
  3212. o Definition 
  3213. o Example 
  3214. o E Language Syntax 
  3215.  
  3216.  
  3217. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3218.  
  3219. DYNALINK( library_name, function_name, parameter_stack [, 
  3220. number_of_return_words ]) 
  3221.  
  3222.  
  3223. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3224.  
  3225. Provides an interface between an E language program and external functions 
  3226. stored in a dynamic link library. The operating system functions are 
  3227. implemented via dynamic linking, and therefore DYNALINK() provides you with the 
  3228. full power of the operating system calls such as DosDelete, DosQFileMode, 
  3229. DosDevIOCtl, and video input/output calls such as VioWrtTty, VioWrtCharStrAtt, 
  3230. and much more. DYNALINK() allows you to call any dynamic link library that 
  3231. exists (files with a .DLL extension). Since application writers can develop 
  3232. general purpose dynamic link libraries, E programs can call functions written 
  3233. in other languages. For example, let us say that the "C" library functions are 
  3234. available via a dynamic link library, then we may call the library functions 
  3235. from an E program; or suppose that a spell checking dynamic link library 
  3236. exists, DYNALINK() allows you to use the spell checking. 
  3237.  
  3238. This procedure is the protect-mode equivalent of the INT86X() function of E3. 
  3239. For more information on the system functions or dynamic link libraries, please 
  3240. refer to The OS/2 Technical Reference. 
  3241.  
  3242. In order to make a system call, you must provide the following parameters to 
  3243. dynalink(): 
  3244.  
  3245. library_name             the name of the dynalink library (e.g. file 
  3246.                          library_name.DLL) which contains the function you wish 
  3247.                          to call. 
  3248.  
  3249. function_name             this is a string containing the function name in most 
  3250.                          cases. However if you are making calls to some DOS 
  3251.                          functions (DOS functions being those whose names begin 
  3252.                          with 'Dos') that are contained within the DOSCALLS.DLL 
  3253.                          library, the function name is actually the ordinal 
  3254.                          value of the DOS function, preceded by a '#'. These 
  3255.                          numbers can be found in Ordinal Values of Functions 
  3256.                          Accessed via DOSCALLS.DLL. 
  3257.  
  3258. parameter_stack          a string consisting of all of the parameters expected 
  3259.                          by the function, concatenated together into one 
  3260.                          string. Those parameters that the function requires to 
  3261.                          be pushed on the parameter stack first should appear 
  3262.                          first when concatenating. Parameter information is 
  3263.                          dependent upon the function to be called, and can be 
  3264.                          found in The OS/2 Technical Reference. 
  3265.  
  3266. number_of_return_words   an optional parameter that allows one to set the size 
  3267.                          of the return code variable that the system should 
  3268.                          expect to receive from the dynamic link function. This 
  3269.                          parameter is provided for those dynalink library 
  3270.                          functions whose return code is a long int rather than 
  3271.                          simply an int. If the user simply uses DYNALINK() for 
  3272.                          system calls to DOS and OS/2 functions, this parameter 
  3273.                          need never be specified. The default value is 1. 
  3274.  
  3275.  
  3276. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3277.  
  3278. The numeric parameters passed by the E program must be converted from string 
  3279. form to the proper C data type via E functions like ATOI(), ATOL(), SELECTOR(), 
  3280. and OFFSET(), as shown below: 
  3281.  
  3282. defc hello =
  3283. string = 'hello'
  3284. result = dynalink( 'VIOCALLS',       /* library name   */
  3285.                    'VIOWRTTTY',      /* function name  */
  3286.                    selector(string) ||    /* address of */
  3287.                    offset(string) ||      /*   string   */
  3288.                    atoi(length(string)) ||/* length     */
  3289.                    atoi(0) )         /* vio handle     */
  3290.  
  3291. defc curdir2 =
  3292. /* create empty strings for DosQCurDir() to fill */
  3293. string = atoi(80) || substr('',1,80)
  3294. stringlen_b = substr('',1,2)
  3295. result = dynalink( 'DOSCALLS',  /* library name */
  3296.                    '#71',       /* ordinal of DosQCurDir */
  3297.                    atoi(0) ||          /* drive number    */
  3298.                    selector(string) || /* address of      */
  3299.                    offset(string) ||   /*  DirPath buffer */
  3300.                    selector(stringlen_b) || /* address of */
  3301.                    offset(stringlen_b) )   /* buf length */
  3302. stringlen = itoa(stringlen_b,10);
  3303. sayerror 'The current directory is "' ||
  3304.          substr(string,1,stringlen) || '".'
  3305.  
  3306. defc beep =
  3307. result = dynalink( 'DOSCALLS',  /* library name          */
  3308.                    '#50',       /* ordinal of Dos Beep() */
  3309.                    atoi(3000) ||  /* frequency of beep    */
  3310.                    atoi(1000) )  /* duration of beep     */
  3311.  
  3312. defc clear_semaphore =
  3313. result = dynalink( 'DOSCALL1',    /* library name     */
  3314.                    'DOSSEMCLEAR', /* function name    */
  3315.                    atol(handle) ) /* semaphore handle */
  3316.  
  3317.  
  3318. ΓòÉΓòÉΓòÉ 4.1.51. DYNALINKC(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3319.  
  3320. Choose: 
  3321.  
  3322. o Syntax 
  3323. o Definition 
  3324. o E Language Syntax 
  3325.  
  3326.  
  3327. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3328.  
  3329. DYNALINKC( library_name, function_name, parameter_stack [, 
  3330. number_of_return_words ]) 
  3331.  
  3332.  
  3333. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3334.  
  3335. Is used to load and pass information to a dynalink library. It is like the 
  3336. DYNALINK() procedure except that it passes its parameters using the C language 
  3337. parameter passing convention rather than the Pascal convention. See the file 
  3338. DYNATEST.E for examples of the use of DYNALINKC(). Also see DYNAFREE() for 
  3339. information about releasing a dynalink library and DYNALINK() for information 
  3340. about calling a dynalink library procedure using standard Pascal parameter 
  3341. passing conventions. 
  3342.  
  3343.  
  3344. ΓòÉΓòÉΓòÉ 4.1.52. DYNALINK32(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3345.  
  3346. Choose: 
  3347.  
  3348. o Syntax 
  3349. o Definition 
  3350. o E Language Syntax 
  3351.  
  3352.  
  3353. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3354.  
  3355. DYNALINK32( library_name, function_name, parameter_stack [, 
  3356. number_of_return_words ]) 
  3357.  
  3358.  
  3359. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3360.  
  3361. Is used to load and pass information to a dynalink library. It is like the 
  3362. DYNALINKC() procedure except that it is used for calling 32-bit DLLs. 
  3363.  
  3364. Note:  This procedure is only available in EPM 5.60 or above.
  3365.  
  3366.  
  3367. ΓòÉΓòÉΓòÉ 4.1.53. ECHO( 'on'|'off' ) ΓòÉΓòÉΓòÉ
  3368.  
  3369. Choose: 
  3370.  
  3371. o Syntax 
  3372. o Definition 
  3373. o E Language Syntax 
  3374.  
  3375.  
  3376. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3377.  
  3378. ECHO( [ON | OFF] ) 
  3379.  
  3380.  
  3381. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3382.  
  3383. Displays the command about to be executed. This is useful for debugging E code. 
  3384.  
  3385.  
  3386. ΓòÉΓòÉΓòÉ 4.1.54. ENDLINE ΓòÉΓòÉΓòÉ
  3387.  
  3388. Choose: 
  3389.  
  3390. o Syntax 
  3391. o Definition 
  3392. o E Language Syntax 
  3393.  
  3394.  
  3395. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3396.  
  3397. ENDLINE | END_LINE 
  3398.  
  3399.  
  3400. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3401.  
  3402. Positions the cursor at end of current line, like standard End. 
  3403.  
  3404.  
  3405. ΓòÉΓòÉΓòÉ 4.1.55. ERASEENDLINE ΓòÉΓòÉΓòÉ
  3406.  
  3407. Choose: 
  3408.  
  3409. o Syntax 
  3410. o Definition 
  3411. o E Language Syntax 
  3412.  
  3413.  
  3414. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3415.  
  3416. ERASEENDLINE | ERASE_END_LINE 
  3417.  
  3418.  
  3419. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3420.  
  3421. Erases the rest of current line starting at cursor position, like standard 
  3422. Ctrl-E. 
  3423.  
  3424.  
  3425. ΓòÉΓòÉΓòÉ 4.1.56. EXECUTE ΓòÉΓòÉΓòÉ
  3426.  
  3427. Choose: 
  3428.  
  3429. o Syntax 
  3430. o Definition 
  3431. o E Language Syntax 
  3432.  
  3433.  
  3434. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3435.  
  3436. EXECUTE 
  3437.  
  3438.  
  3439. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3440.  
  3441. Executes the contents of the command dialog box. 
  3442.  
  3443.  
  3444. ΓòÉΓòÉΓòÉ 4.1.57. EXECUTEKEY key ΓòÉΓòÉΓòÉ
  3445.  
  3446. Choose: 
  3447.  
  3448. o Syntax 
  3449. o Definition 
  3450. o E Language Syntax 
  3451.  
  3452.  
  3453. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3454.  
  3455. EXECUTEKEY keyname | identifier 
  3456.  
  3457.  
  3458. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3459.  
  3460. Interprets key as if typed by user; key may be any valid expression. This is 
  3461. very similar to the KEY statement, except that KEY can take only a literal key 
  3462. name as in KEY A_L.  EXECUTEKEY can take a variable, as in k=page_down; 
  3463. executekey k.  In fact the KEY statement is superfluous, since EXECUTEKEY can 
  3464. be given a literal key name. 
  3465.  
  3466.  
  3467. ΓòÉΓòÉΓòÉ 4.1.58. EXIT ΓòÉΓòÉΓòÉ
  3468.  
  3469. Choose: 
  3470.  
  3471. o Syntax 
  3472. o Definition 
  3473. o E Language Syntax 
  3474.  
  3475.  
  3476. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3477.  
  3478. EXIT [return_code] 
  3479.  
  3480.  
  3481. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3482.  
  3483. Exits the current E macro and all calling macros. This is useful to halt a 
  3484. macro execution if a fatal error is generated. See the RETURN statement to exit 
  3485. only the current macro. 
  3486.  
  3487. A return code can be given as an argument. 
  3488.  
  3489.  
  3490. ΓòÉΓòÉΓòÉ 4.1.59. FILECOMPARE( fileid1, fileid2 [, flag] ) ΓòÉΓòÉΓòÉ
  3491.  
  3492. New in EPM 6. 
  3493.  
  3494. Choose: 
  3495.  
  3496. o Syntax 
  3497. o Definition 
  3498. o Example 
  3499. o E Language Syntax 
  3500.  
  3501.  
  3502. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3503.  
  3504. FILECOMPARE( fileid1, fileid2, [, flags ] ) 
  3505.  
  3506.  
  3507. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3508.  
  3509. Compares the 2 files, starting at the current line of each, and stopping on the 
  3510. first mismatch or when the end of one file is reached. The return value is 0 if 
  3511. there were no differences, 1 if a mismatch occurred, and 2 if the end of only 
  3512. one file was reached. The default value for flags is 0.  Possible values are 
  3513. any combination of: 
  3514.  
  3515. 1   Ignore differences in the number of leading and trailing spaces on each 
  3516.     line. 
  3517. 2   Perform a case-insensitive comparison. 
  3518. 4   Compare only a single pair of lines. 
  3519.  
  3520.  
  3521. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3522.  
  3523. See EPMCOMP.E for an example of the use of this function. 
  3524.  
  3525.  
  3526. ΓòÉΓòÉΓòÉ 4.1.60. FILESINRING( [number] ) ΓòÉΓòÉΓòÉ
  3527.  
  3528. Choose: 
  3529.  
  3530. o Syntax 
  3531. o Definition 
  3532. o E Language Syntax 
  3533.  
  3534.  
  3535. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3536.  
  3537. FILESINRING( [ number ] ) 
  3538.  
  3539.  
  3540. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3541.  
  3542. Returns the number of files in the ring. If number is 0 or missing, the number 
  3543. of normal files in the ring is returned. If number is 1 the total number of 
  3544. files is returned, including hidden files and arrays. If number is 2 the 
  3545. maximum number of files currently allocated is returned. This corresponds to 
  3546. the size of an internal structure, and in the current release will always be a 
  3547. power of 2. An attempt to load more than this number of files will result in a 
  3548. new structure being allocated, with room for twice as many files. 
  3549.  
  3550.  
  3551. ΓòÉΓòÉΓòÉ 4.1.61. FILESIZE() ΓòÉΓòÉΓòÉ
  3552.  
  3553. Choose: 
  3554.  
  3555. o Syntax 
  3556. o Definition 
  3557. o E Language Syntax 
  3558.  
  3559.  
  3560. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3561.  
  3562. FILESIZE() 
  3563.  
  3564.  
  3565. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3566.  
  3567. Returns sum of the lengths of each line in the file. 
  3568.  
  3569.  
  3570. ΓòÉΓòÉΓòÉ 4.1.62. FILLMARK [character] ΓòÉΓòÉΓòÉ
  3571.  
  3572. Choose: 
  3573.  
  3574. o Syntax 
  3575. o Definition 
  3576. o E Language Syntax 
  3577.  
  3578.  
  3579. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3580.  
  3581. FILLMARK [ 'character' ] | FILL_MARK [ 'character' ] 
  3582.  
  3583.  
  3584. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3585.  
  3586. If a character is given, fills the marked area with character. If no character 
  3587. is specified, the user is asked to type a character for the fill.  Like the 
  3588. standard Alt-F. 
  3589.  
  3590.  
  3591. ΓòÉΓòÉΓòÉ 4.1.63. FINDFILE  destfilename, filename [,environment_path_variable, ('P'|'D') ] ΓòÉΓòÉΓòÉ
  3592.  
  3593. Choose: 
  3594.  
  3595. o Syntax 
  3596. o Definition 
  3597. o Example 
  3598. o E Language Syntax 
  3599.  
  3600.  
  3601. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3602.  
  3603. FINDFILE filename , destfilename [, environment_path_variable, (P|D)] 
  3604.  
  3605.  
  3606. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3607.  
  3608. Searches for filename in the current directory and returns its entire pathname 
  3609. in destfilename. 
  3610.  
  3611. Note:  This statement depends upon the program FILEFIND.EXE, which is available 
  3612. on the PCTOOLS disk. You must download this into a directory which is in your 
  3613. PATH environment variable (or the same directory as the E files) before this 
  3614. statement will work properly. 
  3615.  
  3616. The 'P' option specifies program searching. It forces a search for a file with 
  3617. the extension .EXE or .CMD in each directory named in the 
  3618. environment_path_variable.  If environment_path_variable is "PATH", the effect 
  3619. is the same as a normal OS/2 program search.  Some variable other than path can 
  3620. be specified, for example "EPMPATH", and that string will be looked up in the 
  3621. environment.  (The area where OS/2 keeps strings SET by the user.) 
  3622.  
  3623. The 'P' option also checks whether the filename is an internal OS/2 command. 
  3624. If so, destfilename is set up for invocation of the command processor, with 
  3625. "COMMAND.COM /C" at the start. 
  3626.  
  3627. If the 'D' option is used, the third parameter (environment_path_variable) is 
  3628. ignored (although at least a null string must be passed in anyway). The 'D' 
  3629. option will cause filename to be searched for in the following directories: 
  3630.  
  3631.  1. the current directory, and then 
  3632.  
  3633.  2. the directories listed in the EPMPATH environment variable (if it is 
  3634.     defined), and then 
  3635.  
  3636.  3. the directories in the DPATH environment variable, and then 
  3637.  
  3638.  4. the same directory as the file EPM.EXE. 
  3639.  
  3640. An example of usage is: 
  3641.  
  3642. findfile complete_filespec, 'e3help.hlp', '', 'D'
  3643.  
  3644.  
  3645. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3646.  
  3647. Examples: 
  3648.  
  3649.    findfile cmdline,'dir','','P'
  3650.       If rc is zero (no error) then cmdline could
  3651.       be 'C:\COMMAND.COM /C dir'
  3652.  
  3653.    findfile cmdline,'subdir','PATH','P'
  3654.       If rc is zero then cmdline could
  3655.       be 'C:\UTIL\subdir.com'
  3656.  
  3657.  
  3658. ΓòÉΓòÉΓòÉ 4.1.64. FOR ΓòÉΓòÉΓòÉ
  3659.  
  3660. Choose: 
  3661.  
  3662. o Syntax 
  3663. o Definition 
  3664. o E Language Syntax 
  3665.  
  3666.  
  3667. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3668.  
  3669. Is described in section Conditional and Loop Statements. 
  3670.  
  3671.  
  3672. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3673.  
  3674. Is described in section Conditional and Loop Statements. 
  3675.  
  3676.  
  3677. ΓòÉΓòÉΓòÉ 4.1.65. GETFILEID ΓòÉΓòÉΓòÉ
  3678.  
  3679. Choose: 
  3680.  
  3681. o Syntax 
  3682. o Definition 
  3683. o E Language Syntax 
  3684.  
  3685.  
  3686. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3687.  
  3688. GETFILEID  identifier [ ',' {';'} string_expression] 
  3689.  
  3690.  
  3691. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3692.  
  3693. Is described in the section Fileid Structure. 
  3694.  
  3695.  
  3696. ΓòÉΓòÉΓòÉ 4.1.66. GETKEYSTATE( virtual_key_code ) ΓòÉΓòÉΓòÉ
  3697.  
  3698. Choose: 
  3699.  
  3700. o Syntax 
  3701. o Definition 
  3702. o E Language Syntax 
  3703.  
  3704.  
  3705. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3706.  
  3707. GETKEYSTATE(number ) 
  3708.  
  3709.  
  3710. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3711.  
  3712. Is used to test the shift state of the shift keys. This statement replaces E's 
  3713. previous statements of: GETSHIFTSTATE and SETSHIFTSTATE. The syntax for EPM's 
  3714. GETKEYSTATE is: 
  3715.  
  3716.   keystate = getshiftstate( virtual_key_code)
  3717.  
  3718. where the virtual_key_code is one of the VK codes from PMWIN.H. For 
  3719. convenience, the returned test states of VK codes (like PositiveOdd and 
  3720. NegativeEven) have been converted to single values as follows: 
  3721.  
  3722.   KS_DOWN       1  (NegativeEven; key is down)
  3723.   KS_DOWNTOGGLE 2  (NEgativeOdd; key is down + toggled)
  3724.   KS_UP         3  (PositiveEven; key is up)
  3725.   KS_UPTOGGLE   4  (PostiveOdd; key is up + toggled)
  3726.  
  3727.  
  3728. ΓòÉΓòÉΓòÉ 4.1.67. GETLINE  var line [, line_number  [, var fileid] ] ΓòÉΓòÉΓòÉ
  3729.  
  3730. Choose: 
  3731.  
  3732. o Syntax 
  3733. o Definition 
  3734. o Example 
  3735. o E Language Syntax 
  3736.  
  3737.  
  3738. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3739.  
  3740. GETLINE   line [, {;} line_number [ , {;} fileid] ] 
  3741.  
  3742.  
  3743. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3744.  
  3745. Gets a specified line from a specified file into the variable line. Defaulted 
  3746. values for omitted parameters are line_number = current line, and fileid = 
  3747. current file. 
  3748.  
  3749.  
  3750. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3751.  
  3752. For example: 
  3753.  
  3754. GETLINE line
  3755. /* line = current line of current file */
  3756.  
  3757. GETLINE  line, 7
  3758. /* line = line 7 of current file */
  3759.  
  3760. GETLINE  line, 3, ThatFile
  3761. /* line = line 3 of file whose fileid
  3762.      is in variable ThatFile */
  3763. The statement: 
  3764.  
  3765. GETLINE line, 0
  3766. results in the variable line being set to null. 
  3767.  
  3768.  
  3769. ΓòÉΓòÉΓòÉ 4.1.68. GETMARK var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3770.  
  3771. Choose: 
  3772.  
  3773. o Syntax 
  3774. o Definition 
  3775. o Example 
  3776. o E Language Syntax 
  3777.  
  3778.  
  3779. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3780.  
  3781. GETMARK first_line [, {;} last_line [, {;} first_col [, {;} last_col [ , {;} 
  3782. mark_fileid ] ] ] 
  3783.  
  3784.  
  3785. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3786.  
  3787. Returns the current mark coordinates and fileid. If no mark exists, the values 
  3788. returned are meaningless; use the function MARKTYPE() to precheck whether a 
  3789. mark exists. 
  3790.  
  3791.  
  3792. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3793.  
  3794. IF MARKTYPE()<>'' THEN /* text marked? */
  3795.    /* Get active mark coordinates and fileid */
  3796.    GETMARK  first_line, last_line,first_col,
  3797.             last_col, mark_fileid
  3798. ENDIF
  3799.  
  3800.  
  3801. ΓòÉΓòÉΓòÉ 4.1.69. GETMARKG var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3802.  
  3803. Choose: 
  3804.  
  3805. o Syntax 
  3806. o Definition 
  3807. o E Language Syntax 
  3808.  
  3809.  
  3810. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3811.  
  3812. GETMARKG  first_line [, {;} last_line [, {;} first_col [, {;} last_col [, {;} 
  3813. mark_fileid ] ] ] 
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3817.  
  3818. Like GETMARK in that it returns the current mark coordinates and fileid, but 
  3819. unlike GETMARK, the last_col parameter of GETMARKG represents the right edge of 
  3820. the mark as opposed to the last column in the mark. 
  3821.  
  3822.  
  3823. ΓòÉΓòÉΓòÉ 4.1.70. GETPMINFO (function ) ΓòÉΓòÉΓòÉ
  3824.  
  3825. Choose: 
  3826.  
  3827. o Syntax 
  3828. o Definition 
  3829. o E Language Syntax 
  3830.  
  3831.  
  3832. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3833.  
  3834. GETPMINFO( parameter ) 
  3835.  
  3836.  
  3837. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3838.  
  3839. The following are constants values that are to be used as parameters to the 
  3840. getpminfo internal function: 
  3841.  
  3842.   HAB             0      EDITORMSGAREA       8
  3843.   OWNERCLIENT     1      EDITORVSCROLL       9
  3844.   OWNERFRAME      2      EDITORHSCROLL      10
  3845.   PARENTCLIENT    3      EDITORINTERPRETER  11
  3846.   PARENTFRAME     4      EDITVIOPS          12
  3847.   EDITCLIENT      5      EDITTITLEBAR       13
  3848.   EDITFRAME       6      EDITCURSOR         14
  3849.   EDITSTATUSAREA  7
  3850.  
  3851. Depending on the parameter passed, certain PM information will be returned. See 
  3852. the OS/2 Reference Manual for more information on the meanings of these 
  3853. constants and the meaning of the information returned. 
  3854.  
  3855. Also the the file STDCTRL.E for sample usage of the GETPMINFO command. 
  3856.  
  3857.  
  3858. ΓòÉΓòÉΓòÉ 4.1.71. GETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  3859.  
  3860. Choose: 
  3861.  
  3862. o Syntax 
  3863. o Definition 
  3864. o E Language Syntax 
  3865.  
  3866.  
  3867. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3868.  
  3869. GETSEARCH identifier 
  3870.  
  3871.  
  3872. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3873.  
  3874. Saves last search command in string variable search_cmd. See the SETSEARCH 
  3875. command for retrieving such a command, and examples of usage. 
  3876.  
  3877.  
  3878. ΓòÉΓòÉΓòÉ 4.1.72. HEX( character ) ΓòÉΓòÉΓòÉ
  3879.  
  3880. Choose: 
  3881.  
  3882. o Syntax 
  3883. o Definition 
  3884. o Example 
  3885. o E Language Syntax 
  3886.  
  3887.  
  3888. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3889.  
  3890. HEX( 'character' ) 
  3891.  
  3892.  
  3893. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3894.  
  3895. Returns the hexadecimal value associated with the ASCII representation of 
  3896. character. 
  3897.  
  3898.  
  3899. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3900.  
  3901. HEX('A') = 41
  3902.  
  3903.  
  3904. ΓòÉΓòÉΓòÉ 4.1.73. IF - THEN - ELSE ΓòÉΓòÉΓòÉ
  3905.  
  3906. Choose: 
  3907.  
  3908. o Syntax 
  3909. o Definition 
  3910. o E Language Syntax 
  3911.  
  3912.  
  3913. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3914.  
  3915. Is described in Conditional and Loop Statements. 
  3916.  
  3917.  
  3918. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3919.  
  3920. Is described in Conditional and Loop Statements. 
  3921.  
  3922.  
  3923. ΓòÉΓòÉΓòÉ 4.1.74. INCLUDE ΓòÉΓòÉΓòÉ
  3924.  
  3925. Choose: 
  3926.  
  3927. o Syntax 
  3928. o Definition 
  3929. o E Language Syntax 
  3930.  
  3931.  
  3932. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3933.  
  3934. Is described in section Compiler Directive Statements and in The EPM User's 
  3935. Guide. 
  3936.  
  3937.  
  3938. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3939.  
  3940. Is described in section Compiler Directive Statements and in The EPM User's 
  3941. Guide. 
  3942.  
  3943.  
  3944. ΓòÉΓòÉΓòÉ 4.1.75. INSERT ΓòÉΓòÉΓòÉ
  3945.  
  3946. Choose: 
  3947.  
  3948. o Syntax 
  3949. o Definition 
  3950. o E Language Syntax 
  3951.  
  3952.  
  3953. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3954.  
  3955. INSERT 
  3956.  
  3957.  
  3958. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3959.  
  3960. Inserts a new line after the current line and position cursor in same column of 
  3961. new line as the first non-empty column of the previous line. 
  3962.  
  3963. Note:  Previously, INSERT_LINE was a synonym for INSERT. This was dropped 
  3964.        because it was felt that it was too confusing to have two statements, 
  3965.        INSERT_LINE and INSERTLINE, with different behaviors.
  3966.  
  3967.  
  3968. ΓòÉΓòÉΓòÉ 4.1.76. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] ΓòÉΓòÉΓòÉ
  3969.  
  3970. Choose: 
  3971.  
  3972. o Syntax 
  3973. o Definition 
  3974. o Example 
  3975. o E Language Syntax 
  3976.  
  3977.  
  3978. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3979.  
  3980. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] 
  3981.  
  3982.  
  3983. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3984.  
  3985. This statement (non destructively) inserts an attribute record at the specified 
  3986. location. 
  3987.  
  3988. Class   The class of the attribute record to be inserted. 
  3989.  
  3990. Value   The value field of the attribute record to be inserted. 
  3991.  
  3992. IsPush  The support field of the attribute to insert. 
  3993.  
  3994. Offset  The offset of the position being queried.  Offsets must be negative, 
  3995.         and indicate a position before the specified character location. 
  3996.  
  3997.                  ...[ar-2][ar-1][char]...
  3998.         If a negative offset is specified that is less (more negative) than the 
  3999.         smallest offset of an attribute record at the specified column, then 
  4000.         the new attribute record is placed at an offset that is one less than 
  4001.         the smallest offset. 
  4002.  
  4003.         If an attribute record already exists at the specified offset, then the 
  4004.         old attribute record (and any attribute records at an offset of larger 
  4005.         magnitude) is shifted to an offset of greater magnitude to vacate the 
  4006.         specified offset for the new attribute record. 
  4007.  
  4008. Column  The column number where the new attribute record should be placed.  If 
  4009.         this parameter is omitted, the current column of the cursor is assumed. 
  4010.  
  4011. Line    The line number where the new attribute record should be placed.  If 
  4012.         this parameter is omitted, the current line number of the cursor is 
  4013.         assumed. 
  4014.  
  4015. Fileid  The fileid of the file where the new attribute record should be placed. 
  4016.         If this parameter is omitted, the active file is assumed. 
  4017.  
  4018. See Attribute Pairs for additional information on attributes. 
  4019.  
  4020.  
  4021. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4022.  
  4023.    class = 1  -- COLOR_CLASS
  4024.    val = Red + WhiteB  -- Red on a white background
  4025.    insert_attribute class, val, 1, -1, 1
  4026.    insert_attribute class, val, 0, -1, length(textline(.line))+1
  4027.    if not (.levelofattributesupport // 2) then  -- Turn on mixed color support
  4028.       .levelofattributesupport = .levelofattributesupport + 1
  4029.    endif
  4030.  
  4031. This will color the current line red.  Note that the pop attribute is put at 
  4032. the end of the line + 1, since it attaches to the left side of a character, and 
  4033. we want the last character to be colored as well. 
  4034.  
  4035.  
  4036. ΓòÉΓòÉΓòÉ 4.1.77. INSERTLINE new_line [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  4037.  
  4038. Choose: 
  4039.  
  4040. o Syntax 
  4041. o Definition 
  4042. o Example 
  4043. o E Language Syntax 
  4044.  
  4045.  
  4046. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4047.  
  4048. INSERTLINE  new_line [,{;} line_number [, {;} fileid] ] 
  4049.  
  4050.  
  4051. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4052.  
  4053. Inserts contents of variable new_line just before the designated line of a 
  4054. specified file. Defaulted values for omitted parameters are line_number = 
  4055. current line, and fileid = current file. Without arguments INSERTLINE is 
  4056. identical to the INSERT statement. 
  4057.  
  4058.  
  4059. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4060.  
  4061. INSERTLINE line
  4062. /* inserts line before current line of current file */
  4063.  
  4064. INSERTLINE  line, 7
  4065. /* inserts line before line 7 of current file */
  4066.  
  4067. INSERTLINE  line, 3, ThatFile
  4068. /* inserts line before line 3 of file whose fileid
  4069.      is in variable ThatFile */
  4070.  
  4071.  
  4072. ΓòÉΓòÉΓòÉ 4.1.78. INSERTSTATE() ΓòÉΓòÉΓòÉ
  4073.  
  4074. Choose: 
  4075.  
  4076. o Syntax 
  4077. o Definition 
  4078. o E Language Syntax 
  4079.  
  4080.  
  4081. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4082.  
  4083. INSERTSTATE() 
  4084.  
  4085.  
  4086. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4087.  
  4088. Returns the insert state of EPM. A 1 means insert mode is active; 0 means 
  4089. overwrite mode is active. 
  4090.  
  4091.  
  4092. ΓòÉΓòÉΓòÉ 4.1.79. INSERTSTR(new, target [, n [, length [, pad ]]]) ΓòÉΓòÉΓòÉ
  4093.  
  4094. Choose: 
  4095.  
  4096. o Syntax 
  4097. o Definition 
  4098. o E Language Syntax 
  4099.  
  4100.  
  4101. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4102.  
  4103. INSERTSTR( new , target   [,  n [,  length   [,  pad]]] ) 
  4104.  
  4105.  
  4106. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4107.  
  4108. Inserts the string new, padded to length length, into the string target after 
  4109. the nth character. length and n must be non-negative. If n is greater than the 
  4110. length of the target string, padding is added there also. The default pad 
  4111. character is a blank. The default value for n is 0, which means insert before 
  4112. the beginning of the string. 
  4113.  
  4114.  
  4115. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4116.  
  4117. Here are some examples: 
  4118.  
  4119.  INSERTSTR(' ','abcdef',3)         ->    'abc def'
  4120.  INSERTSTR('123','abc',5,6)        ->    'abc  123   '
  4121.  INSERTSTR('123','abc',5,6,'+')    ->    'abc++123+++'
  4122.  INSERTSTR('123','abc')            ->    '123abc'
  4123.  INSERTSTR('123','abc',,5,'-')     ->    '123--abc'
  4124.  
  4125.  
  4126. ΓòÉΓòÉΓòÉ 4.1.80. INSERTTOGGLE ΓòÉΓòÉΓòÉ
  4127.  
  4128. Choose: 
  4129.  
  4130. o Syntax 
  4131. o Definition 
  4132. o E Language Syntax 
  4133.  
  4134.  
  4135. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4136.  
  4137. INSERTTOGGLE | INSERT_TOGGLE 
  4138.  
  4139.  
  4140. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4141.  
  4142. Toggles cursor from insert mode to replace mode and vice versa.  Like pressing 
  4143. the standard Ins key. 
  4144.  
  4145.  
  4146. ΓòÉΓòÉΓòÉ 4.1.81. ISADEFC ΓòÉΓòÉΓòÉ
  4147.  
  4148. Choose: 
  4149.  
  4150. o Syntax 
  4151. o Definition 
  4152. o Example 
  4153. o E Language Syntax 
  4154.  
  4155.  
  4156. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4157.  
  4158. ISADEFC ( expression ) 
  4159.  
  4160.  
  4161. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4162.  
  4163. Boolean function that tells whether or not a macro-defined command with the 
  4164. given name exists. 
  4165.  
  4166.  
  4167. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4168.  
  4169. if isadefc('mysave') then
  4170.    'mysave' arg(1)
  4171. endif
  4172.  
  4173.  
  4174. ΓòÉΓòÉΓòÉ 4.1.82. ISADEFPROC ΓòÉΓòÉΓòÉ
  4175.  
  4176. Choose: 
  4177.  
  4178. o Syntax 
  4179. o Definition 
  4180. o Example 
  4181. o E Language Syntax 
  4182.  
  4183.  
  4184. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4185.  
  4186. ISADEFPROC ( expression ) 
  4187.  
  4188.  
  4189. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4190.  
  4191. Boolean function that tells whether or not a macro-defined procedure with the 
  4192. given name exists. 
  4193.  
  4194.  
  4195. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4196.  
  4197. if ISADEFPROC('myfunction') then
  4198.    call myfunction('Exiting')
  4199. endif
  4200.  
  4201.  
  4202. ΓòÉΓòÉΓòÉ 4.1.83. ISADIRTYLINE ΓòÉΓòÉΓòÉ
  4203.  
  4204. Choose: 
  4205.  
  4206. o Syntax 
  4207. o Definition 
  4208. o E Language Syntax 
  4209.  
  4210.  
  4211. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4212.  
  4213. ISADIRTYLINE() 
  4214.  
  4215.  
  4216. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4217.  
  4218. Boolean function that tells whether or not the current line has been modified 
  4219. but not yet "checked in".  This corresponds to whether or not the undo opcode 
  4220. will change the line; the function was added in order to enable the Undo menu 
  4221. item to be greyed if not applicable. 
  4222.  
  4223.  
  4224. ΓòÉΓòÉΓòÉ 4.1.84. ITERATE ΓòÉΓòÉΓòÉ
  4225.  
  4226. Choose: 
  4227.  
  4228. o Syntax 
  4229. o Definition 
  4230. o E Language Syntax 
  4231.  
  4232.  
  4233. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4234.  
  4235. Is described in section Conditional and Loop Statements. 
  4236.  
  4237.  
  4238. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4239.  
  4240. Is described in section Conditional and Loop Statements. 
  4241.  
  4242.  
  4243. ΓòÉΓòÉΓòÉ 4.1.85. ITOA(variable, radix) ΓòÉΓòÉΓòÉ
  4244.  
  4245. Choose: 
  4246.  
  4247. o Syntax 
  4248. o Definition 
  4249. o E Language Syntax 
  4250.  
  4251.  
  4252. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4253.  
  4254. ITOA( variable,  radix ) 
  4255.  
  4256.  
  4257. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4258.  
  4259. Converts a two byte binary representation of an integer stored in variable to a 
  4260. string representation of the integer, so that the E language can understand it. 
  4261. radix specifies the base of the number (i.e. base 10 = decimal; base 16 = 
  4262. hexadecimal) to be converted to a string representation. This function is often 
  4263. used to convert integers returned by dynalink library functions from binary 
  4264. representation to ASCII string representation. See DYNALINK() for an example of 
  4265. the use of ITOA(). 
  4266.  
  4267.  
  4268. ΓòÉΓòÉΓòÉ 4.1.86. JOIN ΓòÉΓòÉΓòÉ
  4269.  
  4270. Choose: 
  4271.  
  4272. o Syntax 
  4273. o Definition 
  4274. o E Language Syntax 
  4275.  
  4276.  
  4277. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4278.  
  4279. JOIN 
  4280.  
  4281.  
  4282. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4283.  
  4284. Joins the next line with current line, with an intervening space. Like the 
  4285. standard a_J key combination. 
  4286.  
  4287.  
  4288. ΓòÉΓòÉΓòÉ 4.1.87. KEYIN expression ΓòÉΓòÉΓòÉ
  4289.  
  4290. Choose: 
  4291.  
  4292. o Syntax 
  4293. o Definition 
  4294. o Example 
  4295. o E Language Syntax 
  4296.  
  4297.  
  4298. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4299.  
  4300. KEYIN expression 
  4301.  
  4302.  
  4303. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4304.  
  4305. Types expression at current cursor position as if typed from the keyboard 
  4306. without translation or execution. expression is most often a quoted command, 
  4307. although it can also be a numeric expression. 
  4308.  
  4309.  
  4310. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4311.  
  4312. For example, one could enter the current date: 
  4313.  
  4314. parse value getdate(1) with today';' .  /* Discard MonthNum. */
  4315. keyin 'Today is' today'.'
  4316. One could also type graphics characters in the text by placing the cursor at 
  4317. the desired location and issuing the statement: 
  4318.  
  4319. keyin \24
  4320.  
  4321.  
  4322. ΓòÉΓòÉΓòÉ 4.1.88. KEYS name ΓòÉΓòÉΓòÉ
  4323.  
  4324. Choose: 
  4325.  
  4326. o Syntax 
  4327. o Definition 
  4328. o Example 
  4329. o E Language Syntax 
  4330.  
  4331.  
  4332. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4333.  
  4334. KEYS name 
  4335.  
  4336.  
  4337. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4338.  
  4339. Changes to the keyset name. The keyset is created by the DEFKEYS statement Key 
  4340. Definitions (DEF and DEFKEYS).  The KEYS statement can be used in conjunction 
  4341. with DEFLOAD DEFLOAD. 
  4342.  
  4343.  
  4344. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4345.  
  4346. The following example changes to a keyset that enhances keys such that the C 
  4347. programming language syntax could be recognized: 
  4348.  
  4349. defload
  4350.   ext=filetype(name)  -- get file extention
  4351.   if ext='C' then     -- test file is a c file
  4352.  
  4353.      keys c_keys      -- change to new keyset
  4354.  
  4355.   endif
  4356.  
  4357.  
  4358. ΓòÉΓòÉΓòÉ 4.1.89. LASTERROR() ΓòÉΓòÉΓòÉ
  4359.  
  4360. Choose: 
  4361.  
  4362. o Syntax 
  4363. o Definition 
  4364. o Example 
  4365. o E Language Syntax 
  4366.  
  4367.  
  4368. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4369.  
  4370. LASTERROR() 
  4371.  
  4372.  
  4373. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4374.  
  4375. Returns the last error code. The example illustrates its usage. 
  4376.  
  4377.  
  4378. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4379.  
  4380. 'tabs 0'
  4381. 'ma 75 1'
  4382. if lasterror() = -271 then
  4383.     sayerror "margin setting error"
  4384. elseif lasterror() = -272 then
  4385.     sayerror "tabs setting error"
  4386. else
  4387.     sayerror "no error"
  4388. endif
  4389.  
  4390. In the above example, an error would occur while trying to set both tabs and 
  4391. margins. LASTERROR() would return -271, and margin setting error would be 
  4392. printed. Assume the following two lines were substituted for the first two 
  4393. lines of the above example: 
  4394.  
  4395. 'tabs 0'
  4396. 'margins 1 75'
  4397. The result of LASTERROR() would be -272, and tabs setting error would be 
  4398. printed. In this way, you can retain the error code returned by a command even 
  4399. after a second command completes successfully. 
  4400.  
  4401.  
  4402. ΓòÉΓòÉΓòÉ 4.1.90. LASTKEY([key_number]) ΓòÉΓòÉΓòÉ
  4403.  
  4404. Choose: 
  4405.  
  4406. o Syntax 
  4407. o Definition 
  4408. o Example 
  4409. o E Language Syntax 
  4410.  
  4411.  
  4412. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4413.  
  4414. LASTKEY( [0 | 1 | 2 | 3] ) 
  4415.  
  4416.  
  4417. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4418.  
  4419. Returns the user's last keystroke, whether typed manually or executed by a 
  4420. KEYIN or EXECUTEKEY statement.  The only values that are valid for the 
  4421. parameter key_number are 0 to3.  The LASTKEY(0) call has the same effect as a 
  4422. LASTKEY() call, which has the same behavior as it always has, namely, to return 
  4423. the most recent keystroke.  This procedure call is not useful for checking for 
  4424. prefix keys.  (See the example.) LASTKEY(1) returns the next-to-last keystroke. 
  4425. LASTKEY(2) returns an 8-byte string representing the last WM_CHAR message 
  4426. received (see the example), and LASTKEY(3) returns the next-to-last WM_CHAR. 
  4427.  
  4428. Note:  The WM_CHAR data can be used to check scan codes and differentiate 
  4429.        between the numeric keypad and other keys (for example).  If a character 
  4430.        is being processed from a KEYIN or EXECUTEKEY statement, then the 
  4431.        WM_CHAR data will consist of 8 bytes of ASCII zeros. 
  4432.  
  4433.  
  4434. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4435.  
  4436. You might expect that the following example would check for the two-key 
  4437. sequence Esc followed by F5: 
  4438.  
  4439.    def f6=
  4440.       if lastkey()=esc then
  4441.          /* do the new code for Esc-F6 */
  4442.       else
  4443.          /* do the normal F5 (in this case the draw command) */
  4444.          'draw'
  4445.       endif
  4446. However, this is not the case. This definition is executed only if F5 is 
  4447. pressed, and once F5 has been pressed, it becomes the value of LASTKEY(). 
  4448. Therefore the if condition in the example never holds true. 
  4449.  
  4450. The procedure could be useful in the following case: 
  4451.  
  4452. def f5, a_f5, esc =
  4453.     if lastkey() = f5 then
  4454.         /* do something for F5 case */
  4455.     elseif lastkey() = a_f5 then
  4456.         /* do something for A_F5 case */
  4457.     else
  4458.         /* do something for Esc case */
  4459.     endif
  4460.     /* do something for all of the keys */
  4461. In this case, one DEF is defined for multiple keys. By using the LASTKEY() 
  4462. procedure, you can determine which of these keys was pressed. 
  4463.  
  4464. The procedure call LASTKEY(1) returns the key before last, and will handle the 
  4465. problem discussed in the first example.  By substituting LASTKEY(1) calls for 
  4466. the LASTKEY() calls in the first example, this piece of code will work as 
  4467. expected: trapping the Esc followed by F5 key sequence. 
  4468.  
  4469. Example of WM_CHAR usage: 
  4470.  
  4471. def left = -- Note:  the following are all binary:
  4472.    parse value lastkey(2) with flags 3 repeat 4 scancode 5 charcode 7 vk_code 9
  4473.    left
  4474.    if scancode = \75 then  -- x'4b'; keyboard-specific
  4475.       sayerror 'Pad left'
  4476.    else
  4477.       sayerror 'Cursor key left'
  4478.    endif
  4479.  
  4480.  
  4481. ΓòÉΓòÉΓòÉ 4.1.91. LASTPOS (needle, haystack [,startpos [,flags]]) ΓòÉΓòÉΓòÉ
  4482.  
  4483. Choose: 
  4484.  
  4485. o Syntax 
  4486. o Definition 
  4487. o Example 
  4488. o E Language Syntax 
  4489.  
  4490.  
  4491. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4492.  
  4493. LASTPOS( needle,  haystack   [, start [, flags]] ) 
  4494.  
  4495.  
  4496. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4497.  
  4498. searches for needle in haystack from startpos to beginning of string. If 
  4499. startpos is not present, the search begins from the end of string. If needle is 
  4500. not found, zero is returned. needle and haystack must be strings. 
  4501.  
  4502. See the description of the POS function for an explanation of flags. 
  4503.  
  4504.  
  4505. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4506.  
  4507.    LASTPOS(' ','abc def ghi')   ==8
  4508.    LASTPOS(' ','abcdefghi')     ==0
  4509.    LASTPOS(' ','abc def ghi',7) ==4
  4510.  
  4511.  
  4512. ΓòÉΓòÉΓòÉ 4.1.92. LASTWORD(string) ΓòÉΓòÉΓòÉ
  4513.  
  4514. Choose: 
  4515.  
  4516. o Syntax 
  4517. o Definition 
  4518. o Example 
  4519. o E Language Syntax 
  4520.  
  4521.  
  4522. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4523.  
  4524. LASTWORD( string ) 
  4525.  
  4526.  
  4527. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4528.  
  4529. returns the last space-delimited word in string. 
  4530.  
  4531. Note:  This procedure is only available in EPM 5.60 or above.
  4532.  
  4533.  
  4534. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4535.  
  4536.    LASTWORD(string) == WORD(string, WORDS(string))
  4537.  
  4538.  
  4539. ΓòÉΓòÉΓòÉ 4.1.93. LEAVE ΓòÉΓòÉΓòÉ
  4540.  
  4541. Choose: 
  4542.  
  4543. o Syntax 
  4544. o Definition 
  4545. o E Language Syntax 
  4546.  
  4547.  
  4548. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4549.  
  4550. Is described in section Conditional and Loop Statements. 
  4551.  
  4552.  
  4553. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4554.  
  4555. Is described in section Conditional and Loop Statements. 
  4556.  
  4557.  
  4558. ΓòÉΓòÉΓòÉ 4.1.94. LEFT ΓòÉΓòÉΓòÉ
  4559.  
  4560. Choose: 
  4561.  
  4562. o Syntax 
  4563. o Definition 
  4564. o E Language Syntax 
  4565.  
  4566.  
  4567. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4568.  
  4569. LEFT 
  4570.  
  4571.  
  4572. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4573.  
  4574. Moves cursor 1 character to the left, like the standard Left. 
  4575.  
  4576.  
  4577. ΓòÉΓòÉΓòÉ 4.1.95. LEFTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  4578.  
  4579. Choose: 
  4580.  
  4581. o Syntax 
  4582. o Definition 
  4583. o Example 
  4584. o E Language Syntax 
  4585.  
  4586.  
  4587. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4588.  
  4589. LEFTSTR( string,  length   [, pad] ) 
  4590.  
  4591.  
  4592. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4593.  
  4594. Returns a string of length length containing the left-most length characters of 
  4595. string. That is, padded with pad characters (or truncated) on the right as 
  4596. needed. The default pad character is a blank. length must be non-negative. 
  4597. Exactly equivalent to SUBSTR(string,1,length[,pad]). 
  4598.  
  4599.  
  4600. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4601.  
  4602. Here are some examples: 
  4603.  
  4604.  LEFTSTR('abc d',8)        ->    'abc d   '
  4605.  LEFTSTR('abc d',8,'.')    ->    'abc d...'
  4606.  LEFTSTR('abc  def',7)     ->    'abc  de'
  4607.  
  4608.  
  4609. ΓòÉΓòÉΓòÉ 4.1.96. LENGTH(expression) ΓòÉΓòÉΓòÉ
  4610.  
  4611. Choose: 
  4612.  
  4613. o Syntax 
  4614. o Definition 
  4615. o Example 
  4616. o E Language Syntax 
  4617.  
  4618.  
  4619. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4620.  
  4621. LENGTH( expression ) 
  4622.  
  4623.  
  4624. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4625.  
  4626. Returns length of expression. 
  4627.  
  4628.  
  4629. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4630.  
  4631. Here are some examples: 
  4632.  
  4633.  LENGTH('abcdefgh')    ->    8
  4634.  LENGTH('abc defg')    ->    8
  4635.  LENGTH('')            ->    0
  4636.  
  4637.  
  4638. ΓòÉΓòÉΓòÉ 4.1.97. LEXAM( functionname ) ΓòÉΓòÉΓòÉ
  4639.  
  4640. Choose: 
  4641.  
  4642. o Syntax 
  4643. o Definition 
  4644. o E Language Syntax 
  4645.  
  4646.  
  4647. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4648.  
  4649. LEXAM( numeric_expression ) 
  4650.  
  4651.  
  4652. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4653.  
  4654. Provides spell checking and synonym support for the EPM. 
  4655.  
  4656. The LEXAM opcode allows word verification and word/dictionary lookup. The LEXAM 
  4657. opcode can take on the following syntax: 
  4658.  
  4659.     lexam('Initialize')
  4660.     lexam('Terminate')
  4661.     lexam('PIckup Dictionary',dictionary_name)
  4662.     lexam('DRop Dictionary',dictionary_name)
  4663.     lexam('SEt Addenda Language Type',addenda_type)
  4664.     lexam('Add to Transient Addenda',addenda_name)
  4665.     lexam('Read from Transient Addenda',addenda_name)
  4666.     lexam('Verification',word)
  4667.     lexam('SPelling Aid',word)
  4668.     lexam('Hyphenation',word)
  4669.     lexam('DEhyphenation',word)
  4670.     lexam('SYnonym',word)
  4671.     lexam('GRAMmar Aid',word)
  4672.     lexam('GRADe level',word)
  4673.     lexam('PArt-of-speech',word)
  4674.  
  4675.  
  4676. ΓòÉΓòÉΓòÉ 4.1.98. LINK ΓòÉΓòÉΓòÉ
  4677.  
  4678. Choose: 
  4679.  
  4680. o Syntax 
  4681. o Definition 
  4682. o E Language Syntax 
  4683.  
  4684.  
  4685. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4686.  
  4687. LINK string_expression 
  4688.  
  4689.  
  4690. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4691.  
  4692. Is described in section Linkable External Modules. 
  4693.  
  4694.  
  4695. ΓòÉΓòÉΓòÉ 4.1.99. LINKED ΓòÉΓòÉΓòÉ
  4696.  
  4697. Choose: 
  4698.  
  4699. o Syntax 
  4700. o Definition 
  4701. o Example 
  4702. o E Language Syntax 
  4703.  
  4704.  
  4705. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4706.  
  4707. LINKED( module ) 
  4708.  
  4709.  
  4710. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4711.  
  4712. Queries whether a module is linked.  The return value is: 
  4713.  
  4714. o module number (a small positive integer) if linked 
  4715. o -1 if found on disk but not currently linked 
  4716. o -307 if module can't be found on disk.  This RC value -307 is the same as 
  4717.   sayerror("Link: file not found"). 
  4718. o -308 if the expression is a bad module name that cannot be expanded into a 
  4719.   proper filename.  Same as sayerror("Link: invalid filename"). 
  4720.  
  4721.  
  4722. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4723.  
  4724. Sample usage:  result = linked("draw"). 
  4725.  
  4726. Note:  If you wish to make sure a module is linked, you can always just repeat 
  4727. the link command.  E won't reload the file from disk if it's already linked, 
  4728. but it will rerun the module's DEFINIT which might not be desirable. 
  4729.  
  4730.  
  4731. ΓòÉΓòÉΓòÉ 4.1.100. LONGESTLINE ΓòÉΓòÉΓòÉ
  4732.  
  4733. Choose: 
  4734.  
  4735. o Syntax 
  4736. o Definition 
  4737. o E Language Syntax 
  4738.  
  4739.  
  4740. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4741.  
  4742. LONGESTLINE() 
  4743.  
  4744.  
  4745. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4746.  
  4747. Returns the length of the longest line in the current file. 
  4748.  
  4749.  
  4750. ΓòÉΓòÉΓòÉ 4.1.101. LOOP ΓòÉΓòÉΓòÉ
  4751.  
  4752. Choose: 
  4753.  
  4754. o Syntax 
  4755. o Definition 
  4756. o E Language Syntax 
  4757.  
  4758.  
  4759. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4760.  
  4761. Is described in section Conditional and Loop Statements. 
  4762.  
  4763.  
  4764. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4765.  
  4766. Is described in section Conditional and Loop Statements. 
  4767.  
  4768.  
  4769. ΓòÉΓòÉΓòÉ 4.1.102. LOWCASE(expression) ΓòÉΓòÉΓòÉ
  4770.  
  4771. Choose: 
  4772.  
  4773. o Syntax 
  4774. o Definition 
  4775. o E Language Syntax 
  4776.  
  4777.  
  4778. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4779.  
  4780. LOWCASE( expression ) 
  4781.  
  4782.  
  4783. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4784.  
  4785. Returns the lower-case conversion of the expression.  (In versions earlier than 
  4786. 4.12, the input string was converted in place.  Now the input is left alone and 
  4787. the converted string is returned as the result.) 
  4788.  
  4789.  
  4790. ΓòÉΓòÉΓòÉ 4.1.103. LTOA(variable, radix) ΓòÉΓòÉΓòÉ
  4791.  
  4792. Choose: 
  4793.  
  4794. o Syntax 
  4795. o Definition 
  4796. o E Language Syntax 
  4797.  
  4798.  
  4799. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4800.  
  4801. LTOA( variable,  radix ) 
  4802.  
  4803.  
  4804. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4805.  
  4806. Converts the C representation of a long integer (data type long) stored in 
  4807. variable to a string representation of the same number, so that the E language 
  4808. can understand the number. radix specifies the base of the number (i.e. base 10 
  4809. = decimal; base 16 = hexadecimal) to be converted to a string representation. 
  4810. For use in converting numbers returned by C functions, for example function 
  4811. calls via DYNALINK(). 
  4812.  
  4813.  
  4814. ΓòÉΓòÉΓòÉ 4.1.104. MACHINE() ΓòÉΓòÉΓòÉ
  4815.  
  4816. Choose: 
  4817.  
  4818. o Syntax 
  4819. o Definition 
  4820. o E Language Syntax 
  4821.  
  4822.  
  4823. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4824.  
  4825. MACHINE() 
  4826.  
  4827.  
  4828. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4829.  
  4830. Returns operating system and machine information string.  Return values are 
  4831. "PCDOS" or "OS2REAL" or "OS2PROTECT". 
  4832.  
  4833.  
  4834. ΓòÉΓòÉΓòÉ 4.1.105. MAP_POINT ΓòÉΓòÉΓòÉ
  4835.  
  4836. Choose: 
  4837.  
  4838. o Syntax 
  4839. o Definition 
  4840. o Example 
  4841. o E Language Syntax 
  4842.  
  4843.  
  4844. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4845.  
  4846. MAP_POINT subop, op2, op3 [, op4 [, comment ] ] 
  4847.  
  4848.  
  4849. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4850.  
  4851. Everything other than subop must be a variable. This opcode is used to map 
  4852. between a pixel-offset in the window, a pixel-offset in the document, and a 
  4853. line, column and offset within the file. 
  4854.  
  4855. subop          op2_in  op3_in  op4_in  op2_out  op3_out  op4_out
  4856. 1  WindowToDoc   x       y       -       x        y        =
  4857. 2  DocToLCO      x       y       -       Line     Col      Off
  4858. 3  LCOToDoc      Line    Col     Off     x        y        =
  4859. 4  Doc2Win       x       y       -       x        y        =
  4860. 5  Win2LCO       x       y       -       Line     Col      Off
  4861. 6  LCO2Win       Line    Col     Off     x        y        =
  4862. The comment field is an extra field that eventually will be used to indicate if 
  4863. the special processing had to occur.  For example, a requested point was beyond 
  4864. the EOF and the returned values are based on extrapolation. 
  4865.  
  4866. Note:  When mapping to Line/Column/Offset, the mapping is to the nearest 
  4867.        interstitial space - i.e., the transition between two characters, two 
  4868.        attributes, or an attribute and a character.  This means that if you map 
  4869.        a coordinate that's on the left side of a character, it will return the 
  4870.        column of that character, but if you map a coordinate on the right side 
  4871.        of a character, you'll get back the column of the following character.
  4872.  
  4873.  
  4874. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4875.  
  4876. The following example maps the mouse position to the character under the mouse 
  4877. pointer. 
  4878.  
  4879. xxx = .mousex; mx = xxx
  4880. yyy = .mousey
  4881.  
  4882. map_point 5, xxx, yyy, off, comment;  -- map screen to line
  4883.  
  4884. MouseLine = min(max(xxx, 0), .last)  -- Want line to be between 0 & .last
  4885. lne = yyy
  4886. map_point 6, xxx, lne, off, comment;  -- map line/col/offset to screen
  4887. if xxx>mx then  -- The intersection selected is to right of mouse pointer;
  4888.    yyy = yyy - 1  -- the character clicked on is the one to the left.
  4889. endif             -- Note:  could get col. 0 this way, but the following
  4890.                   --        takes care of that.
  4891. MouseCol  = min(max(yyy, 1), MAXCOL)
  4892.  
  4893.  
  4894. ΓòÉΓòÉΓòÉ 4.1.106. MARKBLOCK ΓòÉΓòÉΓòÉ
  4895.  
  4896. Choose: 
  4897.  
  4898. o Syntax 
  4899. o Definition 
  4900. o E Language Syntax 
  4901.  
  4902.  
  4903. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4904.  
  4905. MARKBLOCK | MARK_BLOCK 
  4906.  
  4907.  
  4908. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4909.  
  4910. Starts or changes coordinates of a block mark, like the standard Alt-B. 
  4911.  
  4912.  
  4913. ΓòÉΓòÉΓòÉ 4.1.107. MARKBLOCKG ΓòÉΓòÉΓòÉ
  4914.  
  4915. Choose: 
  4916.  
  4917. o Syntax 
  4918. o Definition 
  4919. o E Language Syntax 
  4920.  
  4921.  
  4922. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4923.  
  4924. MARKBLOCKG 
  4925.  
  4926.  
  4927. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4928.  
  4929. Like MARKBLOCK, but right column must be specified one beyond the desired right 
  4930. column. 
  4931.  
  4932.  
  4933. ΓòÉΓòÉΓòÉ 4.1.108. MARKCHAR ΓòÉΓòÉΓòÉ
  4934.  
  4935. Choose: 
  4936.  
  4937. o Syntax 
  4938. o Definition 
  4939. o E Language Syntax 
  4940.  
  4941.  
  4942. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4943.  
  4944. MARKCHAR | MARK_CHAR 
  4945.  
  4946.  
  4947. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4948.  
  4949. Starts or changes coordinates of a character mark, like the standard Alt-Z. 
  4950.  
  4951.  
  4952. ΓòÉΓòÉΓòÉ 4.1.109. MARKCHARG ΓòÉΓòÉΓòÉ
  4953.  
  4954. Choose: 
  4955.  
  4956. o Syntax 
  4957. o Definition 
  4958. o E Language Syntax 
  4959.  
  4960.  
  4961. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4962.  
  4963. MARKCHARG 
  4964.  
  4965.  
  4966. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4967.  
  4968. Like MARKCHAR, but column numbers represent edges rather than characters, so 
  4969. that they can be between attributes (and right column will generally be one 
  4970. higher that it would be for MARKCHAR). 
  4971.  
  4972.  
  4973. ΓòÉΓòÉΓòÉ 4.1.110. MARKLINE ΓòÉΓòÉΓòÉ
  4974.  
  4975. Choose: 
  4976.  
  4977. o Syntax 
  4978. o Definition 
  4979. o E Language Syntax 
  4980.  
  4981.  
  4982. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4983.  
  4984. MARKLINE | MARK_LINE 
  4985.  
  4986.  
  4987. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4988.  
  4989. Starts or changes coordinates of a line mark, like the standard Alt-L. 
  4990.  
  4991.  
  4992. ΓòÉΓòÉΓòÉ 4.1.111. MARKLINEG ΓòÉΓòÉΓòÉ
  4993.  
  4994. Choose: 
  4995.  
  4996. o Syntax 
  4997. o Definition 
  4998. o E Language Syntax 
  4999.  
  5000.  
  5001. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5002.  
  5003. MARKLINEG 
  5004.  
  5005.  
  5006. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5007.  
  5008. Same as MARKLINE. 
  5009.  
  5010.  
  5011. ΓòÉΓòÉΓòÉ 4.1.112. MARKSIZE() ΓòÉΓòÉΓòÉ
  5012.  
  5013. New in EPM 6. 
  5014.  
  5015. Choose: 
  5016.  
  5017. o Syntax 
  5018. o Definition 
  5019. o Example 
  5020. o E Language Syntax 
  5021.  
  5022.  
  5023. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5024.  
  5025. MARKSIZE() 
  5026.  
  5027.  
  5028. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5029.  
  5030. Returns the number of marked characters.  Useful when allocating a buffer into 
  5031. which to copy the marked text. 
  5032.  
  5033.  
  5034. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5035.  
  5036. if marktype() then
  5037.    getmark firstline, lastline
  5038.    -- size of marked text + CR/LF for each line + 32 bytes buffer header
  5039.    buff_size = marksize() + 2 * (lastline - firstline + 1) + 32
  5040.    bufhndl = buffer(CREATEBUF, 'TempBuf', buff_size, 1 )
  5041.    call buffer(PUTMARKBUF, bufhndl, firstline, lastline, APPENDCR+APPENDLF)
  5042. endif
  5043.  
  5044.  
  5045. ΓòÉΓòÉΓòÉ 4.1.113. MARKTYPE() ΓòÉΓòÉΓòÉ
  5046.  
  5047. Choose: 
  5048.  
  5049. o Syntax 
  5050. o Definition 
  5051. o E Language Syntax 
  5052.  
  5053.  
  5054. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5055.  
  5056. MARKTYPE() 
  5057.  
  5058.  
  5059. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5060.  
  5061. Returns 'BLOCK', 'LINE', or 'CHAR'.  ' ' is returned if no text is highlighted. 
  5062.  
  5063.  
  5064. ΓòÉΓòÉΓòÉ 4.1.114. MEMCPYX(destination, source, length) ΓòÉΓòÉΓòÉ
  5065.  
  5066. Choose: 
  5067.  
  5068. o Syntax 
  5069. o Definition 
  5070. o E Language Syntax 
  5071.  
  5072.  
  5073. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5074.  
  5075. MEMCPYX( hexadecimal_address , hexadecimal_address   , length ) 
  5076.  
  5077.  
  5078. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5079.  
  5080. Copies length bytes from source to destination. Both source and destination are 
  5081. binary far pointers; e.g. 
  5082.  
  5083. call memcpyx(atoi(ptr1) || atoi(seg1), atoi(ptr2) || atoi(seg2), len)
  5084.  
  5085.  
  5086. ΓòÉΓòÉΓòÉ 4.1.115. MOUSE_SETPOINTER type ΓòÉΓòÉΓòÉ
  5087.  
  5088. Choose: 
  5089.  
  5090. o Syntax 
  5091. o Definition 
  5092. o E Language Syntax 
  5093.  
  5094.  
  5095. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5096.  
  5097. MOUSE_SETPOINTER 
  5098.  
  5099.  
  5100. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5101.  
  5102. Sets the mouse pointer to the figure specified by type. Mouse figures are: 
  5103.  
  5104. 1 = arrow pointer (can also user the constant SYSTEM_POINTER) 
  5105. 2 = a vertical bar (like those used to request text in a dialog box) 
  5106. 3 = an hour glass 
  5107. 4 = invisible 
  5108. 5 = four way arrows 
  5109. 6 = two way arrow (upper left/lower right) 
  5110. 7 = two way arrow (upper right/lower left) 
  5111. 8 = horizontal arrow 
  5112. 9 = vertical arrow 
  5113. 10 = an outlined box 
  5114. 11 = a stop octagon with a hand in a box 
  5115. 12 = the browse question mark in a box 
  5116. 13 = an explanation point in box 
  5117. 14 = an asterisk in a box 
  5118. 15 = cropping lines (as defined by the constant MARK_POINTER) 
  5119.  
  5120. For instance, when entering browse mode the mouse pointer can be changed to 
  5121. indicate that no text can be entered. 
  5122.  
  5123.  
  5124. ΓòÉΓòÉΓòÉ 4.1.116. MOVEMARK ΓòÉΓòÉΓòÉ
  5125.  
  5126. Choose: 
  5127.  
  5128. o Syntax 
  5129. o Definition 
  5130. o E Language Syntax 
  5131.  
  5132.  
  5133. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5134.  
  5135. MOVEMARK | MOVE_MARK 
  5136.  
  5137.  
  5138. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5139.  
  5140. Moves marked text to cursor position, like the standard Alt-M. 
  5141.  
  5142.  
  5143. ΓòÉΓòÉΓòÉ 4.1.117. NEXTFILE ΓòÉΓòÉΓòÉ
  5144.  
  5145. Choose: 
  5146.  
  5147. o Syntax 
  5148. o Definition 
  5149. o E Language Syntax 
  5150.  
  5151.  
  5152. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5153.  
  5154. NEXTFILE | NEXT_FILE 
  5155.  
  5156.  
  5157. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5158.  
  5159. Activates the next file in the active ring, like the standard F12 or Ctrl-N. 
  5160.  
  5161.  
  5162. ΓòÉΓòÉΓòÉ 4.1.118. OFFSET(variable) ΓòÉΓòÉΓòÉ
  5163.  
  5164. Choose: 
  5165.  
  5166. o Syntax 
  5167. o Definition 
  5168. o E Language Syntax 
  5169.  
  5170.  
  5171. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5172.  
  5173. OFFSET( variable ) 
  5174.  
  5175.  
  5176. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5177.  
  5178. Returns the offset of the memory address of variable in the form of a binary 
  5179. word. To be used with C functions like those made via DYNALINK(). 
  5180.  
  5181.  
  5182. ΓòÉΓòÉΓòÉ 4.1.119. OFS(variable) ΓòÉΓòÉΓòÉ
  5183.  
  5184. Choose: 
  5185.  
  5186. o Syntax 
  5187. o Definition 
  5188. o E Language Syntax 
  5189.  
  5190.  
  5191. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5192.  
  5193. OFS( variable ) 
  5194.  
  5195.  
  5196. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5197.  
  5198. Returns a string representation of the offset of the actual memory address of 
  5199. variable. See SEG() for an example of usage. 
  5200.  
  5201.  
  5202. ΓòÉΓòÉΓòÉ 4.1.120. OVERLAY(new, target[, n [, k [,pad] ] ]) ΓòÉΓòÉΓòÉ
  5203.  
  5204. Choose: 
  5205.  
  5206. o Syntax 
  5207. o Definition 
  5208. o Example 
  5209. o E Language Syntax 
  5210.  
  5211.  
  5212. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5213.  
  5214. OVERLAY(new,  target   [, n  [, length   [, pad] ] ]) 
  5215.  
  5216.  
  5217. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5218.  
  5219. overlays the string new, padded  to length k, onto the string target starting 
  5220. at the nth character. k must be zero or positive. If n is greater than the 
  5221. length of the target string, padding is added there also. The default pad 
  5222. character is the blank, and the default value for n is 1. n must be greater 
  5223. than 0. 
  5224.  
  5225.  
  5226. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5227.  
  5228. Examples are: 
  5229.  
  5230.   OVERLAY(' ','abcdef',3)      == 'ab def'
  5231.   OVERLAY('.','abcdef',3,2)    == 'ab. ef'
  5232.   OVERLAY('qq','abcd')         == 'qqcd'
  5233.   OVERLAY('qq','abcd',4)       == 'abcqq'
  5234.   OVERLAY('123','abc',5,6,'+') == 'abc+123+++'
  5235.  
  5236. Although E's OVERLAY procedure is similar to REXX's, they are not identical. E 
  5237. requires that each field be filled with a string, even if it is only a null 
  5238. string. REXX allows a field to be skipped. For example: 
  5239.  
  5240.   OVERLAY('qq',,5,6,'+')
  5241.  
  5242. This would be legal syntax in REXX, but would cause errors in E. The E 
  5243. equivalent would be: 
  5244.  
  5245.   OVERLAY('qq','',5,6,'+')
  5246.  
  5247.  
  5248. ΓòÉΓòÉΓòÉ 4.1.121. OVERLAYBLOCK ΓòÉΓòÉΓòÉ
  5249.  
  5250. Choose: 
  5251.  
  5252. o Syntax 
  5253. o Definition 
  5254. o E Language Syntax 
  5255.  
  5256.  
  5257. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5258.  
  5259. OVERLAYBLOCK | OVERLAY_BLOCK 
  5260.  
  5261.  
  5262. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5263.  
  5264. Copies marked text to cursor position without inserting, like standard Alt-O. 
  5265.  
  5266.  
  5267. ΓòÉΓòÉΓòÉ 4.1.122. PAGEDOWN ΓòÉΓòÉΓòÉ
  5268.  
  5269. Choose: 
  5270.  
  5271. o Syntax 
  5272. o Definition 
  5273. o E Language Syntax 
  5274.  
  5275.  
  5276. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5277.  
  5278. PAGEDOWN | PAGE_DOWN 
  5279.  
  5280.  
  5281. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5282.  
  5283. Moves cursor to next page of current file, like standard PgDn. 
  5284.  
  5285.  
  5286. ΓòÉΓòÉΓòÉ 4.1.123. PAGEUP ΓòÉΓòÉΓòÉ
  5287.  
  5288. Choose: 
  5289.  
  5290. o Syntax 
  5291. o Definition 
  5292. o E Language Syntax 
  5293.  
  5294.  
  5295. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5296.  
  5297. PAGEUP | PAGE_UP 
  5298.  
  5299.  
  5300. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5301.  
  5302. Moves cursor to previous page of current file, like standard PgUp. 
  5303.  
  5304.  
  5305. ΓòÉΓòÉΓòÉ 4.1.124. PARSE ΓòÉΓòÉΓòÉ
  5306.  
  5307. Choose: 
  5308.  
  5309. o Syntax 
  5310. o Definition 
  5311. o E Language Syntax 
  5312.  
  5313.  
  5314. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5315.  
  5316. See The Parse Statement. 
  5317.  
  5318.  
  5319. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5320.  
  5321. See The Parse Statement. 
  5322.  
  5323.  
  5324. ΓòÉΓòÉΓòÉ 4.1.125. PEEK(segment, offset, count) ΓòÉΓòÉΓòÉ
  5325.  
  5326. Choose: 
  5327.  
  5328. o Syntax 
  5329. o Definition 
  5330. o Example 
  5331. o E Language Syntax 
  5332.  
  5333.  
  5334. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5335.  
  5336. PEEK( segment ,  offset   ,  count ) 
  5337.  
  5338.  
  5339. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5340.  
  5341. Returns string of length count starting at the address  segment:offset.  The 
  5342. segment and offset values are used just as they are in assembler programs. See 
  5343. also POKE in the section Built-in Statement and Procedure Summary. 
  5344.  
  5345. A PEEK() call is often necessary to access the string pointed to by a pointer 
  5346. returned by a DYNALINK() function call. 
  5347.  
  5348.  
  5349. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5350.  
  5351. The following example of this type of usage is based on the procedure get_env() 
  5352. in DOSUTIL.E. 
  5353.  
  5354. seg_ptr = 1234       /* 4-byte place to put a far ptr   */
  5355. cmd_ptr = 1234
  5356. call dynalink('DOSCALLS',  /* dynamic link library name */
  5357.                '#91',       /* ordinal val for DOSGETENV */
  5358.                selector(seg_ptr) ||  /* ptr to env. seg   */
  5359.                offset(seg_ptr)   ||
  5360.                selector(cmd_ptr) || /* ptr to ofs after   */
  5361.                offset(cmd_ptr)    )/*  COMSPEC: unneeded */
  5362. env_seg = itoa(seg_ptr,10)
  5363. env_ofs = 0
  5364. start = env_ofs
  5365. do while peek(env_seg,env_ofs,1) /== \0
  5366.    env_ofs = env_ofs + 1
  5367. end
  5368. setting = peek(env_seg,start,env_ofs-start)
  5369.  
  5370. PEEK() allows us to determine where the end of the string is (marked by a null 
  5371. character: \0), and thereby determine the length of the string. 
  5372.  
  5373. WARNING: Attempts to PEEK to an area not owned by your process will cause a 
  5374. TRAP-D error. 
  5375.  
  5376.  
  5377. ΓòÉΓòÉΓòÉ 4.1.126. PEEK32(address, offset, count) ΓòÉΓòÉΓòÉ
  5378.  
  5379. Choose: 
  5380.  
  5381. o Syntax 
  5382. o Definition 
  5383. o E Language Syntax 
  5384.  
  5385.  
  5386. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5387.  
  5388. PEEK32( address ,  offset   ,  count ) 
  5389.  
  5390.  
  5391. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5392.  
  5393. Returns string of length count starting at the address address + offset. Like 
  5394. Peek, but takes a full 32-bit address instead of a selector as the first 
  5395. argument. See also POKE32 in the section Built-in Statement and Procedure 
  5396. Summary. 
  5397.  
  5398. WARNING: Attempts to PEEK32 to an area not owned by your process will cause a 
  5399. TRAP-D error. 
  5400.  
  5401.  
  5402. ΓòÉΓòÉΓòÉ 4.1.127. PEEKZ(segment, offset) ΓòÉΓòÉΓòÉ
  5403.  
  5404. Choose: 
  5405.  
  5406. o Syntax 
  5407. o Definition 
  5408. o Example 
  5409. o E Language Syntax 
  5410.  
  5411.  
  5412. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5413.  
  5414. PEEKZ( hexadecimal_address ) | PEEKZ( numeric_expression ,  numeric_expression 
  5415.  
  5416.  
  5417. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5418.  
  5419. Like PEEK, but for an ASCIIZ string. Returns the contents of storage starting 
  5420. with the address given and ending with the character before the next null 
  5421. character. 
  5422.  
  5423.  
  5424. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5425.  
  5426. This lets us simplify the PEEK example to: 
  5427.  
  5428. env_seg = itoa(seg_ptr,10)
  5429. setting = peekz(env_seg,0)
  5430.  
  5431. An alternate format supported is PEEKZ(address), where address is the 4-byte 
  5432. hex address of the storage. This is useful when calling an external routine 
  5433. that returns a far pointer to an ASCIIZ string. 
  5434.  
  5435.  
  5436. ΓòÉΓòÉΓòÉ 4.1.128. PEEKZ32(address, offset) ΓòÉΓòÉΓòÉ
  5437.  
  5438. New in EPM 6. 
  5439.  
  5440. Choose: 
  5441.  
  5442. o Syntax 
  5443. o Definition 
  5444. o E Language Syntax 
  5445.  
  5446.  
  5447. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5448.  
  5449. PEEKZ32( numeric_expression ,  numeric_expression ) 
  5450.  
  5451.  
  5452. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5453.  
  5454. Like PEEKZ, but takes a 32-bit address instead of a selector. 
  5455.  
  5456.  
  5457. ΓòÉΓòÉΓòÉ 4.1.129. POKE segment, offset, string ΓòÉΓòÉΓòÉ
  5458.  
  5459. Choose: 
  5460.  
  5461. o Syntax 
  5462. o Definition 
  5463. o Example 
  5464. o E Language Syntax 
  5465.  
  5466.  
  5467. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5468.  
  5469. POKE( segment , offset   ,  string ) 
  5470.  
  5471.  
  5472. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5473.  
  5474. Writes string to the address segment:offset. The segment and offset values are 
  5475. used just as they are in assembler programs. 
  5476.  
  5477. WARNING: Attempts to POKE to an area not owned by your process will cause a 
  5478. TRAP-D error and crash. 
  5479.  
  5480.  
  5481. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5482.  
  5483.     -- put greeting at beginning of segment.
  5484.     SelOfSharedSeg = itoa(Selector1, 10);
  5485.     poke SelOfSharedSeg , 0 , "Bonjour"\0;
  5486.  
  5487.  
  5488. ΓòÉΓòÉΓòÉ 4.1.130. POKE32 address, offset, string ΓòÉΓòÉΓòÉ
  5489.  
  5490. New in EPM 6. 
  5491.  
  5492. Choose: 
  5493.  
  5494. o Syntax 
  5495. o Definition 
  5496. o E Language Syntax 
  5497.  
  5498.  
  5499. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5500.  
  5501. POKE32( address , offset   ,  string ) 
  5502.  
  5503.  
  5504. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5505.  
  5506. Writes string to the address address + offset. Like Poke, but takes a full 
  5507. 32-bit address instead of a selector as the first argument. 
  5508.  
  5509. WARNING: Attempts to POKE32 to an area not owned by your process will cause a 
  5510. TRAP-D error and crash. 
  5511.  
  5512.  
  5513. ΓòÉΓòÉΓòÉ 4.1.131. POS(needle, haystack [,start [,flags]]) ΓòÉΓòÉΓòÉ
  5514.  
  5515. Choose: 
  5516.  
  5517. o Syntax 
  5518. o Definition 
  5519. o Example 
  5520. o E Language Syntax 
  5521.  
  5522.  
  5523. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5524.  
  5525. POS( needle,  haystack   [, start [, flags]] ) 
  5526.  
  5527.  
  5528. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5529.  
  5530. Returns the position of one string, needle, in another, haystack. (See also the 
  5531. LASTPOS function.)  If the string needle is not found, 0 is returned.  By 
  5532. default the search starts at the first character of haystack (that is, start is 
  5533. of the value 1).  This may be overridden by specifying start (which must be a 
  5534. positive whole number), the point at which to start the search. 
  5535.  
  5536. flags is allowed only in EPM version 6 and above.  It is used to indicate that 
  5537. an extended GREP search is desired.  (See The EPM User's Guide or the EPM 6 
  5538. online help for a description of extended GREP searching.) It can contain any 
  5539. combination of: 
  5540.  
  5541. G   Indicate that an extended GREP search is desired. 
  5542.  
  5543. X   Same as 'G'. 
  5544.  
  5545. M   Indicate that, if the GREP search is successful, the result should contain 
  5546.     all the match columns rather than just the start column.  I.e., the result 
  5547.     will contain pairs of numbers, the first pair indicating the first and last 
  5548.     column of the entire matched string, and subsequent pairs indicating the 
  5549.     first and last columns which matched each parenthesized subexpression (in 
  5550.     the order in which the open parens were seen). 
  5551.  
  5552. P   Indicate that needle is a pointer to a pre-compiled EGREP program, rather 
  5553.     than an EGREP search string. 
  5554.  
  5555.  
  5556. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5557.  
  5558. POS('day', 'Saturday')       ->    6
  5559. POS('x', 'abc def ghi')      ->    0
  5560. POS(' ', 'abc def ghi')      ->    4
  5561. POS(' ', 'abc def ghi', 5)   ->    8
  5562. POS('a.*t', 'This is a test', 1, 'X')   ->    9
  5563.  
  5564. prog = '(q:a*) (:c)'  -- 11111112222222222333333333344444
  5565. ;            12345678901234567890123456789012345678901234
  5566. searchstr = 'The quick brown fox jumps over the lazy dog.'
  5567. pos(prog, searchstr, 1, 'XM')            ->   5 15 5 9 11 15
  5568.  
  5569. In the last example, the EGREP search was matched by columns 5 to 15; the first 
  5570. parenthesized expression (matching a word starting with 'q') was matched in 
  5571. columns 5 to 9, and the second parenthesized expression (the following word) 
  5572. was matched in columns 11 to 15. 
  5573.  
  5574. See also: 
  5575.  
  5576. o LastPos function 
  5577. o RegExpComp function, to pre-compile an EGREP program 
  5578. o RegExpExec function, to execute a pre-compiled EGREP program 
  5579.  
  5580.  
  5581. ΓòÉΓòÉΓòÉ 4.1.132. PREVFILE ΓòÉΓòÉΓòÉ
  5582.  
  5583. Choose: 
  5584.  
  5585. o Syntax 
  5586. o Definition 
  5587. o E Language Syntax 
  5588.  
  5589.  
  5590. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5591.  
  5592. PREVFILE | PREV_FILE 
  5593.  
  5594.  
  5595. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5596.  
  5597. Activates the previous file in the active ring, like the standard Alt-F11 or 
  5598. Ctrl-P key combinations. 
  5599.  
  5600.  
  5601. ΓòÉΓòÉΓòÉ 4.1.133. QPRINT ΓòÉΓòÉΓòÉ
  5602.  
  5603. Choose: 
  5604.  
  5605. o Syntax 
  5606. o Definition 
  5607. o E Language Syntax 
  5608.  
  5609.  
  5610. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5611.  
  5612. QPRINT printername 
  5613.  
  5614.  
  5615. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5616.  
  5617. Performs a WYSIWYG print of the current file to the print queue associated with 
  5618. the named printer. 
  5619.  
  5620.  
  5621. ΓòÉΓòÉΓòÉ 4.1.134. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  5622.  
  5623. Choose: 
  5624.  
  5625. o Syntax 
  5626. o Definition 
  5627. o Example 
  5628. o E Language Syntax 
  5629.  
  5630.  
  5631. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5632.  
  5633. QUERYACCELSTRING (table_name, id) 
  5634.  
  5635.  
  5636. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5637.  
  5638. Returns the string associated with identifier 'id' in the accelerator table 
  5639. named 'table_name'. 
  5640.  
  5641.  
  5642. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5643.  
  5644.       accelstr=queryaccelstring(activeaccel, menuid)
  5645.       if accelstr <> '' then
  5646.          sayerror 'menu id' menuid 'would execute command' accelstr
  5647.       endif
  5648.  
  5649. See also: 
  5650.  
  5651. o Building Accelerator Tables from the Macro Language 
  5652. o QUERYACCELSTRING 
  5653. o BUILDACCELTABLE 
  5654. o DELETEACCEL 
  5655.  
  5656.  
  5657. ΓòÉΓòÉΓòÉ 4.1.135. QUERY_ATTRIBUTE var class, var value, var ispush, offset, column, line [, fileid] ΓòÉΓòÉΓòÉ
  5658.  
  5659. Choose: 
  5660.  
  5661. o Syntax 
  5662. o Definition 
  5663. o E Language Syntax 
  5664.  
  5665.  
  5666. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5667.  
  5668. QUERY_ATTRIBUTE class, value, ispush, offset, column, line [, fileid] 
  5669.  
  5670.  
  5671. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5672.  
  5673. This statement allows a macro program to deterine what attribute record can be 
  5674. found at the specified location. 
  5675.  
  5676. Class   returns the class of the found attribute record.  A value of zero is 
  5677.         returned if no attribute was found.  A value between 1 and 63 is 
  5678.         returned if an internally supported attribute record was found.  A 
  5679.         value from 64 to 255 is returned if an application supported attribute 
  5680.         record was found.  The meaning of an application supported attribute 
  5681.         record is not predictable at compile time.  Some administrative macros 
  5682.         will be provided for determining the meaning of a macro during runtime. 
  5683.  
  5684. Value   returns the value of the found attribute record.  Its value is 
  5685.         unchanged if no attribute record was found at the specified location. 
  5686.  
  5687. IsPush  returns the value of the support field of the found attribute.  This 
  5688.         parameter's value is unchanged if no attribute record was found at the 
  5689.         specified location. 
  5690.  
  5691. Offset  The offset of the position being queried.  Must be a negative value, 
  5692.         indicating a position before the specified character location. 
  5693.  
  5694. Column  The column number of the position being queried. 
  5695.  
  5696. Line    The line number of the position being queried. 
  5697.  
  5698. FileID  The fileid of the position being queried.  If unspecified, the current 
  5699.         file will be assumed. 
  5700.  
  5701. See Attribute Pairs for additional information on attributes. 
  5702.  
  5703.  
  5704. ΓòÉΓòÉΓòÉ 4.1.136. QUERYFONT ΓòÉΓòÉΓòÉ
  5705.  
  5706. Choose: 
  5707.  
  5708. o Syntax 
  5709. o Definition 
  5710. o E Language Syntax 
  5711.  
  5712.  
  5713. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5714.  
  5715. QUERYFONT (font_id) 
  5716.  
  5717.  
  5718. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5719.  
  5720. Returns the font description associated with font_id, in the form 
  5721. fontname.fontsize.fontsel - e.g. 
  5722.  
  5723.    Courier.DD100WW9HH8BB.0
  5724.    Times New Roman.DD240WW0HH0.0
  5725. In fontsize, the numbers following DD are the size of the font in decipoints 
  5726. for a proportional font, and the numbers following WW and HH are the width and 
  5727. height of the font in pixels for a monospaced font.  The BB is present at the 
  5728. end if the font is a bitmapped font.  'fontsel' is any combination of 
  5729.  
  5730.   1 = Italic
  5731.   2 = Underscore
  5732.   8 = Outline
  5733.  16 = Strikeout
  5734.  32 = Bold
  5735.  
  5736.  
  5737. ΓòÉΓòÉΓòÉ 4.1.137. QUERYMENUSTRING(menuname, id) ΓòÉΓòÉΓòÉ
  5738.  
  5739. Choose: 
  5740.  
  5741. o Syntax 
  5742. o Definition 
  5743. o E Language Syntax 
  5744.  
  5745.  
  5746. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5747.  
  5748. QUERYMENUSTRING( menuname , id ) 
  5749.  
  5750.  
  5751. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5752.  
  5753. Determines the command to be executed by the menu specified by the menuname and 
  5754. by id. See Building Menus from the Macro Language for more information on the 
  5755. QUERYMENUSTRING statement. 
  5756.  
  5757.  
  5758. ΓòÉΓòÉΓòÉ 4.1.138. QUERYPROFILE(application, key_name) ΓòÉΓòÉΓòÉ
  5759.  
  5760. Choose: 
  5761.  
  5762. o Syntax 
  5763. o Definition 
  5764. o E Language Syntax 
  5765.  
  5766.  
  5767. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5768.  
  5769. QUERYPROFILE( file_handle, application , key_name ) 
  5770.  
  5771.  
  5772. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5773.  
  5774. Returns the value for key key_name listed under the application application, 
  5775. found in the .INI file given by the file_handle or the null string if not 
  5776. found.  file_handle. can be any of 
  5777.  
  5778. HINI_USERPROFILE (a constant)  Indicates the user profile (OS2.INI) should be 
  5779.           used. 
  5780.  
  5781. HINI_SYSTEMPROFILE (a constant)  Indicates the system profile (OS2SYS.INI) 
  5782.           should be used. 
  5783.  
  5784. HINI_PROFILE (a constant)  Indicates that both the user and system profiles 
  5785.           should be searched. 
  5786.  
  5787. APP_HINI  (a universal variable)  Indicates that the application profile should 
  5788.           be used.  For EPM, this is EPM.INI.  Other users of the E Toolkit can 
  5789.           have other application profiles. 
  5790.  
  5791.  
  5792. ΓòÉΓòÉΓòÉ 4.1.139. QUIETSHELL  string_expression ΓòÉΓòÉΓòÉ
  5793.  
  5794. Choose: 
  5795.  
  5796. o Syntax 
  5797. o Definition 
  5798. o Example 
  5799. o E Language Syntax 
  5800.  
  5801.  
  5802. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5803.  
  5804. QUIETSHELL | QUIET_SHELL string_expression 
  5805.  
  5806.  
  5807. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5808.  
  5809. Executes string_expression. string_expression is to be an OS/2 command. If 
  5810. string_expression is an external program, the screen and cursor are not touched 
  5811. before or after the program is executed. 
  5812.  
  5813.  
  5814. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5815.  
  5816. Use this when you know the external program will not write to the screen, and 
  5817. you prefer not to see the screen clear and to be asked to press a key. Normally 
  5818. this is used to keep redirected utilities invisible, for example quietshell 
  5819. "subdir *.* >etemp". 
  5820.  
  5821. If the command DOES write to the screen, say after an unexpected error, its 
  5822. message will appear on top of E's text screen. The text will appear messy until 
  5823. the next time E refreshes the screen.  You can manually force a screen refresh 
  5824. by pressing ESC a couple of times. 
  5825.  
  5826. Another example is quietshell "mc2", which runs Richard Redpath's MC2 
  5827. calculator. This is an unusual example because MC2 does write to the screen, 
  5828. but it takes responsibility for restoring the screen contents it found. The 
  5829. effect is that of a pop-up calculator on top of the text screen. 
  5830.  
  5831.  
  5832. ΓòÉΓòÉΓòÉ 4.1.140. REFLOW ΓòÉΓòÉΓòÉ
  5833.  
  5834. Choose: 
  5835.  
  5836. o Syntax 
  5837. o Definition 
  5838. o E Language Syntax 
  5839.  
  5840.  
  5841. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5842.  
  5843. REFLOW 
  5844.  
  5845.  
  5846. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5847.  
  5848. Reformats marked text using current margin settings, like the standard Alt-P. 
  5849.  
  5850.  
  5851. ΓòÉΓòÉΓòÉ 4.1.141. REFRESH ΓòÉΓòÉΓòÉ
  5852.  
  5853. Choose: 
  5854.  
  5855. o Syntax 
  5856. o Definition 
  5857. o E Language Syntax 
  5858.  
  5859.  
  5860. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5861.  
  5862. REFRESH 
  5863.  
  5864.  
  5865. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5866.  
  5867. Activates the active file in the top level ring. Activates the top level ring 
  5868. and updates portions of screen which need to be updated. 
  5869.  
  5870.  
  5871. ΓòÉΓòÉΓòÉ 4.1.142. REGEXPCOMP(grep_string) ΓòÉΓòÉΓòÉ
  5872.  
  5873. New in EPM 6.02. 
  5874.  
  5875. Choose: 
  5876.  
  5877. o Syntax 
  5878. o Definition 
  5879. o Example 
  5880. o E Language Syntax 
  5881.  
  5882.  
  5883. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5884.  
  5885. REGEXPCOMP( grep_string ) 
  5886.  
  5887.  
  5888. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5889.  
  5890. Compiles the extended GREP search string into an EGREP program, and returns a 
  5891. pointer to that program. 
  5892.  
  5893.  
  5894. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5895.  
  5896. regprog = RegExpComp('Dos(Alloc|Free)~Seg')
  5897.  
  5898. See also: 
  5899.  
  5900. o Pos function 
  5901. o RegExpExec function, to execute a pre-compiled EGREP program 
  5902.  
  5903.  
  5904. ΓòÉΓòÉΓòÉ 4.1.143. REGEXPEXEC(grep_prog, search_string) ΓòÉΓòÉΓòÉ
  5905.  
  5906. New in EPM 6.02. 
  5907.  
  5908. Choose: 
  5909.  
  5910. o Syntax 
  5911. o Definition 
  5912. o Example 
  5913. o E Language Syntax 
  5914.  
  5915.  
  5916. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5917.  
  5918. REGEXPEXEC( grep_program search_string ) 
  5919.  
  5920.  
  5921. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5922.  
  5923. Searches the search string using the EGREP program, and returns the starting 
  5924. position of a successful match, or 0 if no match could be found. 
  5925.  
  5926.  
  5927. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5928.  
  5929. regprog = RegExpComp('Dos(Alloc|Free)~Seg')
  5930. result = RegExpExec(regprog, textline(.line))
  5931. if result then
  5932.    sayerror 'Found at' substr(textline(.line), result)
  5933. else
  5934.    sayerror 'Not found.'
  5935. endif
  5936. call dynalink32(E_DLL,         -- E_DLL is defined in STDCONST.E.
  5937.                 'myfree',      -- We must free the
  5938.                 atol(regprog)) -- program, when done with it.
  5939.  
  5940. See also: 
  5941.  
  5942. o Pos function 
  5943. o RegExpComp function, to pre-compile an EGREP program 
  5944.  
  5945.  
  5946. ΓòÉΓòÉΓòÉ 4.1.144. REGISTERFONT ΓòÉΓòÉΓòÉ
  5947.  
  5948. Choose: 
  5949.  
  5950. o Syntax 
  5951. o Definition 
  5952. o Example 
  5953. o E Language Syntax 
  5954.  
  5955.  
  5956. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5957.  
  5958. REGISTERFONT (fontname, fontsize,fontsel) 
  5959.  
  5960.  
  5961. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5962.  
  5963. Loads the font specified and returns an identifier that can be set in the .font 
  5964. field or which can be used as the value of a font attribute. 
  5965.  
  5966. 'fontsel' is any combination of 
  5967.  
  5968.   1 = Italic
  5969.   2 = Underscore
  5970.   8 = Outline
  5971.  16 = Strikeout
  5972.  32 = Bold
  5973.  
  5974.  
  5975. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5976.  
  5977. Examples: 
  5978.  
  5979.   .font = registerfont('Times New Roman', 24, 0)  -- Set a 24-point font.
  5980.   .font = registerfont('System Monospaced','WW8HH16',0)  -- 8 x 16 font
  5981.  
  5982.  
  5983. ΓòÉΓòÉΓòÉ 4.1.145. RELINK ΓòÉΓòÉΓòÉ
  5984.  
  5985. Choose: 
  5986.  
  5987. o Syntax 
  5988. o Definition 
  5989. o E Language Syntax 
  5990.  
  5991.  
  5992. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5993.  
  5994. Is described in section Linkable External Modules. 
  5995.  
  5996.  
  5997. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5998.  
  5999. Is described in section Linkable External Modules. 
  6000.  
  6001.  
  6002. ΓòÉΓòÉΓòÉ 4.1.146. REPEATFIND ΓòÉΓòÉΓòÉ
  6003.  
  6004. Choose: 
  6005.  
  6006. o Syntax 
  6007. o Definition 
  6008. o E Language Syntax 
  6009.  
  6010.  
  6011. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6012.  
  6013. REPEATFIND | REPEAT_FIND 
  6014.  
  6015.  
  6016. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6017.  
  6018. Repeats find of last string searched, like the standard Ctrl-F. The previous 
  6019. search options are preserved. (Note: If the cursor is currently at the 
  6020. beginning of a target search string, it skips to the next occurrence.) 
  6021.  
  6022.  
  6023. ΓòÉΓòÉΓòÉ 4.1.147. REPLACELINE new_line  [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  6024.  
  6025. Choose: 
  6026.  
  6027. o Syntax 
  6028. o Definition 
  6029. o Example 
  6030. o E Language Syntax 
  6031.  
  6032.  
  6033. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6034.  
  6035. REPLACELINE new_line [, {;} line_number   [, {;} fileid] ] 
  6036.  
  6037.  
  6038. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6039.  
  6040. Replaces a specified line in the specified file with the contents of variable 
  6041. new_line Defaulted values for omitted parameters are line_number = current 
  6042. line, and fileid = current file. See example under GETLINE. 
  6043.  
  6044.  
  6045. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6046.  
  6047. For example: 
  6048.  
  6049. REPLACELINE line
  6050. /* Replaces current line of current file with line */
  6051.  
  6052. REPLACELINE  line, 7
  6053. /* Replaces line 7 of current file with line */
  6054.  
  6055. REPLACELINE  line, 3, ThatFile
  6056. /* Replace line 3 of file whose fileid
  6057.      is in variable ThatFile with line */
  6058.  
  6059.  
  6060. ΓòÉΓòÉΓòÉ 4.1.148. RETURN [expression] ΓòÉΓòÉΓòÉ
  6061.  
  6062. Choose: 
  6063.  
  6064. o Syntax 
  6065. o Definition 
  6066. o E Language Syntax 
  6067.  
  6068.  
  6069. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6070.  
  6071. RETURN [expression] 
  6072.  
  6073.  
  6074. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6075.  
  6076. Returns expression to caller. If no expression is supplied, a null value is 
  6077. returned to the caller. From a procedure, the returned value is passed back to 
  6078. the caller as a function value (as in x=myproc()). From a command the returned 
  6079. value is assigned to RC. 
  6080.  
  6081. When returning from a key (DEF), an expression is not allowed.  A return from a 
  6082. key DEF is unusual, since keys do not return values, but a return is sometimes 
  6083. used as an easy early exit from a key's program. A return is better than a STOP 
  6084. in case some other procedure was "calling" the key with an executekey; a STOP 
  6085. prevents the caller from regaining control. 
  6086.  
  6087.  
  6088. ΓòÉΓòÉΓòÉ 4.1.149. REVERSE(string) ΓòÉΓòÉΓòÉ
  6089.  
  6090. Choose: 
  6091.  
  6092. o Syntax 
  6093. o Definition 
  6094. o Example 
  6095. o E Language Syntax 
  6096.  
  6097.  
  6098. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6099.  
  6100. REVERSE( string_expression ) 
  6101.  
  6102.  
  6103. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6104.  
  6105. Returns the reverse of the string string. 
  6106.  
  6107.  
  6108. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6109.  
  6110. Here are some examples: 
  6111.  
  6112.     REVERSE('BACKWORDS') --> 'SDROWKCAB'
  6113.     REVERSE('seluR MPE') --> 'EPM Rules'
  6114.  
  6115.  
  6116. ΓòÉΓòÉΓòÉ 4.1.150. RIGHT ΓòÉΓòÉΓòÉ
  6117.  
  6118. Choose: 
  6119.  
  6120. o Syntax 
  6121. o Definition 
  6122. o E Language Syntax 
  6123.  
  6124.  
  6125. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6126.  
  6127. RIGHT 
  6128.  
  6129.  
  6130. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6131.  
  6132. Moves cursor one character to the right, like the standard key Right. 
  6133.  
  6134.  
  6135. ΓòÉΓòÉΓòÉ 4.1.151. RIGHTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  6136.  
  6137. Choose: 
  6138.  
  6139. o Syntax 
  6140. o Definition 
  6141. o Example 
  6142. o E Language Syntax 
  6143.  
  6144.  
  6145. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6146.  
  6147. RIGHTSTR( string,  length   [, pad] ) 
  6148.  
  6149.  
  6150. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6151.  
  6152. Returns a string of length length containing the right-most length characters 
  6153. of string. That is, padded with pad characters (or truncated) on the left as 
  6154. needed. The default pad character is a blank. length must be non-negative. 
  6155.  
  6156.  
  6157. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6158.  
  6159. Here are some examples: 
  6160.  
  6161.     RIGHTSTR('abc  d',8)   -->  '  abc  d'
  6162.     RIGHTSTR('abc def',5)  -->  'c def'
  6163.     RIGHTSTR('12',5,'0')   -->  '00012'
  6164.  
  6165.  
  6166. ΓòÉΓòÉΓòÉ 4.1.152. RUBOUT ΓòÉΓòÉΓòÉ
  6167.  
  6168. Choose: 
  6169.  
  6170. o Syntax 
  6171. o Definition 
  6172. o E Language Syntax 
  6173.  
  6174.  
  6175. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6176.  
  6177. RUBOUT 
  6178.  
  6179.  
  6180. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6181.  
  6182. Deletes character to left of cursor, like the standard key Backspace. 
  6183.  
  6184.  
  6185. ΓòÉΓòÉΓòÉ 4.1.153. SAYAT string, row, column, attribute [,length][,window] ΓòÉΓòÉΓòÉ
  6186.  
  6187. Choose: 
  6188.  
  6189. o Syntax 
  6190. o Definition 
  6191. o Example 
  6192. o E Language Syntax 
  6193.  
  6194.  
  6195. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6196.  
  6197. SAYAT string, row, column,   attribute [, length] 
  6198.  
  6199.  
  6200. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6201.  
  6202. Writes string at the screen location specified by row (any number included in 
  6203. 1..screenheight()) and column (any number included in 1..screenwidth()). The 
  6204. parameter attribute allows you to specify any screen attribute (0..255 or any 
  6205. constant color value listed in COLORS.e) to highlight string. If length is 
  6206. omitted, E assumes length = LENGTH(string). If length < LENGTH(string), E 
  6207. writes the first length number of characters. If length > LENGTH(string), E 
  6208. changes the screen attribute to attribute for the last length - LENGTH(string) 
  6209. number of character positions without changing the text. 
  6210.  
  6211. The window option defines which text window area should be written to by the 
  6212. SAYAT statement. 0=Edit Window, 1=Extra window. The extra window is the window 
  6213. that makes up the status line and message line. The edit window is everything 
  6214. else. 
  6215.  
  6216.  
  6217. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6218.  
  6219. Examples:
  6220.  
  6221. /* write red string in upper right corner */
  6222. sayat 'mymessage', 1, 70, RED
  6223.  
  6224. /* change screen positions (10,20) to (10,24)
  6225.    to green color without changing text */
  6226. sayat '', 10, 20, GREEN, 5
  6227.  
  6228. To put a message to the message line, use the MESSAGE() defproc. 
  6229.  
  6230. Note:  that something printed with the SAYAT statement only stays on the screen 
  6231. until a screen refresh is done. Since a SAYERROR call produces a screen 
  6232. refresh, combining these two statements: 
  6233.  
  6234.   sayat 'My Procedure.', 12, 20, GREEN, 5
  6235.   sayerror "File not found!"
  6236. will result in the SAYAT message never being seen. To prevent this, you can use 
  6237. the DISPLAY statement to stop screen refreshing, for example: 
  6238.  
  6239. display -1              -- turn off display updating
  6240.   sayat 'My Procedure.', 12, 20 ,GREEN, 5
  6241.   sayerror "File not found!"
  6242. display +1              -- turn on display updating
  6243. In this way, the screen will not be refreshed (and therefore the message will 
  6244. stay on the screen) until the next screen update. 
  6245.  
  6246.  
  6247. ΓòÉΓòÉΓòÉ 4.1.154. SAYERROR expression ΓòÉΓòÉΓòÉ
  6248.  
  6249. Choose: 
  6250.  
  6251. o Syntax 
  6252. o Definition 
  6253. o Example 
  6254. o E Language Syntax 
  6255.  
  6256.  
  6257. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6258.  
  6259. SAYERROR( expression ) 
  6260.  
  6261.  
  6262. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6263.  
  6264. Should not be confused with the built-in procedure SAYERROR() described in this 
  6265. section. 
  6266.  
  6267. If expression is the number 0 or 1, any pending error messages are discarded 
  6268. and not displayed. 0 will refresh the screen; 1 will not. 
  6269.  
  6270. If expression is any number other than 0 or 1, `the interpreter displays the 
  6271. string corresponding to that numbered error message.  Error messages and their 
  6272. corresponding return codes are listed in the section Return Codes. 
  6273.  
  6274. Each command in the E language returns a code which indicates any errors that 
  6275. were encountered while trying to perform the command.  Each of these return 
  6276. codes has a corresponding string which explains the error. 
  6277.  
  6278.  
  6279. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6280.  
  6281. For example: 
  6282.  
  6283.   sayerror -275
  6284.  
  6285. This will display the text "Missing filename" on the message line. 
  6286.  
  6287. If expression is a number which does not correspond to a return code, an 
  6288. "ERROR: Message not available" message is printed on the message line. 
  6289.  
  6290. If expression is anything other than a number, the text will be displayed on 
  6291. the message line. For example: 
  6292.  
  6293.   err1 = "-275"   -- remember everything is a string
  6294.   sayerror err1   --  equivalent to: err1 = -275
  6295.  
  6296.   err2 = "David"
  6297.   sayerror err2
  6298.  
  6299. The first example will display the error message (not "-275") on the message 
  6300. line. The second example will display the text David on the message line. 
  6301.  
  6302. A combination of text and numbers will act as if it were all text. For example: 
  6303.  
  6304.    sayerror "The error message was " err1
  6305.  
  6306. The intention to display all text would not work in this case. Instead the user 
  6307. would get: 
  6308.  
  6309.   The error message was -275
  6310.  
  6311. The error code did not get translated. 
  6312.  
  6313. To help clarify this explanation, try entering and compiling the following 
  6314. defc: 
  6315.  
  6316.   defc mytest
  6317.     sayerror arg(1)
  6318.  
  6319. Then experiment by typing in the command line dialog box mytest followed by 
  6320. valid error numbers, invalid error numbers, text, and text with numbers to 
  6321. determine what will happen. 
  6322.  
  6323.  
  6324. ΓòÉΓòÉΓòÉ 4.1.155. SAYERROR(error_string) ΓòÉΓòÉΓòÉ
  6325.  
  6326. Choose: 
  6327.  
  6328. o Syntax 
  6329. o Definition 
  6330. o Example 
  6331. o E Language Syntax 
  6332.  
  6333.  
  6334. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6335.  
  6336. SAYERROR expression 
  6337.  
  6338.  
  6339. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6340.  
  6341. Returns the return code specified by error_string. Note that this is only true 
  6342. if the sayerror procedure acts as a function and returns a return code. If the 
  6343. SAYERROR() procedure is not assigned and not used in a comparison, then the 
  6344. procedure acts the same as the SAYERROR statement (also described in this 
  6345. section). 
  6346.  
  6347.  
  6348. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6349.  
  6350. For example: 
  6351.  
  6352.   x = sayerror("new file")
  6353.   sayerror("new file")
  6354.  
  6355. The first example will put the return code for new file (ie. -282) into the 
  6356. variable x. The second example will act in the same manner as a SAYERROR 
  6357. statement and would display the words "new file" on the message line. 
  6358.  
  6359.  The case of error_string does not matter. The compiler will convert 
  6360. error_string to uppercase and then perform the lookup for error_string. The 
  6361. compiler reduces sayerror(error_string) to a constant for efficiency. 
  6362. Therefore, if the words new file were changed to gobbildy gook (not a valid 
  6363. error message), the compiler would not compile and return an "invalid 
  6364. parameter" error message. 
  6365.  
  6366. The most common usage of this is to test an return code to see if a certain 
  6367. error occurred. For example: 
  6368.  
  6369.      'e myfile'
  6370.      if rc=sayerror("new file") then
  6371. All error messages and their corresponding RC code numbers can be found in 
  6372. Return Codes. 
  6373.  
  6374.  
  6375. ΓòÉΓòÉΓòÉ 4.1.156. SAYERRORTEXT(rc) ΓòÉΓòÉΓòÉ
  6376.  
  6377. Choose: 
  6378.  
  6379. o Syntax 
  6380. o Definition 
  6381. o E Language Syntax 
  6382.  
  6383.  
  6384. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6385.  
  6386. SAYERRORTEXT'(' numeric_expression ')' 
  6387.  
  6388.  
  6389. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6390.  
  6391. Returns the message that would be displayed for error code rc. 
  6392.  
  6393.  
  6394. ΓòÉΓòÉΓòÉ 4.1.157. SCREENHEIGHT() ΓòÉΓòÉΓòÉ
  6395.  
  6396. Choose: 
  6397.  
  6398. o Syntax 
  6399. o Definition 
  6400. o E Language Syntax 
  6401.  
  6402.  
  6403. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6404.  
  6405. SCREENHEIGHT() 
  6406.  
  6407.  
  6408. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6409.  
  6410. Returns physical screenheight, usually 25. 
  6411.  
  6412.  
  6413. ΓòÉΓòÉΓòÉ 4.1.158. SCREENWIDTH() ΓòÉΓòÉΓòÉ
  6414.  
  6415. Choose: 
  6416.  
  6417. o Syntax 
  6418. o Definition 
  6419. o E Language Syntax 
  6420.  
  6421.  
  6422. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6423.  
  6424. SCREENWIDTH() 
  6425.  
  6426.  
  6427. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6428.  
  6429. Returns physical screenwidth, usually 80. 
  6430.  
  6431.  
  6432. ΓòÉΓòÉΓòÉ 4.1.159. SEG(variable) ΓòÉΓòÉΓòÉ
  6433.  
  6434. Choose: 
  6435.  
  6436. o Syntax 
  6437. o Definition 
  6438. o Example 
  6439. o E Language Syntax 
  6440.  
  6441.  
  6442. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6443.  
  6444. SEG( variable ) 
  6445.  
  6446.  
  6447. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6448.  
  6449. Returns a string representation of the segment of the actual memory address of 
  6450. variable. 
  6451.  
  6452.  
  6453. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6454.  
  6455. For example:
  6456.  
  6457.     v = 'testing'
  6458.     sayerror peek( seg(v), ofs(v), 7 )
  6459.  
  6460. The above example prints testing. See also OFS(). 
  6461.  
  6462.  
  6463. ΓòÉΓòÉΓòÉ 4.1.160. SELECTOR(variable) ΓòÉΓòÉΓòÉ
  6464.  
  6465. Choose: 
  6466.  
  6467. o Syntax 
  6468. o Definition 
  6469. o E Language Syntax 
  6470.  
  6471.  
  6472. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6473.  
  6474. SELECTOR( variable ) 
  6475.  
  6476.  
  6477. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6478.  
  6479. Returns the segment address of variable in the form of a binary word. To be 
  6480. used with C functions, like those made via DYNALINK(). 
  6481.  
  6482. This function it is to be used only during the protected mode execution. 
  6483.  
  6484.  
  6485. ΓòÉΓòÉΓòÉ 4.1.161. SETMARK ΓòÉΓòÉΓòÉ
  6486.  
  6487. Choose: 
  6488.  
  6489. o Syntax 
  6490. o Definition 
  6491. o E Language Syntax 
  6492.  
  6493.  
  6494. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6495.  
  6496. SETMARK firstline, lastline, firstcol, lastcol, marktype, fileid 
  6497.  
  6498.  
  6499. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6500.  
  6501. Sets a mark in file 'fileid' from firstline firstcol to lastline lastcol. 
  6502. marktype must be one of: 
  6503.  
  6504.  0 = line mark
  6505.  1 = char mark
  6506.  2 = block mark
  6507.  3 = charg mark
  6508.  4 = blockg mark
  6509.  
  6510.  
  6511. ΓòÉΓòÉΓòÉ 4.1.162. SETPROFILE(handle, application, key_name, data) ΓòÉΓòÉΓòÉ
  6512.  
  6513. Choose: 
  6514.  
  6515. o Syntax 
  6516. o Definition 
  6517. o E Language Syntax 
  6518.  
  6519.  
  6520. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6521.  
  6522. SETPROFILE( numeric_expression, string_expression, string_expression, 
  6523. string_expression ) 
  6524.  
  6525.  
  6526. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6527.  
  6528. Sets the value for key key_name listed under the application application to 
  6529. data in the .INI file represented by  handle.  handle. can be any of 
  6530.  
  6531. HINI_USERPROFILE (a constant)  Indicates the user profile (OS2.INI) should be 
  6532.           used. 
  6533.  
  6534. HINI_SYSTEMPROFILE (a constant)  Indicates the system profile (OS2SYS.INI) 
  6535.           should be used. 
  6536.  
  6537. HINI_PROFILE (a constant)  Indicates that both the user and system profiles 
  6538.           should be searched. 
  6539.  
  6540. APP_HINI  (a universal variable)  Indicates that the application profile should 
  6541.           be used.  For EPM, this is EPM.INI.  Other users of the E Toolkit can 
  6542.           have other application profiles. 
  6543.  
  6544.  
  6545. ΓòÉΓòÉΓòÉ 4.1.163. SETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  6546.  
  6547. Choose: 
  6548.  
  6549. o Syntax 
  6550. o Definition 
  6551. o Example 
  6552. o E Language Syntax 
  6553.  
  6554.  
  6555. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6556.  
  6557. SETSEARCH identifier 
  6558.  
  6559.  
  6560. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6561.  
  6562. Retrieves the search command string saved in the variable search_cmd via a 
  6563. GETSEARCH statement. These two statements allow the user to save a search 
  6564. command, perform other searches and then retrieve the original command, so that 
  6565. Ctrl-F's and REPEATFIND statements refer to the original search pattern. 
  6566.  
  6567.  
  6568. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6569.  
  6570. For example: 
  6571.  
  6572.    'xcom L /foobar/c'
  6573.    GETSEARCH search_command
  6574.    'L /word'
  6575.    SETSEARCH search_command
  6576. The first statement in the above example issues a search command. The GETSEARCH 
  6577. statement effectively sets the variable search_command to 'xcom L/foobar/c'. 
  6578. Then another search command is issued, wiping out the first search command, but 
  6579. the SETSEARCH statement restores the first command, so that if a Ctrl-F 
  6580. (REPEAT_FIND) is now executed, the string foobar will be once again located. 
  6581.  
  6582.  
  6583. ΓòÉΓòÉΓòÉ 4.1.164. SHIFTLEFT ΓòÉΓòÉΓòÉ
  6584.  
  6585. Choose: 
  6586.  
  6587. o Syntax 
  6588. o Definition 
  6589. o E Language Syntax 
  6590.  
  6591.  
  6592. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6593.  
  6594. SHIFTLEFT | SHIFT_LEFT 
  6595.  
  6596.  
  6597. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6598.  
  6599. Shifts marked text 1 position to left, like the standard Ctrl-F7. 
  6600.  
  6601.  
  6602. ΓòÉΓòÉΓòÉ 4.1.165. SHIFTRIGHT ΓòÉΓòÉΓòÉ
  6603.  
  6604. Choose: 
  6605.  
  6606. o Syntax 
  6607. o Definition 
  6608. o E Language Syntax 
  6609.  
  6610.  
  6611. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6612.  
  6613. SHIFTRIGHT | SHIFT_RIGHT 
  6614.  
  6615.  
  6616. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6617.  
  6618. Shifts marked text 1 position to right, like the standard Ctrl-F8. 
  6619.  
  6620.  
  6621. ΓòÉΓòÉΓòÉ 4.1.166. SHOWMENU ΓòÉΓòÉΓòÉ
  6622.  
  6623. Choose: 
  6624.  
  6625. o Syntax 
  6626. o Definition 
  6627. o E Language Syntax 
  6628.  
  6629.  
  6630. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6631.  
  6632. SHOWMENU 
  6633.  
  6634.  
  6635. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6636.  
  6637. Displays a menu after it has been built. See the section Building Menus from 
  6638. the Macro Language for more information on the SHOWMENU statement. 
  6639.  
  6640.  
  6641. ΓòÉΓòÉΓòÉ 4.1.167. SPLIT ΓòÉΓòÉΓòÉ
  6642.  
  6643. Choose: 
  6644.  
  6645. o Syntax 
  6646. o Definition 
  6647. o E Language Syntax 
  6648.  
  6649.  
  6650. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6651.  
  6652. SPLIT 
  6653.  
  6654.  
  6655. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6656.  
  6657. Splits current line at cursor position, like the standard Alt-S. 
  6658.  
  6659.  
  6660. ΓòÉΓòÉΓòÉ 4.1.168. STOP ΓòÉΓòÉΓòÉ
  6661.  
  6662. Choose: 
  6663.  
  6664. o Syntax 
  6665. o Definition 
  6666. o E Language Syntax 
  6667.  
  6668.  
  6669. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6670.  
  6671. STOP 
  6672.  
  6673.  
  6674. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6675.  
  6676. Stops execution of interpreter. A RETURN statement returns control to any 
  6677. calling procedures, however the STOP statement ends the execution immediately. 
  6678. RETURN is the preferred means of exiting a procedure, however, STOP is useful 
  6679. for terminating execution on a critical error. 
  6680.  
  6681.  
  6682. ΓòÉΓòÉΓòÉ 4.1.169. STOPONRC ΓòÉΓòÉΓòÉ
  6683.  
  6684. Choose: 
  6685.  
  6686. o Syntax 
  6687. o Definition 
  6688. o E Language Syntax 
  6689.  
  6690.  
  6691. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6692.  
  6693. STOPONRC | STOP_ON_RC 
  6694.  
  6695.  
  6696. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6697.  
  6698. Stops execution of interpreter only if rc is non-zero. 
  6699.  
  6700.  
  6701. ΓòÉΓòÉΓòÉ 4.1.170. STRIP(string [,option] [,char]) ΓòÉΓòÉΓòÉ
  6702.  
  6703. Choose: 
  6704.  
  6705. o Syntax 
  6706. o Definition 
  6707. o Example 
  6708. o E Language Syntax 
  6709.  
  6710.  
  6711. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6712.  
  6713. STRIP( string [,  (L|T|B)]  [,  'char' ] ) 
  6714.  
  6715.  
  6716. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6717.  
  6718. Removes char from string in any of the following positions depending upon the 
  6719. option specified: 
  6720.  
  6721. Option:        Position: 
  6722. 'L' 
  6723.                Leading 
  6724. 'T' 
  6725.                Trailing 
  6726. 'B' 
  6727.                Both 
  6728.  
  6729. If option is omitted, the default is B. If char is omitted, the default is the 
  6730. space character.  (Same as REXX.) 
  6731.  
  6732.  
  6733. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6734.  
  6735.    strip('  ab c  ')     = 'ab c'
  6736.    strip('  ab c  ','L') = 'ab c  '
  6737.  
  6738. Note:  Calling the STRIP() function does not actually change the value of the 
  6739. parameter string. In order to modify a variable you must assign to it, for 
  6740. example: 
  6741.  
  6742. field = strip( field )
  6743.  
  6744.  
  6745. ΓòÉΓòÉΓòÉ 4.1.171. SUBSTR(string,n [,k [,pad] ]) ΓòÉΓòÉΓòÉ
  6746.  
  6747. Choose: 
  6748.  
  6749. o Syntax 
  6750. o Definition 
  6751. o Example 
  6752. o E Language Syntax 
  6753.  
  6754.  
  6755. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6756.  
  6757. SUBSTR( string,  n [, length   [,  'pad' ] ] ) 
  6758.  
  6759.  
  6760. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6761.  
  6762. Returns the substring of string which begins at the nth character, and is of 
  6763. length, padded with blanks or the specified character (pad). If length is 
  6764. omitted, it defaults to be the rest of the string.  The default pad character 
  6765. is a blank. n must be positive. 
  6766.  
  6767.  
  6768. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6769.  
  6770.     SUBSTR('abc',2)       == 'bc'
  6771.     SUBSTR('abc',2,4)     == 'bc  '
  6772.     SUBSTR('abc',2,6,'.') == 'bc....'
  6773.  
  6774. Note: in some situations the positional (numeric) patterns of parsing templates 
  6775. are more convenient for selecting substring, especially if more than one 
  6776. substring is to be extracted from a string. 
  6777.  
  6778.  
  6779. ΓòÉΓòÉΓòÉ 4.1.172. SUBWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  6780.  
  6781. Choose: 
  6782.  
  6783. o Syntax 
  6784. o Definition 
  6785. o Example 
  6786. o E Language Syntax 
  6787.  
  6788.  
  6789. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6790.  
  6791. SUBWORD( string , n   [,  length] ) 
  6792.  
  6793.  
  6794. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6795.  
  6796. Returns the substring of string that begins at the nth word, and is of length 
  6797. length blank-delimited words. If length is not specified, the rest of the 
  6798. string is returned. n must be positive. The returned string will never have 
  6799. leading or trailing blanks, but will include all blanks between the selected 
  6800. words. 
  6801.  
  6802.  
  6803. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6804.  
  6805. Here are some examples: 
  6806.  
  6807.  SUBWORD('Now is the  time',2,2)    ->    'is the'
  6808.  SUBWORD('Now is the  time',3)      ->    'the  time'
  6809.  SUBWORD('Now is the  time',5)      ->    ''
  6810.  
  6811.  
  6812. ΓòÉΓòÉΓòÉ 4.1.173. TAB ΓòÉΓòÉΓòÉ
  6813.  
  6814. Choose: 
  6815.  
  6816. o Syntax 
  6817. o Definition 
  6818. o E Language Syntax 
  6819.  
  6820.  
  6821. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6822.  
  6823. TAB 
  6824.  
  6825.  
  6826. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6827.  
  6828. Moves cursor to next tab stop, like standard key Tab. 
  6829.  
  6830.  
  6831. ΓòÉΓòÉΓòÉ 4.1.174. TABGLYPH(bool) ΓòÉΓòÉΓòÉ
  6832.  
  6833. New in EPM 6. 
  6834.  
  6835. Choose: 
  6836.  
  6837. o Syntax 
  6838. o Definition 
  6839. o Example 
  6840. o E Language Syntax 
  6841.  
  6842.  
  6843. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6844.  
  6845. TABGLYPH( [bool] ) 
  6846.  
  6847.  
  6848. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6849.  
  6850. If an argument is given, sets the TabGlyph flag to that value. Returns the 
  6851. value that the TabGlyph flag had before the call. 
  6852.  
  6853. If the TabGlyph flag is 1, tab characters will be displayed using a 
  6854. proportional-width tab glyph (the usual glyph for an ASCII 9 is a circle).  If 
  6855. the TabGlyph flag is 0, tab characters will just display as whitespace.  The 
  6856. initial value is 0. 
  6857.  
  6858.  
  6859. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6860.  
  6861. definit          -- (In MYSTUFF.E)
  6862. compile if EPM32
  6863.    call tabglyph(1)  -- I prefer to see the difference between
  6864. compile endif        -- tabs and spaces.
  6865.  
  6866.  
  6867. ΓòÉΓòÉΓòÉ 4.1.175. TABWORD ΓòÉΓòÉΓòÉ
  6868.  
  6869. Choose: 
  6870.  
  6871. o Syntax 
  6872. o Definition 
  6873. o E Language Syntax 
  6874.  
  6875.  
  6876. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6877.  
  6878. TABWORD | TAB_WORD 
  6879.  
  6880.  
  6881. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6882.  
  6883. Positions cursor on first character of next word, like the standard key 
  6884. Ctrl-Right. If there are no more words, the cursor is positioned at the end of 
  6885. the last word. 
  6886.  
  6887.  
  6888. ΓòÉΓòÉΓòÉ 4.1.176. TEXTLINE(line_num) ΓòÉΓòÉΓòÉ
  6889.  
  6890. Choose: 
  6891.  
  6892. o Syntax 
  6893. o Definition 
  6894. o E Language Syntax 
  6895.  
  6896.  
  6897. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6898.  
  6899. TEXTLINE( line_num ) 
  6900.  
  6901.  
  6902. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6903.  
  6904. Returns the text of line number line_num. The following statements perform the 
  6905. same function: 
  6906.  
  6907.    getline line, i
  6908.  
  6909. and
  6910.  
  6911.    line = textline(i)
  6912. The TEXTLINE() procedure is simply a more economical way to do comparison loops 
  6913. like: 
  6914.  
  6915.    while textline(i) == ''
  6916.        deleteline i
  6917.  
  6918.  
  6919. ΓòÉΓòÉΓòÉ 4.1.177. TOP ΓòÉΓòÉΓòÉ
  6920.  
  6921. Choose: 
  6922.  
  6923. o Syntax 
  6924. o Definition 
  6925. o E Language Syntax 
  6926.  
  6927.  
  6928. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6929.  
  6930. TOP 
  6931.  
  6932.  
  6933. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6934.  
  6935. Moves cursor to top of file. 
  6936.  
  6937.  
  6938. ΓòÉΓòÉΓòÉ 4.1.178. TRANSLATE(string [, tableo [, tablei [ pad ]]] ) ΓòÉΓòÉΓòÉ
  6939.  
  6940. Choose: 
  6941.  
  6942. o Syntax 
  6943. o Definition 
  6944. o Example 
  6945. o E Language Syntax 
  6946.  
  6947.  
  6948. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6949.  
  6950. TRANSLATE( string [, tableo   [, tablei   [, pad ] ] ] ) 
  6951.  
  6952.  
  6953. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6954.  
  6955.  Translates characters in string to be other characters, or may be used to 
  6956. reorder characters in a string.  If neither translate table is given, string is 
  6957. simply translated to uppercase.  tableo is the output table and tablei is the 
  6958. input translate table (the default is ASCII 0...255).  The output table 
  6959. defaults to the null string, and is padded with pad or truncated as necessary. 
  6960. The default pad is a blank.  The tables may be of any length: the first 
  6961. occurrence of a character in the input table is the one that is used if there 
  6962. are duplicates. 
  6963.  
  6964.  
  6965. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6966.  
  6967. Examples:
  6968.  
  6969.   TRANSLATE('abcdef')                    ==    'ABCDEF'
  6970.   TRANSLATE('abbc','?','b')              ==    'a??c'
  6971.   TRANSLATE('abcdef','12','ec')          ==    'ab2d1f'
  6972.   TRANSLATE('abcdef','12','abcd','.')    ==    '12..ef'
  6973.   TRANSLATE('4123','abcd','1234')        ==    'dabc'
  6974.  
  6975. Note:  The last example shows how the TRANSLATE function may be used to reorder 
  6976. the characters in a string.  In the example, any 4-character string could be 
  6977. specified as the second argument and its last character would be moved to the 
  6978. beginning of the string. 
  6979.  
  6980.  
  6981. ΓòÉΓòÉΓòÉ 4.1.179. TRYINCLUDE filename ΓòÉΓòÉΓòÉ
  6982.  
  6983. Choose: 
  6984.  
  6985. o Syntax 
  6986. o Definition 
  6987. o E Language Syntax 
  6988.  
  6989.  
  6990. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6991.  
  6992. Is described in section Compiler Directive Statements. 
  6993.  
  6994.  
  6995. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6996.  
  6997. Is described in section Compiler Directive Statements. 
  6998.  
  6999.  
  7000. ΓòÉΓòÉΓòÉ 4.1.180. UNDO ΓòÉΓòÉΓòÉ
  7001.  
  7002. Choose: 
  7003.  
  7004. o Syntax 
  7005. o Definition 
  7006. o E Language Syntax 
  7007.  
  7008.  
  7009. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7010.  
  7011. UNDO 
  7012.  
  7013.  
  7014. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7015.  
  7016. Restores the current line after modification (but before leaving it), like the 
  7017. standard F9 key. Pressing the key (or issuing the statement) twice causes the 
  7018. UNDO to undo itself, i.e. the line is re-modified. 
  7019.  
  7020.  
  7021. ΓòÉΓòÉΓòÉ 4.1.181. UNDOACTION ΓòÉΓòÉΓòÉ
  7022.  
  7023. Choose: 
  7024.  
  7025. o Syntax 
  7026. o Definition 
  7027. o E Language Syntax 
  7028.  
  7029.  
  7030. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7031.  
  7032. UNDOACTION action, statevar 
  7033.  
  7034.  
  7035. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7036.  
  7037. Statevar must be a variable; it is used for input or output depending on the 
  7038. action.  Actions are: 
  7039.  
  7040. Action Value Result 
  7041.  
  7042. 1=GET_STATE Returns a handle for the current state of the current file.  If the 
  7043.           file hasn't changed since the the last time the file was checked, 
  7044.           then the same value is returned.  If the file has changed, the 
  7045.           current state is checkpointed and a new handle is returned. 
  7046.  
  7047. 2=GET_OLDEST_STATE The editor periodically forgets old states in order to save 
  7048.           memory.  This call allows one to determine the oldest reachable 
  7049.           state. 
  7050.  
  7051. 3=GOTO_STATE If the current state is not yet named, it is checkpointed and then 
  7052.           the content of the file is changed to reflect the specified state. 
  7053.  
  7054. 4=DISABLE_RECORDING The parameter specifies at which times state checkin should 
  7055.           no longer automatically be done.  A side effect of this command is to 
  7056.           checkin the current state if it is not already checked in. 
  7057.  
  7058.                     Times
  7059.                      0 upon starting each keystroke
  7060.                      1 upon starting each command
  7061.                      2 when moving the cursor from a modified line.
  7062.  
  7063. 5=ENABLE_RECORDING The parameter specifies at what additional times checkin 
  7064.           should be done. Unlike the disabling code, this operation does not 
  7065.           have checkin as a side effect.  See DISABLE for time codes. 
  7066.  
  7067. 6=QUERY_NAMED_SEQ This returns a string consisting of two numbers seperated by 
  7068.           an elipsis. This string represents the oldest and most recent states 
  7069.           that can be reached. These are lowlevel handles, so they can only be 
  7070.           use to call GOTO_STATE2.  The left most number returned represents 
  7071.           the oldest state the is currently remembered.  It is possible that it 
  7072.           is not reachable going to a state causes a checkpointing of the 
  7073.           current state and check pointing may require a trimming of the undo 
  7074.           tree.  If the current state is checked in, the second value 
  7075.           represents the current state.  If the current state is not checked 
  7076.           in, the second value represents the state of file when the next 
  7077.           checkin is done.  (Note a checkin will be done as a side effect of 
  7078.           the first GOTO.)  BTW, one can go to any state between the first and 
  7079.           last.  They do represent a temporal sequence. 
  7080.  
  7081. 7=GOTO_STATE2 This is like GOTO_STATE, except the parameter should be a low 
  7082.           level handle like those returned from QUERY_NAMED_SEQ. 
  7083.  
  7084.  
  7085. ΓòÉΓòÉΓòÉ 4.1.182. UNLINK ΓòÉΓòÉΓòÉ
  7086.  
  7087. Choose: 
  7088.  
  7089. o Syntax 
  7090. o Definition 
  7091. o E Language Syntax 
  7092.  
  7093.  
  7094. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7095.  
  7096. UNLINK string_expression 
  7097.  
  7098.  
  7099. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7100.  
  7101. Is described in section Linkable External Modules. 
  7102.  
  7103.  
  7104. ΓòÉΓòÉΓòÉ 4.1.183. UNMARK ΓòÉΓòÉΓòÉ
  7105.  
  7106. Choose: 
  7107.  
  7108. o Syntax 
  7109. o Definition 
  7110. o E Language Syntax 
  7111.  
  7112.  
  7113. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7114.  
  7115. UNMARK 
  7116.  
  7117.  
  7118. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7119.  
  7120. Removes text marks, like the standard key Alt-U. 
  7121.  
  7122.  
  7123. ΓòÉΓòÉΓòÉ 4.1.184. UP ΓòÉΓòÉΓòÉ
  7124.  
  7125. Choose: 
  7126.  
  7127. o Syntax 
  7128. o Definition 
  7129. o E Language Syntax 
  7130.  
  7131.  
  7132. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7133.  
  7134. UP 
  7135.  
  7136.  
  7137. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7138.  
  7139. Moves cursor 1 character up, like standard Up key. 
  7140.  
  7141.  
  7142. ΓòÉΓòÉΓòÉ 4.1.185. UPCASE(expression) ΓòÉΓòÉΓòÉ
  7143.  
  7144. Choose: 
  7145.  
  7146. o Syntax 
  7147. o Definition 
  7148. o E Language Syntax 
  7149.  
  7150.  
  7151. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7152.  
  7153. UPCASE( expression ) 
  7154.  
  7155.  
  7156. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7157.  
  7158. Returns the upper-case conversion of the expression. 
  7159.  
  7160.  
  7161. ΓòÉΓòÉΓòÉ 4.1.186. VALIDATEFILEID(fileid) ΓòÉΓòÉΓòÉ
  7162.  
  7163. New in EPM 6. 
  7164.  
  7165. Choose: 
  7166.  
  7167. o Syntax 
  7168. o Definition 
  7169. o E Language Syntax 
  7170.  
  7171.  
  7172. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7173.  
  7174. VALIDATEFILEID(fileid) 
  7175.  
  7176.  
  7177. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7178.  
  7179. Returns: 
  7180.  
  7181. 0   if the argument is not a fileid or viewid; 
  7182. 1   if the argument is a valid fileid for a normal file; 
  7183. 2   if the argument is a valid viewid; 
  7184. 3   if the argument is a fileid for an array. 
  7185.  
  7186.  
  7187. ΓòÉΓòÉΓòÉ 4.1.187. VER([option]) ΓòÉΓòÉΓòÉ
  7188.  
  7189. Choose: 
  7190.  
  7191. o Syntax 
  7192. o Definition 
  7193. o E Language Syntax 
  7194.  
  7195.  
  7196. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7197.  
  7198. VER([option]) 
  7199.  
  7200.  
  7201. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7202.  
  7203. Returns the version of the editor being used. 
  7204.  
  7205. If option is 1 then VER returns the editors numeric version. If option is 2, 
  7206. VER returns the minimum allowed version number of a E macro file to be used 
  7207. within this version.  If no option is specified, the version "string" is 
  7208. returned. 
  7209.  
  7210.  
  7211. ΓòÉΓòÉΓòÉ 4.1.188. VERIFY(string, reference [,options [,start] ] ) ΓòÉΓòÉΓòÉ
  7212.  
  7213. Choose: 
  7214.  
  7215. o Syntax 
  7216. o Definition 
  7217. o Example 
  7218. o E Language Syntax 
  7219.  
  7220.  
  7221. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7222.  
  7223. VERIFY( string ,  reference  [ ,(M|N)   [,  start] ]) 
  7224.  
  7225.  
  7226. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7227.  
  7228. verifies that string is composed only of characters from reference, by 
  7229. returning the position of the first character in string that is not also in 
  7230. reference.  If all the characters are present in reference, 0 is returned. The 
  7231. options are: 
  7232.  
  7233. 'Match'       and       'Nomatch'
  7234. If 'Match' is specified, i.e. the value of the third argument expression is a 
  7235. string beginning with 'M' or 'm', the position of the first character in string 
  7236. that is in reference is returned.  0 is returned if none of the characters are 
  7237. found. 'Nomatch' (or any string expression beginning with 'N' or 'n') can also 
  7238. be specified, although you would not normally do so because 'Nomatch' is the 
  7239. default. 
  7240.  
  7241. The default for start is 1, making the search start at the first character of 
  7242. string.  This can be overridden by giving a different start value, which must 
  7243. be positive. 
  7244.  
  7245. If string is null, 0 is returned regardless of the value of the third argument. 
  7246. Similarly if start is greater than length(string), 0 is returned. 
  7247.  
  7248.  
  7249. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7250.  
  7251. Examples:
  7252.  
  7253.        VERIFY('123','1234567890')      ==  0
  7254.        VERIFY('1Z3','1234567890')      ==  2
  7255.        VERIFY('AB3','1234567890','M')  ==  3
  7256. The REXX documentation includes this example: 
  7257.  
  7258.        VERIFY('1P3Q4','1234567890',,3) ==  4
  7259. Notice that the third parameter is completely omitted between two adjacent 
  7260. commas.  This causes REXX to use the default option of 'nomatch'. 
  7261.  
  7262. In general, the E compiler does not like parameters to be completely omitted in 
  7263. this way.  It expects the parameter to be present even if it's an empty string. 
  7264. Thus the same intent can be achieved by either of these: 
  7265.  
  7266.        VERIFY('1P3Q4','1234567890','',3)  ==  4
  7267.        VERIFY('1P3Q4','1234567890','N',3) ==  4
  7268.  
  7269.  
  7270. ΓòÉΓòÉΓòÉ 4.1.189. WHEREDEFC(string) ΓòÉΓòÉΓòÉ
  7271.  
  7272. Choose: 
  7273.  
  7274. o Syntax 
  7275. o Definition 
  7276. o Example 
  7277. o E Language Syntax 
  7278.  
  7279.  
  7280. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7281.  
  7282. WHEREDEFC( string ) 
  7283.  
  7284.  
  7285. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7286.  
  7287. returns the name of the .ex file in which the argument is defined as a DEFC, or 
  7288. the null string if the argument is an unknown command. 
  7289.  
  7290.  
  7291. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7292.  
  7293. defc find_cmd =
  7294.    ex_file = WhereDefc(arg(1))
  7295.    if ex_file then
  7296.       sayerror '"'arg(1)'" is defined in' ex_file
  7297.    else
  7298.       sayerror '"'arg(1)'" is not a DEFC in any linked file'
  7299.    endif
  7300.  
  7301.  
  7302. ΓòÉΓòÉΓòÉ 4.1.190. WHILE ΓòÉΓòÉΓòÉ
  7303.  
  7304. Choose: 
  7305.  
  7306. o Syntax 
  7307. o Definition 
  7308. o E Language Syntax 
  7309.  
  7310.  
  7311. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7312.  
  7313. Is described in section Conditional and Loop Statements. 
  7314.  
  7315.  
  7316. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7317.  
  7318. Is described in section Conditional and Loop Statements. 
  7319.  
  7320.  
  7321. ΓòÉΓòÉΓòÉ 4.1.191. WINDOWMESSAGE ΓòÉΓòÉΓòÉ
  7322.  
  7323. Choose: 
  7324.  
  7325. o Syntax 
  7326. o Definition 
  7327. o Example 
  7328. o E Language Syntax 
  7329.  
  7330.  
  7331. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7332.  
  7333. WINDOWMESSAGE(send_flag, target, message, mp1, mp2) 
  7334.  
  7335.  
  7336. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7337.  
  7338. Performs a WinPostMessage (if send_flag = 0) or WinSendMessage (if send_flag = 
  7339. 1) to the target window with the given message number and MP1 and MP2 values. 
  7340.  
  7341.  
  7342. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7343.  
  7344. /* Pop the command line and pre-fill it with 'Prompt'
  7345. call windowmessage(0,  getpminfo(EPMINFO_OWNERCLIENT),
  7346.                    5124,               -- EPM_POPCMDLINE
  7347.                    0,
  7348.                    put_in_buffer('Prompt') )
  7349.  
  7350.  
  7351. ΓòÉΓòÉΓòÉ 4.1.192. WINMESSAGEBOX ΓòÉΓòÉΓòÉ
  7352.  
  7353. Choose: 
  7354.  
  7355. o Syntax 
  7356. o Definition 
  7357. o Example 
  7358. o E Language Syntax 
  7359.  
  7360.  
  7361. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7362.  
  7363. WINMESSAGEBOX(caption, text [, attributes]) 
  7364.  
  7365.  
  7366. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7367.  
  7368. Puts up a PM message box containing caption as the title and text as the 
  7369. contents.  attributes is any combination of the MB_ constants from PMWIN.H in 
  7370. the OS/2 Toolkit.  These are duplicated in STDCONST.E. 
  7371.  
  7372.  
  7373. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7374.  
  7375. r = WinMessageBox('Reality check',
  7376.                   'Are you sure you want to delete your thesis?',
  7377.                   MB_YESNOCANCEL + MB_WARNING + MB_DEFBUTTON3 + MB_MOVEABLE)
  7378. if r = MBID_YES then
  7379.    sayerror 'Maybe you should sleep on it...'
  7380. elseif r = MBID_NO then
  7381.    sayerror 'Good idea!'
  7382. else
  7383.    sayerror '(Forget the whole thing.)'
  7384. endif
  7385.  
  7386.  
  7387. ΓòÉΓòÉΓòÉ 4.1.193. WORD(string, n) ΓòÉΓòÉΓòÉ
  7388.  
  7389. Choose: 
  7390.  
  7391. o Syntax 
  7392. o Definition 
  7393. o Example 
  7394. o E Language Syntax 
  7395.  
  7396.  
  7397. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7398.  
  7399. WORD( string , n ) 
  7400.  
  7401.  
  7402. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7403.  
  7404. Returns the nth blank-delimited word in string. n must be positive. If there 
  7405. are less than n words in string, the null string is returned. Exactly 
  7406. equivalent to SUBWORD(string,n,1). 
  7407.  
  7408.  
  7409. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7410.  
  7411. Here are some examples: 
  7412.  
  7413.     WORD('Now is the time',3)    -->  'the'
  7414.     WORD('Now is the time',5)    -->  ''
  7415.  
  7416.  
  7417. ΓòÉΓòÉΓòÉ 4.1.194. WORDINDEX(string, n) ΓòÉΓòÉΓòÉ
  7418.  
  7419. Choose: 
  7420.  
  7421. o Syntax 
  7422. o Definition 
  7423. o Example 
  7424. o E Language Syntax 
  7425.  
  7426.  
  7427. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7428.  
  7429. WORDINDEX( string , n ) 
  7430.  
  7431.  
  7432. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7433.  
  7434. Returns the character position of the nth blank-delimited word in string. n 
  7435. must be positive. If there are less than n words in string, 0 is returned. 
  7436.  
  7437.  
  7438. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7439.  
  7440. Here are some examples: 
  7441.  
  7442.     WORDINDEX('Now is the time',3)   -->    8
  7443.     WORDINDEX('Now is the time',6)   -->    0
  7444.  
  7445.  
  7446. ΓòÉΓòÉΓòÉ 4.1.195. WORDLENGTH(string, n) ΓòÉΓòÉΓòÉ
  7447.  
  7448. Choose: 
  7449.  
  7450. o Syntax 
  7451. o Definition 
  7452. o Example 
  7453. o E Language Syntax 
  7454.  
  7455.  
  7456. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7457.  
  7458. WORDLENGTH( string , n ) 
  7459.  
  7460.  
  7461. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7462.  
  7463. Returns the length of the nth blank-delimited word in string. n must be 
  7464. positive. If there are less than n words in string, 0 is returned. 
  7465.  
  7466.  
  7467. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7468.  
  7469. Here are some examples: 
  7470.  
  7471.     WORDLENGTH('Now is the time',2)    -->   2
  7472.     WORDLENGTH('Now comes the time',2) -->   5
  7473.     WORDLENGTH('Now is the time',6)    -->   0
  7474.  
  7475.  
  7476. ΓòÉΓòÉΓòÉ 4.1.196. WORDPOS(needle, haystack [, start] ) ΓòÉΓòÉΓòÉ
  7477.  
  7478. Choose: 
  7479.  
  7480. o Syntax 
  7481. o Definition 
  7482. o Example 
  7483. o E Language Syntax 
  7484.  
  7485.  
  7486. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7487.  
  7488. WORDPOS( needle , haystack   [,  start] ) 
  7489.  
  7490.  
  7491. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7492.  
  7493. Searches haystack for the first occurrence of the sequence of blank-delimited 
  7494. words needle and returns the word number of the first word of needle in 
  7495. haystack. Multiple blanks between words in either needle or haystack are 
  7496. treated as a single blank for the comparison, but otherwise the words must 
  7497. match exactly. Returns 0 if needle is not found. 
  7498.  
  7499. By default the search starts at the first word in haystack. This may be 
  7500. overridden by specifying start (which must be positive), the word at which to 
  7501. start the search. 
  7502.  
  7503.  
  7504. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7505.  
  7506. Here are some examples: 
  7507.  
  7508.  WORDPOS('the','now is the time')              ->  3
  7509.  WORDPOS('The','now is the time')              ->  0
  7510.  WORDPOS('is the','now is the time')           ->  2
  7511.  WORDPOS('is   the','now is the time')         ->  2
  7512.  WORDPOS('is   time ','now is   the time')     ->  0
  7513.  WORDPOS('be','To be or not to be')            ->  2
  7514.  WORDPOS('be','To be or not to be',3)          ->  6
  7515.  
  7516.  
  7517. ΓòÉΓòÉΓòÉ 4.1.197. WORDS(string) ΓòÉΓòÉΓòÉ
  7518.  
  7519. Choose: 
  7520.  
  7521. o Syntax 
  7522. o Definition 
  7523. o Example 
  7524. o E Language Syntax 
  7525.  
  7526.  
  7527. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7528.  
  7529. WORDS( string ) 
  7530.  
  7531.  
  7532. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7533.  
  7534. Returns the number of blank-delimited words in string. 
  7535.  
  7536.  
  7537. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7538.  
  7539. Here are some examples: 
  7540.  
  7541.     WORDS('Now is the time')   -->  4
  7542.     WORDS(' ')                 -->  0
  7543.  
  7544.  
  7545. ΓòÉΓòÉΓòÉ 4.2. Conditional and Loop Statements ΓòÉΓòÉΓòÉ
  7546.  
  7547. The IF statement is used to change the flow of statements depending upon some 
  7548. condition. As you can see, the syntax varies from that of REXX: 
  7549.  
  7550. IF 
  7551.                  Conditional execution 
  7552.  
  7553.                                     IF expression THEN
  7554.                                        statements
  7555.                                     {ELSEIF expression THEN
  7556.                                        statements}
  7557.                                      [ELSE
  7558.                                        statements]
  7559.                                     ENDIF
  7560.  
  7561.                  Note:  Any nonzero, non-null value for expression is regarded 
  7562.                  as TRUE.  The value zero is FALSE, and (as of version 3.07) a 
  7563.                  null value is FALSE. The null-value treatment is important 
  7564.                  because that's the default value returned by a DEFPROC.  If a 
  7565.                  DEFPROC simply "runs off the end" and does not have an 
  7566.                  explicit RETURN statement, ET automatically assigns a null 
  7567.                  return value.  For example: 
  7568.  
  7569.                                      defproc tinyproc=
  7570.                                         x = 1
  7571.                                         /* no return statement */
  7572.  
  7573.                                      defc test=
  7574.                                         myswitch = tinyproc()
  7575.                                         if myswitch then
  7576.                                            sayerror 'null is true'
  7577.                                         else
  7578.                                            sayerror 'null is false'
  7579.                                         endif
  7580.  
  7581.                  Previous versions of E would have printed null is true because 
  7582.                  the value of myswitch was not precisely zero ('0'). It makes 
  7583.                  more sense for no-value to be false.  But it's still better 
  7584.                  practice to specify the return value explicitly in your procs. 
  7585.  
  7586.                  Several ways are provided to structure a repetitive loop: 
  7587.  
  7588. WHILE - DO 
  7589.                  Conditional loop 
  7590.  
  7591.                                   WHILE expression DO
  7592.                                     statements
  7593.                                   ENDWHILE
  7594.  
  7595. DO - WHILE 
  7596.                  Same effect as WHILE - DO 
  7597.  
  7598.                                   DO WHILE expression
  7599.                                     statements
  7600.                                   END or ENDDO
  7601.  
  7602. DO FOREVER 
  7603.                  Continuous loop (See LEAVE, below) 
  7604.  
  7605.                                   DO FOREVER        /* clearer meaning than  WHILE 1  */
  7606.                                     statements     /* Exit with a RETURN or LEAVE    */
  7607.                                   END or ENDDO
  7608.  
  7609. LOOP 
  7610.                  Same effect as DO FOREVER 
  7611.  
  7612.                                   LOOP              /* equivalent to the previous one */
  7613.                                      statements
  7614.                                   ENDLOOP
  7615.  
  7616. FOR 
  7617.                  Stepwise Iteration 
  7618.  
  7619.                                   FOR i=expression TO expression [BY expression]
  7620.                                     statements
  7621.                                   ENDFOR
  7622.  
  7623. DO (FOR) 
  7624.                  Same effect as FOR 
  7625.  
  7626.                                   DO i=expression TO expression [BY expression]
  7627.                                      statements
  7628.                                   END or ENDDO
  7629.  
  7630. LEAVE 
  7631.                  Exits LOOP, WHILE or DO. 
  7632.  
  7633.                  Execution resumes after ENDLOOP, ENDWHILE or END. 
  7634.  
  7635. ITERATE 
  7636.                  Iterates LOOP, WHILE or DO. 
  7637.  
  7638.                  Execution resumes at LOOP, WHILE or DO. 
  7639.  
  7640. Note:  It is possible to modify the loop index within the FOR loop. For 
  7641. example, the following is correct: 
  7642.  
  7643.    for i= 1 to 10
  7644.        if i=7 then
  7645.            i= i - 1  -- i = 6
  7646.        endif
  7647.    endfor
  7648.  
  7649.  
  7650. ΓòÉΓòÉΓòÉ 4.3. The Parse Statement ΓòÉΓòÉΓòÉ
  7651.  
  7652. Use the PARSE statement to extract information from a string. The syntax is: 
  7653.  
  7654.  
  7655.    PARSE  ARG template
  7656.    PARSE  VALUE expression WITH template
  7657.  
  7658. where expression is the input, i.e. the string to parse, and template is a list 
  7659. of symbols separated by blanks, which dictates how to parse the input. 
  7660.  
  7661. The syntax of template is
  7662.  
  7663. { '.' | string | +number | -number |number | variable | '(' variable ')' }
  7664. The only difference between the two forms of the parse statement is that the 
  7665. PARSE ARG statement is a special case of the PARSE - VALUE - WITH statement. 
  7666. The PARSE ARG statement automatically assumes ARG(1) to be its input. 
  7667. Therefore, the following two statements are logically equivalent: 
  7668.  
  7669. PARSE ARG A B C D
  7670. PARSE VALUE arg(1) WITH A B C D
  7671.  
  7672. The template in the above example is A B C D. A template in general specifies 
  7673. the names of variables that are to be given new values, together with optional 
  7674. triggers (either strings or special characters) to control the parsing. In the 
  7675. example, A, B, C and D are all variables to which new values will be assigned; 
  7676. there are no triggers. 
  7677.  
  7678. Normally each variable in the template is assigned one word from the input 
  7679. string.  The last variable, however, is assigned the remainder of the string 
  7680. (if any).  If there are fewer words in the string than variables in the 
  7681. template, all excess variables are set to null. A null, therefore, indicates 
  7682. the end of data. 
  7683.  
  7684. For example, if the string 'The Red Baron' is parsed with the template A B C D, 
  7685. then the first three variables would each be assigned one word from the string, 
  7686. in sequence, and the variable D would be set to ' '. 
  7687.  
  7688. If the template were changed to A B and the input string remained the same, 
  7689. then the variable A would be set to 'The' and the variable B would be set to 
  7690. 'Red Baron'. 
  7691.  
  7692. The parsing algorithm also allows some pattern matching, in which you may 
  7693. trigger on strings. If the template contains a string (such as a '/' or 'TO' ), 
  7694. then synchronization will occur at the next point where the trigger matches the 
  7695. data.  This is best explained with the aid of examples: 
  7696.  
  7697.  
  7698.      Input data:        EDIT AUTOEXEC.BAT /D
  7699.      Template:          X Fn '/'Opt
  7700.  
  7701.      Variables set:     X   = 'EDIT'
  7702.                         Fn  = 'AUTOEXEC.BAT'
  7703.                         Opt = 'D'
  7704.  
  7705. The value of a variable may be used as a trigger, by enclosing the name of the 
  7706. variable in parentheses.  It then acts in exactly the same way as a literal 
  7707. string trigger.  For example: 
  7708.  
  7709.   delim=','
  7710.   parse value 'abc, def' with  x (delim) y /* splits the string */
  7711.  
  7712. This feature allows you to parse when you don't know what the trigger string 
  7713. (delim in the example) is in advance.  Without the parentheses, the variable 
  7714. delim would receive the value 'def'. 
  7715.  
  7716. You may also use numbers as triggers to pick out positional substrings, or to 
  7717. extract a string of a certain length.  These may be absolute column numbers, or 
  7718. numbers relative to the last trigger (or column) specified. 
  7719.  
  7720.      Input string:      This is the time for all good men
  7721.      Template:          8 X +4  16 Y +5
  7722.  
  7723.      Variables set:     X = ' the'  /* four starting at column 8  */
  7724.                         Y = 'e for' /* five starting at column 16 */
  7725. In this case, a +n following the variable indicates that the string to be 
  7726. picked out should begin at the last column specified and should continue n 
  7727. characters to the right. The '-' unary operator cannot be used in this manner. 
  7728. However, both unary plus and minus can also be used in the template to advance 
  7729. the current column position. For example, 
  7730.  
  7731. Input string:        This is the time for all good men
  7732. Template:            10 't' X +4 +5 Y -4 Z
  7733.  
  7734. Variables set:       X = 'time'
  7735.                      Y = 'all good men'
  7736.                      Z = 'for all good men'
  7737. Notice that in this example, the current position is moved to the 10th column, 
  7738. and then to the next instance of 't' (which is the 't' in 'time'). X is 
  7739. assigned a string of length 4 beginning from this point. The current position 
  7740. is then moved 5 positions to the right. The Y variable is assigned a string 
  7741. beginning at this point and continuing to the end of the string. The cursor 
  7742. position is then moved back (to the left) 4 positions and the Z variable gets a 
  7743. string from that position to the end of the string. 
  7744.  
  7745. Further examples: 
  7746.  
  7747.  
  7748.      Input string:      MSG WINPA(FRED) Hello Fred
  7749.      Template:          X node'('userid')' msg
  7750.  
  7751.      Variables set:     X      = 'MSG'
  7752.                         NODE   = 'WINPA'
  7753.                         USERID = 'FRED'
  7754.                         MSG    = ' Hello Fred'
  7755.  
  7756.  
  7757.      Input string:      /foo/bar zot/
  7758.      Template:          delim 2 word1 (delim) word2 (delim)
  7759.      Variables set:     delim  = '/'
  7760.                         word1  = 'foo'
  7761.                         word2  = 'bar zot'
  7762.  
  7763. Note that each substring (between triggers) is parsed in the same manner as a 
  7764. complete string would be if there were no triggers present. 
  7765.  
  7766. You can also use a period (.) as a place holder to skip over a word that would 
  7767. otherwise be placed in a variable.  For example: 
  7768.  
  7769.  
  7770.      Input string:      'The Red Baron'
  7771.      Template:          word1 . word2
  7772.      Variables set:     word1  = 'The'
  7773.                         word2  = 'Baron'
  7774.  
  7775.  
  7776. ΓòÉΓòÉΓòÉ 4.4. Compiler Directive Statements ΓòÉΓòÉΓòÉ
  7777.  
  7778. The following statements are different from other E statements because they 
  7779. serve no function when the program is being run, rather they provide 
  7780. instructions to the ET compiler. 
  7781.  
  7782.  
  7783. ΓòÉΓòÉΓòÉ 4.5. compiler directives ΓòÉΓòÉΓòÉ
  7784.  
  7785. The compiler directive statements are: 
  7786.  
  7787. Includes
  7788.                                                               INCLUDE 'filespec'
  7789.  
  7790.                                                               TRYINCLUDE 'filespec'
  7791.  
  7792. Conditional compilation
  7793.                                                               COMPILE IF constant_expression
  7794.                                                                   statements
  7795.                                                               { COMPILE ELSEIF constant_expression
  7796.                                                                   statements }
  7797.                                                               [ COMPILE ELSE
  7798.                                                                   statements ]
  7799.                                                               COMPILE ENDIF
  7800.  
  7801.  
  7802. ΓòÉΓòÉΓòÉ 4.5.1. Include Statements ΓòÉΓòÉΓòÉ
  7803.  
  7804. The usage and usefulness of INCLUDE statements is shown in The EPM User's 
  7805. Guide. In this section, we will discuss how these statements work. Let's say 
  7806. that there is an INCLUDE statement (INCLUDE 'filespec') in a file test.e. The 
  7807. statement directs the compiler (ET) to replace the INCLUDE statement with the E 
  7808. code found in the file named in filespec. The contents of file filespec are 
  7809. inserted into file test.e. If file filespec does not exist, compilation is 
  7810. aborted. 
  7811.  
  7812. The TRYINCLUDE statement has the same syntax as an INCLUDE file, i.e. filespec 
  7813. must be enclosed with quotes. It also behaves the same way as an INCLUDE 
  7814. statement: the specified file is included into the file where the INCLUDE 
  7815. statement appears. However, when a TRYINCLUDE statement is used, the compiler 
  7816. tries to include the file. If it is unsuccessful, compilation does not halt. 
  7817. For example, consider the following excerpt from a file: 
  7818.  
  7819. tryinclude 'test1.e'
  7820. tryinclude 'test2.e'
  7821. include 'test3.e'
  7822. If the file test1.e does not exist, the compiler will simply go on to the next 
  7823. statement without notifying the user. Next it will try to include file test2.e. 
  7824. However, if file test3.e does not exist, the compiler will issue an error 
  7825. message and stop compilation. 
  7826.  
  7827.  
  7828. ΓòÉΓòÉΓòÉ 4.5.2. Conditional Compilation ΓòÉΓòÉΓòÉ
  7829.  
  7830. In the past few releases of E we've tried to simplify configuration and 
  7831. updates.  We've rearranged the standard E files to bring together all the usual 
  7832. configuration options (in STDCNF.E and COLORS.E) and all the INCLUDEs (into 
  7833. E.E).  Ideally the user should be able to customize E with simple one-line 
  7834. changes. 
  7835.  
  7836. The available configuration techniques have been: 
  7837.  
  7838. o setting a universal variable, for example matchtab_on=0. This is fine for 
  7839.   simple options but can be expensive for large features.  The macros must 
  7840.   contain the code for all possible values of the variable since the value can 
  7841.   change at run-time.  Even though you might never use the matchtab feature, 
  7842.   memory space is used for the possibility. 
  7843.  
  7844. o setting a constant, like TEMP_PATH='C:\'. Constants have been good only for 
  7845.   minor configuration options which don't change after installation, such as 
  7846.   drive letters and directories.  They're also useful for mnemonic names like 
  7847.   GREEN=2 to make macros more readable. 
  7848.  
  7849. o using INCLUDE and TRYINCLUDE statements, such as tryinclude 'math.e', to ease 
  7850.   the installation of large optional features if the features are cleanly 
  7851.   separable into independent files. After the compilation is done, the INCLUDE 
  7852.   statements have no effect and occupy no memory. 
  7853.  
  7854. Another tool, conditional compilation includes features which aren't cleanly 
  7855. separable into files. Programmers experienced with the C language will be 
  7856. familiar with this concept (as #if).  Other users might be uncomfortable with 
  7857. the distinction between compile-time and run-time processing. 
  7858.  
  7859. Let's take a small feature as an illustration - imagine that whenever you press 
  7860. F4 (File) you don't want the file saved if it hasn't been modified. If you were 
  7861. a power user who wanted this feature, you had to modify STDCMDS.E as follows: 
  7862.  
  7863. defc f,file=
  7864.    if .modify=0 then   /* my mod:  don't file if not modified */
  7865.       'quit'
  7866.    endif
  7867.    /* rest of code as before */
  7868.  
  7869. The trouble with modifying the standard commands like this is that you had to 
  7870. repeat the modification on every new release of E. To ease your updates you 
  7871. might have tried to convince us developers to include the feature in the 
  7872. standard distribution version.  But we've been reluctant to do this because 
  7873. every user would be forced to use the same feature, or at least to sacrifice 
  7874. memory space to it (if we turn it on/off with a variable assignment). 
  7875.  
  7876. But now it's possible to write: 
  7877.  
  7878. const FILE_ONLY_IF_MODIFIED = 1
  7879.  
  7880. defc f,file=
  7881. compile if FILE_ONLY_IF_MODIFIED
  7882.    if .modify=0 then
  7883.       'quit'
  7884.    endif
  7885. compile endif
  7886.    /* rest of code as before */
  7887.  
  7888. When the compiler sees the compile if it will check the value of the constant 
  7889. FILE_ONLY_IF_MODIFIED, and, seeing that it's true, will compile the new code 
  7890. just as it did when you hand-modified it. But now the feature is easier to 
  7891. distribute to all users.  A user who doesn't like it can set 
  7892. FILE_ONLY_IF_MODIFIED = 0, which will cause ET to ignore the code enclosed 
  7893. between compile if and compile endif.  This happens at compile time, in much 
  7894. the same manner as a TRYINCLUDE, so the other user is not penalized memory 
  7895. space for the choice. 
  7896.  
  7897. We encourage developers of add-on packages to use this feature.  In time we 
  7898. hope to make the most popular add-ons installable without the user having to 
  7899. touch the macro source code. 
  7900.  
  7901. The new keywords all start with the word compile: 
  7902.  
  7903. o COMPILE IF  const_expression 
  7904.  
  7905. o COMPILE ELSE 
  7906.  
  7907. o COMPILE ELSEIF const_expression 
  7908.  
  7909. o COMPILE ENDIF 
  7910. const_expression must be a simple expression combining only constants known at 
  7911. compile time. Understand that ET cannot know the values that will be assigned 
  7912. to variables at run-time (like matchtab_on). If we assume that all uppercase 
  7913. identifiers represent pre-defined constants, the following are valid 
  7914. const_expressions: 
  7915.  
  7916.    COMPILE IF 0            /* Means 'never compile'. */
  7917.  
  7918.    COMPILE IF FOO + BAR >= 2
  7919.  
  7920.    COMPILE IF EVERSION = '3.07'
  7921.  
  7922.    COMPILE IF STATUSCOLOR = NORMAL
  7923.  
  7924.    COMPILE IF not (OS2 or DOS)
  7925.  
  7926. Note:  simple arithmetic and logical expressions are possible, but not string 
  7927. functions such as substr(). 
  7928.  
  7929. Any strings in the constant expression associated with a COMPILE IF statement 
  7930. are converted to upper case. This means that many of the values for 
  7931. configuration options in the STDCNF.E file may now be entered in any 
  7932. combination of lower and upper case letters. For example, the following 
  7933. statement is now valid: 
  7934.  
  7935. HOST_SUPPORT = 'pdq'
  7936. even though STDCNF.E contains the following statement: 
  7937.  
  7938. COMPILE IF HOST_SUPPORT = 'PDQ'
  7939.     HAVE_DOS = 0
  7940. COMPILE ENDIF
  7941. Since the string constant `pdq' will be converted to `PDQ' at compile-time, the 
  7942. compile-if condition will be found to be true. 
  7943.  
  7944. There must be one COMPILE ENDIF to each COMPILE IF, zero or one COMPILE ELSE's, 
  7945. and zero or more COMPILE ELSEIF's.  The ELSE must come after all ELSEIF's, as 
  7946. in normal E if-else-endif structures. 
  7947.  
  7948. These conditional blocks can be nested (in the same manner as if-else-endif 
  7949. structures) up to a maximum depth of 20 levels. 
  7950.  
  7951. Here's an example of how we might include different methods of host-file 
  7952. support: 
  7953.  
  7954. compile if HOST_SUPPORT = 'STD'
  7955.    include 'saveload.e' -- with host support
  7956. compile elseif HOST_SUPPORT = 'EMUL'
  7957.    include 'e3emul.e'   -- Brian Tucker's add-on package
  7958. compile else
  7959.    include 'slnohost.e' -- without host support
  7960. compile endif
  7961.  
  7962. The COMPILE keyword can be inserted anywhere a newline is allowed, including 
  7963. cases where a newline serves as a line continuation in the middle of a 
  7964. statement. 
  7965.  
  7966.    delay = 2000 /
  7967.    compile if OS2
  7968.    10             /* delay = 200  here */
  7969.    compile else
  7970.    1              /* delay = 2000 here */
  7971.    compile endif
  7972.  
  7973. See the section Line Continuations for other examples. 
  7974.  
  7975.  
  7976. ΓòÉΓòÉΓòÉ 4.5.3. Compiler Directives as Definition Primitives ΓòÉΓòÉΓòÉ
  7977.  
  7978. The compiler directives discussed in this section are valid E statements, i.e. 
  7979. they can be contained within a DEFPROC, DEFC, or other definition. However, 
  7980. compiler directives can also be considered definition primitives depending upon 
  7981. what they contain. Consider the following example: file junk.e contains: 
  7982.  
  7983.     sayerror "print junk"
  7984.     x = x + 5
  7985. file main_junk.e contains: 
  7986.  
  7987.     DEFPROC junk()
  7988.         universal x
  7989.  
  7990.         x = 8
  7991.         include 'junk.e'
  7992.         temp = 250
  7993. After execution of the procedure junk(), the value of x is 13. In this case, 
  7994. the included file (junk.e) contains only statements, and therefore the INCLUDE 
  7995. statement acts as a statement. However, consider the next example: file junk.e 
  7996. contains: 
  7997.  
  7998.     DEFPROC junk()
  7999.         sayerror "printing junk"
  8000. file main_junk.e contains: 
  8001.  
  8002.     SET insert_state 0
  8003.  
  8004.     DEFC com1 =
  8005.         call junk()
  8006.  
  8007.     CONST
  8008.         a = 25
  8009.  
  8010.     include 'junk.e'
  8011.  
  8012. If the included file (junk.e) contained only statements, as in the last 
  8013. example, the ET compiler would issue the following error: "Expecting DEFinition 
  8014. primitive". Because the INCLUDE statement is no longer contained within a 
  8015. definition primitive, the included file must contain a definition primitive, as 
  8016. it does in this example. In this case, the INCLUDE statement is not really 
  8017. acting as a statement; it is acting as a definition primitive. 
  8018.  
  8019. The same can be said of the conditional compile statement: it can occur within 
  8020. a definition primitive and enclose only statements or it can occur outside a 
  8021. primitive and enclose one or more definition primitives. The following examples 
  8022. show various correct usages: 
  8023.  
  8024.  
  8025. CONST
  8026.     flag1 = 1
  8027.  
  8028. DEFPROC fred()
  8029.     universal perm
  8030.  
  8031.     perm = 8
  8032.     compile if flag1 = 1
  8033.         perm = perm + 5
  8034.     compile endif
  8035.     sayerror "perm is " perm
  8036.  
  8037. /************** Second example ****************/
  8038.  
  8039. CONST
  8040.     USERS_CHOICE = 0
  8041.  
  8042. compile if USERS_CHOICE
  8043.     DEFC optional_command =
  8044.         sayerror "just printing junk for testing"
  8045. compile endif
  8046.  
  8047. DEFPROC test()
  8048.     sayerror "stuff"
  8049.  
  8050. In the first example, if flag1 is set to 1, then the value of perm becomes 13. 
  8051. If flag1 is set to 0, then the value of perm is 8. In either case, the value is 
  8052. printed out with the sayerror statement. In the second example, if USERS_CHOICE 
  8053. is set to 1, the optional_command is included in the code; otherwise it is not, 
  8054. and at run-time (when you are running the editor), the command optional_command 
  8055. does not exist, and will not be recognized. 
  8056.  
  8057.  
  8058. ΓòÉΓòÉΓòÉ 4.6. Using EPM Commands in E Statements ΓòÉΓòÉΓòÉ
  8059.  
  8060. The E commands that were discussed in The EPM User's Guide can be used not only 
  8061. on the command dialog box, but also in E programs. When the name of a command 
  8062. and its options and parameters are enclosed in quotes (single or double), the 
  8063. command can be used in place of a statement. The syntax of these commands is 
  8064. the same as that which was presented in the User's Guide. An example of this 
  8065. usage follows: 
  8066.  
  8067. defproc zap_file()
  8068.     k = entrybox("Confirm",'/Yes/No/','Really quit?',18,0)
  8069.     if k then
  8070.        sayerror("Data has been cruelly obliterated ...")
  8071.        'quit'           /*  <-- Note the quit command in quotes */
  8072.     else
  8073.        sayerror("File has been mercifully spared ...")
  8074.     endif
  8075.  
  8076. When the zap_file() procedure is activated, it will prompt the user. If the 
  8077. user picks 'Yes', it will quit the file; if he picks 'No' the user can continue 
  8078. editing. 
  8079.  
  8080. Another common usage is when redefining key strokes. For example: 
  8081.  
  8082.   def c_2
  8083.     'togglecontrol 9 '
  8084.     'togglecontrol 10'
  8085.  
  8086. This will define the key ctrl-2 to toggle the scroll bars on or off. Other 
  8087. examples can be seen in section Sample E Procs. 
  8088.  
  8089. Any command can be used as a statement. The command need not be a built-in 
  8090. command; it can be a command defined by a user using a DEFC. For example: 
  8091.  
  8092. defc temp
  8093.     call temp()
  8094.  
  8095. defproc temp()
  8096.     'testA stuff'
  8097.  
  8098. defc testA
  8099.     sayerror "argument is " arg(1)
  8100. Issuing the command temp will print argument is stuff. 
  8101.  
  8102.  
  8103. ΓòÉΓòÉΓòÉ 4.6.1. Commands Omitted From the User's Guide ΓòÉΓòÉΓòÉ
  8104.  
  8105. Most of the standard commands (defc constructions) are listed in The EPM User's 
  8106. Guide. However, a few were omitted because they produce no useful results by 
  8107. themselves, but are only really useful in a programming context or because they 
  8108. may not be understood by a novice. These advanced commands are: 
  8109.  
  8110. Command                       Description 
  8111.  
  8112. ACTIVATEFILEID fileid 
  8113.                               activates the file specified by the file handle 
  8114.                               fileid. 
  8115.  
  8116. AMU_ADDENDA_ADDITION word 
  8117.                               adds the word specified by word to the addenda 
  8118.                               file specified the variable ADDENDA_FILENAME. 
  8119.  
  8120. AMU_ADDENDA_PICKUP 
  8121.                               adds the addenda dictionary specified by the 
  8122.                               variable ADDENDA_FILENAME to the standard 
  8123.                               dictionary. 
  8124.  
  8125. CLEARSHARBUFF 
  8126.                               clears the shared PM buffer. 
  8127.  
  8128. COMMANDLINE [ text ] 
  8129.                               brings up the command line dialog box. This is 
  8130.                               the equivalent of the standard ESC key 
  8131.                               definition. This command optionally takes an 
  8132.                               argument of text or a string variable. If the 
  8133.                               argument is included, it will be placed on the 
  8134.                               command line. 
  8135.  
  8136. COPY2DMBUFF 
  8137.                               copies the marked area to the "Delete Mark" 
  8138.                               buffer. 
  8139.  
  8140. COPY2SHARBUFF 
  8141.                               copies a marked area to the shared buffer. 
  8142.  
  8143. CURSOROFF 
  8144.                               turns the cursor off. This command is equivalent 
  8145.                               to a: 
  8146.  
  8147.                                                               `TOGGLECONTROL 14 0'
  8148.  
  8149.                               To turn the cursor back on again, issue a 
  8150.                               TOGGLECONTROL command with a 1 instead of a zero 
  8151.                               as the second argument. 
  8152.  
  8153. DUPMARK typemark 
  8154.                               takes an argument (typemark) of: 
  8155.  
  8156.    M = move marked text 
  8157.    C = copy marked text 
  8158.    O = overlay marked text 
  8159.    U = unmark marked text 
  8160.    D = delete marked text 
  8161.  
  8162. and executes that action on the marked text. 
  8163.  
  8164. EPM will look first in the local buffer and then in the shared buffer for 
  8165. marked text. 
  8166.  
  8167. GETDMBUFF 
  8168.                               gets text from the Delete Mark buffer. 
  8169.  
  8170. GETSHARBUFF 
  8171.                               gets text from EPM shared buffer. 
  8172.  
  8173. LOADDEFAULTMENU 
  8174.                               loads the default menu setup. 
  8175.  
  8176. MH_BEGIN_MARK 
  8177.                               mouse handler's begin mark. This is executed when 
  8178.                               the standard mouse setup begins a drag. See 
  8179.                               MOUSE.E and Configuring the Mouse. for more 
  8180.                               information. 
  8181.  
  8182. MH_CANCEL_MARK 
  8183.                               mouse handler's cancel mark. This is executed 
  8184.                               when the standard mouse setup double clicks on 
  8185.                               button one. See MOUSE.E and Configuring the Mouse 
  8186.                               for more information. 
  8187.  
  8188. MH_END_MARK 
  8189.                               mouse handler's end mark. This is executed when 
  8190.                               the standard mouse setup ends a drag. See MOUSE.E 
  8191.                               and Configuring the Mouse for more information. 
  8192.  
  8193. MH_GOTOPOSITION 
  8194.                               moves the cursor to the current mouse pointer 
  8195.                               location. This is like the standard mouse of a 
  8196.                               single button one click. See MOUSE.E and 
  8197.                               Configuring the Mouse for more information. 
  8198.  
  8199. SETMESSAGELINE [string] 
  8200.                               Updates the messageline.  If the optional string 
  8201.                               is present, that is set as the new messageline 
  8202.                               text.  If no argument is given, the messageline 
  8203.                               color is updated with the value in the universal 
  8204.                               variable vMESSAGECOLOR. 
  8205.  
  8206. SETSTATUSLINE [string] 
  8207.                               Updates the statusline.  If the optional string 
  8208.                               is present, that is set as the new statusline 
  8209.                               text.  If no argument is given, the statusline 
  8210.                               color is updated with the value in the universal 
  8211.                               variable vSTATUSCOLOR. 
  8212.  
  8213.  
  8214. ΓòÉΓòÉΓòÉ 4.7. Predefined Constants and Variables ΓòÉΓòÉΓòÉ
  8215.  
  8216. There are several predefined UNIVERSAL variables which may be accessed in any 
  8217. definition without an explicit UNIVERSAL declaration: 
  8218.  
  8219. o RC, 
  8220.  
  8221. o join_after_wrap, 
  8222.  
  8223. o center_search, 
  8224.  
  8225. o exit_after_last_file, and 
  8226.  
  8227. o two_spaces. 
  8228.  
  8229. RC holds the error code from the last-executed command. All commands, for 
  8230. example 'edit', 'quit', and 'file', set the value of RC.  If no error occurs, 
  8231. RC will be reset to zero by a command. Upon entering a DEFC, the value of RC 
  8232. depends upon the source of the command invocation. If another definition 
  8233. (internal to the E program) activates the command, RC is set to zero. If a user 
  8234. issues the command from the command dialog box, RC is set to the position of 
  8235. the cursor in the command dialog box. However, statements and procedures, such 
  8236. as 'nextfile', 'copymark', or 'top', do NOT normally set RC.  If no error 
  8237. occurs, whatever value RC had before the statement is still there.  This 
  8238. approach was followed for considerations of speed, space, and to allow an 
  8239. earlier command's RC to "filter down" to the end of the proc.  Commands are the 
  8240. ones most likely to encounter meaningful errors. 
  8241.  
  8242. Thus if you want a sure error-check on a statement, zero RC first: 
  8243.  
  8244.    rc = 0
  8245.    copymark
  8246.    if rc then /* complain */ endif
  8247.  
  8248. One special case:  REPEATFIND is a statement but it sets RC to zero if the find 
  8249. is successful. 
  8250.  
  8251. An assignment to one of the function key text variables changes the value of 
  8252. the function key text displayed at the bottom of the screen. 
  8253.  
  8254. There is also one predefined constant called ARGSEP. Since the argument option 
  8255. separator can change from machine to machine, this constant is used to keep the 
  8256. E procs portable.  On a PC, ARGSEP is the slash '/'.  On a RT, it's the hyphen 
  8257. '-'. 
  8258.  
  8259. JOIN_AFTER_WRAP, CENTER_SEARCH and other configurable constants are discussed 
  8260. in The EPM User's Guide. 
  8261.  
  8262.  
  8263. ΓòÉΓòÉΓòÉ 4.8. User Exits ΓòÉΓòÉΓòÉ
  8264.  
  8265. If the configuration constant SUPPORT_USER_EXITS is set when the macros are 
  8266. compiled, "hooks" for user exits will be included. If any particular user exit 
  8267. is not present, no attempt to call it will be made, and no error message will 
  8268. be given. 
  8269.  
  8270. The user exits are: 
  8271.  
  8272. defmain_exit This defproc will be called from the DEFMAIN in MAIN.E, just 
  8273.           before the command-line arguments are executed.  The argument given 
  8274.           will be the one passed to EPM (preceded by 'e '); if declared as a 
  8275.           VAR parameter, the exit can modify the value. 
  8276.  
  8277. postsave_exit This defproc will be called from the SAVE command, just after the 
  8278.           file is saved.  Arg(1) will be the .filename of the file, arg(2) will 
  8279.           be the options to the SAVE command, and arg(3) will be 0 to indicate 
  8280.           a normal save, or 1 to indicate that the name was changed (because 
  8281.           the user attempted to save a .Untitled file). 
  8282.  
  8283. presave_exit This defproc will be called from the SAVE command, just before the 
  8284.           file is saved.  The first three arguments will be the same as for 
  8285.           postsave_exit, and arg(4) will be the return code from the SAVE. 
  8286.  
  8287. quit_exit This defproc will be called from the QUIT command, just before the 
  8288.           file is quit.  Arg(1) will be the .filename of the file. 
  8289.  
  8290. rename_exit This defproc will be called from the NAME command and the 
  8291.           SAVEAS_DLG command.  Arg(1) will be the old name, arg(2) will be the 
  8292.           new name, and arg(3) (if present) will be 1 to indicate that the name 
  8293.           was changed by the SAVEAS_DLG command. 
  8294.  
  8295. Note:  The SAVEAS_DLG command (executed when Save as is selected from the File 
  8296.        menu) changes the name directly; it doesn't call the NAME command.  It 
  8297.        does call the rename_exit directly.  The SAVE command can also present 
  8298.        the Save as dialog if the user attempts to save the .Untitled file; in 
  8299.        this case, the NAME command is called to process the name change.
  8300.  
  8301. Note:  The universal variable isa_file_cmd is set to 1 just before the FILE 
  8302.        command issues a SAVE command.  User exits that need to know whether or 
  8303.        not a file is being quit immediately after being saved can check this variable.
  8304.  
  8305. Packages that want to provide an exit while still coexisting with other user 
  8306. exits can use the following code: 
  8307.  
  8308.    tryinclude 'MYCNF.E'
  8309.    compile if not defined(SUPPORT_USER_EXITS)
  8310.       const SUPPORT_USER_EXITS = 0
  8311.    compile endif
  8312.    compile if not SUPPORT_USER_EXITS
  8313.       *** Error - SUPPORT_USER_EXITS must be 1 in MYCNF.E to add this!
  8314.    compile endif
  8315.  
  8316.    compile if not defined(USER_PROVIDES_OWN_EXITS)
  8317.       const USER_PROVIDES_OWN_EXITS = 0
  8318.    compile endif
  8319.    compile if USER_PROVIDES_OWN_EXITS  -- Call the following from your exit.
  8320.       defproc packagename_rename_exit(oldname, newname) =
  8321.    compile else
  8322.       defproc rename_exit(oldname, newname) =
  8323.    compile endif
  8324.          -- Body of routines goes here...
  8325. and instruct the user to include the following in their MYCNF.E if no other 
  8326. exits are being used: 
  8327.  
  8328. const
  8329.    SUPPORT_USER_EXITS = 1
  8330. or, if other user exits are being used, to include the following in their 
  8331. MYCNF.E: 
  8332.  
  8333. const
  8334.    SUPPORT_USER_EXITS = 1
  8335.    USER_PROVIDES_OWN_EXITS = 1
  8336. and the following in their MYSTUFF.E: 
  8337.  
  8338.    defproc rename_exit(oldname, newname) =
  8339.       call packagename_rename_exit(oldname, newname)
  8340.       call otherpackagename_rename_exit(oldname, newname)
  8341.       /* etc... */
  8342.  
  8343.  
  8344. ΓòÉΓòÉΓòÉ 5. Sample E Procs ΓòÉΓòÉΓòÉ
  8345.  
  8346. Using the E language, the user can configure the editor and define complex 
  8347. macros for increased editing power. The E language is translated by the 'etpm' 
  8348. compiler to increase the speed of execution. The syntax of the ETPM compiler 
  8349. is: 
  8350.  
  8351.   ETPM filespec[.E] [destfile[.EX]]
  8352.  
  8353. The default extension of the source code is .E. If no destination file is 
  8354. specified, ETPM will use the same source file name and just attach an .EX 
  8355. extention. Typically, only the filespec is given. These source modules are 
  8356. referred to as E Procs. Two examples of an E Procs are shown below. 
  8357.  
  8358.  
  8359. ΓòÉΓòÉΓòÉ 5.1. Example One ΓòÉΓòÉΓòÉ
  8360.  
  8361. The first E Proc is a simple procedure to define a command to display the 
  8362. different mouse pointers available. Edit a file (say TESTFILE.E). Then type in 
  8363. the following code: 
  8364.  
  8365.  
  8366.   defc firsttime                     -- Define a initialization procedure
  8367.     universal pointertype            -- Make available to both procedures
  8368.     pointertype = 1                  /* Initialize pointertype (same as
  8369.                                         pointertype = '1') */
  8370.     mouse_setpointer pointertype     -- Set the mouse pointer type
  8371.     sayerror "Completed first time." -- Message so you know it worked
  8372.  
  8373.   defc more                          -- Define a subsequent procedure
  8374.     universal pointertype            -- Make E know pointertype is global
  8375.     pointertype = pointertype + 1    -- Increment pointer type
  8376.     mouse_setpointer pointertype     -- Set the mouse pointer type
  8377.     sayerror "Completed subsequent time. Cusor number: "||pointertype
  8378.                                      -- Message so you know it worked
  8379.  
  8380. Then enter RELINK from the commandline dialog box. This will save, compile, and 
  8381. link this code (provided, of course, that there were no typos and the code 
  8382. compiled successfully). The commands FIRSTTIME and MORE are now defined. From 
  8383. the command line dialog box, type FIRSTTIME. Mouse pointer 1 is an arrow so you 
  8384. won't notice a change in the pointer but will see the message Completed first 
  8385. time. Now enter the MORE command. This should change the mouse pointer type. 
  8386. You can continue changing the mouse pointer (upto 15 times) by entering the 
  8387. MORE command. Entering FIRSTTIME again will start you at mouse pointer one 
  8388. again. 
  8389.  
  8390. Note how the variable pointertype is declared universal so it can carry a value 
  8391. between procedures. Since strings and numbers are interchangeable, we could 
  8392. have initialized pointertype with a string instead of a numeric constant. 
  8393.  
  8394.  
  8395. ΓòÉΓòÉΓòÉ 5.2. Example Two ΓòÉΓòÉΓòÉ
  8396.  
  8397. The second E Proc shows how key set definitions can be programmed. This E Proc 
  8398. will configure a few keys of the editor to mimic the EMACS editor. 
  8399.  
  8400. /**********************************************************************/
  8401. /* This E Proc will configure a few keys in the E editor to perform   */
  8402. /* the same operations as the EMACS editor.                           */
  8403. /**********************************************************************/
  8404. defkeys mykeys
  8405. def F3 = 'quit'    /* define a key for fast exit. */
  8406. def C_A = beginline
  8407. def C_B = left
  8408. def C_D = deletechar
  8409. def C_E = endline
  8410. def C_F = right
  8411. def C_N = down
  8412. def C_P = up
  8413. def C_X =
  8414.   choice = listbox("Choose:", "/Quit/Save/")
  8415.   if (choice='Quit') then
  8416.     'quit'
  8417.   endif
  8418.   if (choice='Save') then
  8419.     'save'
  8420.   endif
  8421.  
  8422. If we have a file called EMACS.E which contains the above E Procs, this file 
  8423. would then be translated by the E translator with the following command from 
  8424. the command dialog: 
  8425.  
  8426.   etpm emacs
  8427.  
  8428. To load this file (assuming it compiled correctly) we could type from the 
  8429. command line dialog box: 
  8430.  
  8431.   link emacs
  8432.  
  8433. This will load EMACS into the currently running version of EPM. 
  8434.  
  8435. To have this file automatically included we could add the line: 
  8436.  
  8437.   include "emacs.e"
  8438.  
  8439. in the file MYKEYS.E. When we recompile EPM (see The EPM User's Guide for 
  8440. information on recompiling your editor from the OS/2 prompt) the EMACS key 
  8441. definition will always be available by issuing the following from the command 
  8442. dialog: 
  8443.  
  8444.   keys mykeys
  8445.  
  8446.  
  8447. ΓòÉΓòÉΓòÉ 6. Advanced Configuration ΓòÉΓòÉΓòÉ
  8448.  
  8449. The fact that you are reading this means that you probably want to configure 
  8450. EPM beyond that which can be done merely by setting constants.  In this section 
  8451. are listed a few advanced configuration options that involve some programming. 
  8452.  
  8453.  
  8454. ΓòÉΓòÉΓòÉ 6.1. Building Accelerator Tables from the Macro Language ΓòÉΓòÉΓòÉ
  8455.  
  8456. A Named Accelerator Table is the way true PM accelerators are created from the 
  8457. E macro language.  This is achieved using the BuildAccelTable, and the 
  8458. ActivateAccelTable statements. 
  8459.  
  8460. First, the BuildAccelTable statement is used to create, and add keys to, a 
  8461. named accelerator table.  (The first time BuildAccelTable is called the table 
  8462. is automatically created.)  During this process a data base is created linking 
  8463. accelerator keys to command ids,  and command ids to user strings.  When a 
  8464. named accelerator table is activated, it becomes a true PM accelerator table. 
  8465. This is done via the ActivateAccelTable statement. Now, when a pre-registered 
  8466. key is pressed, the corresponding command id is issued as part of the message 
  8467. parameter of a PM - WM_COMMAND message.  In the E macro world, the defc 
  8468. PROCESSMENU is executed whenever a WM_COMMAND message is received.  ARG(1) of 
  8469. PROCESSMENU contains the command-id corresponding to the event that just took 
  8470. place. If an accelerator key was the cause of the PROCESSMENU command, ARG(1) 
  8471. will be the command-id registered during the corresponding BuildAccelTable 
  8472. statement. 
  8473.  
  8474. During the PROCESSMENU command, it is sometimes useful to take the command-id 
  8475. (passed as arg(1)) and look up the corresponding user string.  This is done 
  8476. using the QueryAccelString function. 
  8477.  
  8478. Accelerator tables created with the BuildAccelTable statement can be deleted 
  8479. with the DeleteAccel statement.  BY DEFAULT, named accelerator tables are 
  8480. deleted when the corresponding edit window is closed. 
  8481.  
  8482.  
  8483. ΓòÉΓòÉΓòÉ 6.1.1. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  8484.  
  8485. The buildacceltable statement adds a key to a named accelerator table. If it is 
  8486. the first key added, the named table is automatically created. Once a table is 
  8487. built, the ActivateAccelTable statement can be issued to make the named 
  8488. accelerator table into an true, active PM Accelerator table. The syntax for the 
  8489. buildacceltable statement is: 
  8490.  
  8491. buildacceltable  table-name, user-string, key-style, key, command-id
  8492.  
  8493. table-name  a text string containing the name of your particular accelerator 
  8494.             table.  (MAX. = 80 characters) 
  8495. user-string an information string that can be retrieved using the 
  8496.             QueryAccelString function. 
  8497. key-style   describes the style of the accelerator key.  The value must be the 
  8498.             sum of the PM-defined AF_ constants defined in STDCONST.E (copied 
  8499.             from PMWIN.H in the OS/2 Toolkit). 
  8500. key         a key constant, (e.g. VK_F1) 
  8501. command-id  a unique number within this particular accelerator table (and 
  8502.             active menu) to define the key in question. (1-MAXINT) 
  8503.  
  8504.  
  8505. ΓòÉΓòÉΓòÉ 6.1.2. ACTIVATEACCELTABLE ΓòÉΓòÉΓòÉ
  8506.  
  8507. The activateacceltable statement activates a named Accelerator table created 
  8508. with BuildAccelTable. When a named accelerator table is activated, it becomes a 
  8509. true PM accelerator table. The syntax for the activateacceltable statement is: 
  8510.  
  8511. activateacceltable table-name
  8512.  
  8513. table-name  where 'table-name' is a text string containing the name of your 
  8514.             particular accelerator table.  (MAX. = 80 characters) 
  8515.  
  8516.  
  8517. ΓòÉΓòÉΓòÉ 6.1.3. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  8518.  
  8519. The queryaccelstring statement allows the retrival of the user-string which was 
  8520. registered with the BuildAccelTable statement. The syntax for the 
  8521. queryaccelstring statement is: 
  8522.  
  8523. queryaccelstring table-name, command-id
  8524.  
  8525. table-name  where 'table-name' is a text string containing the name of your 
  8526.             particular accelerator table.  (MAX. = 80 characters) 
  8527. command-id  where 'command-id' is a unique number within this particular 
  8528.             accelerator table to define the key in question. (1-MAXINT) 
  8529.  
  8530.  
  8531. ΓòÉΓòÉΓòÉ 6.1.4. DELETEACCEL ΓòÉΓòÉΓòÉ
  8532.  
  8533. The deleteaccel statement deletes a named Accelerator table created with 
  8534. BuildAccelTable.  BY DEFAULT, named accelerator tables are deleted when the 
  8535. corresponding edit window is closed. The syntax for the deleteaccel statement 
  8536. is: 
  8537.  
  8538. deleteaccel table-name
  8539.  
  8540. table-name  where 'table-name' is a text string containing the name of your 
  8541.             particular accelerator table.  (MAX. = 80 characters) 
  8542.  
  8543.  
  8544. ΓòÉΓòÉΓòÉ 6.1.5. An example that uses the Named Accelerator statements ΓòÉΓòÉΓòÉ
  8545.  
  8546. -- constants needed for Accelerator example.
  8547. -- key constants
  8548. const  VK_F2 = 33             -- Taken from PMWIN.H
  8549.        VK_F3 = 34
  8550.        VK_F4 = 35
  8551.        VK_F5 = 36
  8552.       -- key style constants
  8553.        AF_CHAR        =   1   -- Taken from PMWIN.H
  8554.        AF_VIRTUALKEY  =   2
  8555.        AF_SCANCODE    =   4
  8556.        AF_SHIFT       =   8
  8557.        AF_CONTROL     =   16
  8558.        AF_ALT         =   32
  8559.        AF_LONEKEY     =   64
  8560.        AF_SYSCOMMAND  =   256
  8561.        AF_HELP        =   512
  8562.  
  8563. -- Creates Two named accel tables, and activates the "default" table
  8564. defc loadaccel
  8565.    universal activeaccel
  8566.  
  8567.    activeaccel='default'
  8568.    otheraccel  ='other'
  8569.  
  8570.    -- Register F2 and F3 as accelerator keys
  8571.    buildacceltable activeaccel, 'john',  AF_VIRTUALKEY, VK_F2, 1000
  8572.    buildacceltable activeaccel, 'thomas',AF_VIRTUALKEY, VK_F3, 1001
  8573.  
  8574.    -- Register F4 and F5 as accelerator keys
  8575.    buildacceltable otheraccel, 'jason', AF_VIRTUALKEY, VK_F4, 1002
  8576.    buildacceltable otheraccel, 'larry', AF_VIRTUALKEY, VK_F5, 1003
  8577.  
  8578.    -- Make the "default" named accel table active.  Now F2 and F3
  8579.    -- are real accel keys,  when they are selected they will cause
  8580.    -- "processmenu" to be executed with id's of 1000 or 1001
  8581.    activateacceltable  activeaccel
  8582.  
  8583. -- In the E macro world, the defc PROCESSMENU is executed whenever
  8584. -- a WM_COMMAND message is received.   ARG(1) of PROCESSMENU contains
  8585. -- the command-id corresponding to the event that just took place.
  8586. -- If an accelerator key was the cause of the PROCESSMENU command,
  8587. -- ARG(1) will be the command-id registered during the corresponding
  8588. -- BuildAccelTable statement.
  8589. -- If a pull-down menu was selected then ARG(1) will be the command-id
  8590. -- registered during the corresponding BUILDMENUITEM statement.
  8591. defc processmenu
  8592.    universal activemenu, activeaccel
  8593.  
  8594.    -- arg(1) contains the command id specified as registered with
  8595.    -- either the BUILDMENUITEM, or BUILDACCELTABLE statements.
  8596.    cmdid = arg(1)
  8597.  
  8598.    -- First check if a usersting exists for this command-id in the
  8599.    -- active accel table.
  8600.    accelstr=queryaccelstring(activeaccel, cmdid)
  8601.    sayerror "querystring=<"accelstr"> cmdid=<"cmdid">"
  8602.  
  8603.    -- "flip-flop" active accel tables just for fun!
  8604.    if accelstr="thomas" then
  8605.       activeaccel="other"
  8606.       activateacceltable activeaccel
  8607.    endif
  8608.    if accelstr="jason" then
  8609.       activeaccel='default'
  8610.       activateacceltable activeaccel
  8611.    endif
  8612.  
  8613.    -- if an accel string was not found, try the menu manager.
  8614.    if accelstr="" then
  8615.       strip(querymenustring(activemenu,cmdid),"T",\0)
  8616.        -- execute user string after stripping off null terminating char
  8617.    endif
  8618.  
  8619.  
  8620. ΓòÉΓòÉΓòÉ 6.2. Building Menus from the Macro Language ΓòÉΓòÉΓòÉ
  8621.  
  8622. EPM allows user configurable pull-down menus.  The menus are created from the 
  8623. macro language using a set of macro procedures: 
  8624.  
  8625. BuildSubMenu Adds an entry to the action bar. 
  8626.  
  8627. BuildMenuItem Adds an entry to an action bar submenu. 
  8628.  
  8629. ShowMenu  Activates an action bar . 
  8630.  
  8631. DeleteMenu Deletes an action bar, submenu, or menu item. 
  8632.  
  8633. QueryMenuString Returns the command associated with a menu item. 
  8634.  
  8635.  
  8636. ΓòÉΓòÉΓòÉ 6.2.1. Buildsubmenu ΓòÉΓòÉΓòÉ
  8637.  
  8638. The buildsubmenu command creates an option on the action bar.  If the option 
  8639. name already exists, then the command is appended to the existing option menu 
  8640. as a sub menu option. Although the menu is built internally, it is not seen 
  8641. until a 'showmenu' is issued. The syntax for a buildsubmenu command is: 
  8642.  
  8643.  
  8644.      buildsubmenu menu_name, subid, text, cmd, mis_style, mia_attr
  8645.  
  8646. menuname    where 'menuname' is a text string containing the name of your 
  8647.             particular menu.  (MAX. = 80 characters) 
  8648. subid       where 'subid' is a unique number within this particular menu to 
  8649.             define that sub-menu in question. (1-MAXINT) 
  8650. text        where 'text' is a string of text which is to appear in as the title 
  8651.             of that particular sub-menu. 
  8652. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8653.             submenu is selected.  If the submenu has associated items then the 
  8654.             defc is not executed. 
  8655. mis_style   where 'mis_style' is a PM menu style. 
  8656. mis_attr    where 'mis_attr' is a PM menu attribute. 
  8657.  
  8658.  
  8659. ΓòÉΓòÉΓòÉ 6.2.2. Buildmenuitem ΓòÉΓòÉΓòÉ
  8660.  
  8661. The buildmenuitem command appends a menu item under an existing option on the 
  8662. action bar (which can be created with buildsubmenu). The syntax for 
  8663. buildmenuitem is: 
  8664.  
  8665.  
  8666.  
  8667.   buildmenuitem menu_name, subid, item_id, text, cmd, mis_style, mia_attr
  8668.  
  8669. menu_name   where 'menuname' is a string containing the name of your particular 
  8670.             menu.  (MAX. = 80 characters) 
  8671. subid       where 'subid' is a unique number within this particular menu to 
  8672.             define that sub-menu in question. (1-MAXINT) 
  8673. item_id     where 'item id' is a unique number within this particular menu to 
  8674.             define that menu-item in question. (1-MAXINT) 
  8675. text        where 'text' is a string of text which is to appear in as the title 
  8676.             of that particular sub-menu. 
  8677. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8678.             submenu is selected. 
  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.3. Showmenu ΓòÉΓòÉΓòÉ
  8684.  
  8685. Displays a prebuilt menu, built using 'buildsubmenu' and 'buildmenuitem'. The 
  8686. syntax for the showmenu command is: 
  8687.  
  8688.  
  8689.      showmenu menuname
  8690.  
  8691. menuname    where 'menuname' is a string containing the name of your particular 
  8692.             menu.  (MAX. = 80 characters) 
  8693.  
  8694. Note:  When a menu item is selected, the PROCESSMENU command (defined in 
  8695. STDCTRL.E) is called, with an argument of the itemid. PROCESSMENU retrieves the 
  8696. command associated with this itemid in the menu whose name is stored in the 
  8697. universal variable ACTIVEMENU, and then executes the retrieved command. 
  8698. Therefore, whenever a SHOWMENU is done, ACTIVEMENU should be set to the name of 
  8699. the menu that was shown. 
  8700.  
  8701.  
  8702. ΓòÉΓòÉΓòÉ 6.2.4. Deletemenu ΓòÉΓòÉΓòÉ
  8703.  
  8704. Deletes a named menu or a particular part of a named menu from the internal 
  8705. menu manager.  The syntax of the deletemenu command is: 
  8706.  
  8707.  
  8708.       deletemenu menuname, subid, itemid, itemonly
  8709.  
  8710. menuname    where 'menuname' is a string containing the name of your particular 
  8711.             menu.  (MAX. = 80 characters) 
  8712. subid       where 'subid' is the sub-menu that is to be deleted. To delete all 
  8713.             submenus set this parameter to 0. 
  8714. itemid      where 'item id' is the item to start deleting off a particular sub 
  8715.             menu.  To delete all menu items under a sub menu, set this 
  8716.             parameter to 0. 
  8717. itemonly    where 'itemonly' is true if it is desired to delete only the items 
  8718.             under a sub-menu but not the sub-menu itself. 
  8719.  
  8720.  
  8721. ΓòÉΓòÉΓòÉ 6.2.5. querymenustring ΓòÉΓòÉΓòÉ
  8722.  
  8723. Returns the command associated with a menu option. The syntax of the 
  8724. querymenustring command is: 
  8725.  
  8726.  
  8727.      cmd = querymenustring(menuname, subid)
  8728.  
  8729. cmd         where 'cmd' will contain the command associated with the menu 
  8730.             option requested. 
  8731. menuname    where 'menuname' is a string containing the name of the menu to be 
  8732.             queried. 
  8733. subid       where 'subid' is the sub-menu id number of the menu to be queried. 
  8734.  
  8735.  
  8736. ΓòÉΓòÉΓòÉ 6.2.6. sample menu addition ΓòÉΓòÉΓòÉ
  8737.  
  8738. This example shows a menu being added to the default action bar menu. It is 
  8739. defined as a DEFINIT in my MYSTUFF.E file. This means that each time a new edit 
  8740. window is initialized, the action bar option Compile will be added to the 
  8741. default action bar choices. Remember to recompile your editor to have this 
  8742. addition take effect. 
  8743.  
  8744.  
  8745.   definit
  8746.     universal defaultmenu
  8747.     buildsubmenu defaultmenu, 19, 'Compile', '', 0, 0
  8748.     buildmenuitem defaultmenu, 19, 911, 'Save', 'save', 0, 0
  8749.     buildmenuitem defaultmenu, 19, 912, 'Relink', 'relink test', 0, 0
  8750.     showmenu defaultmenu
  8751.  
  8752. Note that the numbers 19, 911, and 912 where chosen to insure that they are 
  8753. unique. 
  8754.  
  8755.  
  8756. ΓòÉΓòÉΓòÉ 6.3. Configuring the Mouse ΓòÉΓòÉΓòÉ
  8757.  
  8758. Power users may want to configure the mouse to meet their needs.  There are 
  8759. three base mouse sets that can be configured. See The EPM User's Guide for 
  8760. information on setting the constant my_Mousestyle to the desired value (1,2 or 
  8761. 3). This will change the basic mouse configuration styles.  You can also 
  8762. configure the mouse actions yourself.  To execute these use the built-in 
  8763. procedure REGISTER_MOUSEHANDLER. 
  8764.  
  8765. The REGISTER_MOUSHANDLER(IsGlobal, event, mcommand) command allows the binding 
  8766. of mouse actions to commands. Mouse actions can be global or local. Mouse 
  8767. actions will be processed as follows: 
  8768.  
  8769.  1. local mouse action definition (if defined) 
  8770.  2. else global mouse action definition (if defined) 
  8771.  3. else mouse action ignored. 
  8772.  
  8773. The variable IsGlobal determines whether the mouse action described is local or 
  8774. gloabl. The variable event determines the mouse action to be bound with the 
  8775. command listed in the variable mcommand. Event should be in the following 
  8776. format: 
  8777.  
  8778.         'key action state'
  8779.  
  8780. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  8781. following: 
  8782.  
  8783. BEGINDRAG           activates at the beginning of the drag 
  8784. CLICK               activates if a button (specified by key) is single clicked 
  8785. SECONDCLK           activates if a button (specified by key) is double clicked 
  8786.  
  8787. These actions must be capitalized and have exactly one space between the key 
  8788. and the state numbers. The state should be the sum of the following: 
  8789.  
  8790. 0 = no states active 
  8791. 1 = shift key active 
  8792. 2 = control key active 
  8793. 4 = alternate key active 
  8794.  
  8795. An Event should can also be of the following format: 
  8796.  
  8797.         'action'
  8798.  
  8799. where action must be one of the following: 
  8800.  
  8801. ENDDRAG             activates at the end of a drag 
  8802. CANCELDRAG          activates if a drag is cancelled 
  8803.  
  8804. These actions must be capitalized and unpadded by spaces. 
  8805.  
  8806. An example of a mouse action is: 
  8807.  
  8808. call register_mousehandler(0,'2 SECONDCLK 3','quit')
  8809.  
  8810. This would set the second click of button two on the mouse with the shift and 
  8811. control states activated to do a QUIT command. This key action would be bound 
  8812. locally to a particular file. Similarly, 
  8813.  
  8814. call register_mousehandler(1,'CANCELDRAG','SynthesizeVoice whoops')
  8815.  
  8816. would cause the 'SynthesizeVoice whoops' command to be invoked every time a 
  8817. drag was canceled in any file that did not have a local CANCELDRAG event 
  8818. handler defined. 
  8819.  
  8820. By combining several of these register_mousehandler statements together in a 
  8821. DEFLOAD statement, one can customize the mouse actions.  Note that the 
  8822. following defc commands are useful for helping define common mouse actions: 
  8823.  
  8824. o MH_BEGIN_MARK 
  8825. o MH_CANCEL_MARK 
  8826. o MH_END_MARK 
  8827. o HH_GOTOPOSITION 
  8828.  
  8829. See the section Commands Omitted From the User's Guide. for descriptions on 
  8830. these commands. 
  8831.  
  8832. An example use of these commands is: 
  8833.  
  8834.  
  8835.   defc mymouse
  8836.     register_mousehandler(0,'1 CLICK 2','MH_GOTOPOSITION')
  8837.     sayerror "New mouse command is in effect."
  8838.  
  8839. Compiling and linking this command into EPM will allow the new mouse action to 
  8840. be added when the command MYMOUSE is entered in the commandline dialog box. 
  8841. Then, whenever you hit a ctrl+left mouse button one click, the cursor will move 
  8842. to the mouse's position. 
  8843.  
  8844. If you want a series of events to happen, define a new command using defc. The 
  8845. following is an example: 
  8846.  
  8847.  
  8848.   defc mycmd
  8849.     getline txtline               -- get the current line
  8850.     'mh_gotoposition'             -- go to the mouse position
  8851.     insertline txtline            -- copy the line
  8852.     up                            -- move up to the new line
  8853.  
  8854.   defc mymouse
  8855.     register_mousehandler(0,'1 CLICK 2','mycmd')  -- set the mouse key
  8856.     sayerror "New mouse command is in effect."    -- show it worked
  8857.  
  8858. In this example, when compiled and linked, executing the command MYMOUSE will 
  8859. setup the ctrl+single button one click combination to copy the line the cursor 
  8860. is on, to the line the mouse is pointing to. See the file MOUSE.E for more 
  8861. examples of defining mouse actions. 
  8862.  
  8863. As you can see, the REGISTER_MOUSEHANDLER is a very powerful command that 
  8864. should be exploited to make the most of EPM and the mouse. 
  8865.  
  8866.  
  8867. ΓòÉΓòÉΓòÉ 6.4. Programming Hints ΓòÉΓòÉΓòÉ
  8868.  
  8869. Programming Hints 
  8870.  
  8871.  
  8872. ΓòÉΓòÉΓòÉ 6.4.1. Using REFRESH ΓòÉΓòÉΓòÉ
  8873.  
  8874. Advanced users may find themselves writing applications that rely heavily on 
  8875. the E programming language. In such applications the need may arise to have 
  8876. messages and actions update the screen while the macro continues in progress. 
  8877. Take the following example: 
  8878.  
  8879. defproc delay(time)=       -- procedure to slow things down
  8880.   totaltime=time * 100     -- this procedure represents the time consumed
  8881.   for i = 1 to totaltime   -- ... by calculations and E commands or
  8882.     j = i+5/3              -- ... external programs
  8883.   endfor
  8884.  
  8885. defc mycmd=
  8886.   'togglecontrol 8 1'           -- make sure the message bar is showing
  8887.   'setmessageline Stage one executing...'   -- this should trace
  8888.   call delay(4)                             -- ... the macro's execution
  8889.   'setmessageline Stage two executing...'
  8890.   call delay(4)
  8891.   'setmessageline Stage three executing...'
  8892.  
  8893. In this example, all the message appear very quickly as the message buffer 
  8894. empties at the end of the procedure and not throughout the procedure as was 
  8895. intended.  This occurs because the compiler doesn't refresh the screen during 
  8896. the execution of the macro. Constantly refreshing the screen is very costly and 
  8897. would slow down the execution of EPM too much. To accomplish the goal (ie. have 
  8898. the messageline trace the execution) replace mycmd with: 
  8899.  
  8900. defc mycmd=
  8901.    'togglecontrol 8 1'
  8902.    'setmessageline Stage one executing...'
  8903.    refresh
  8904.    call delay(4)
  8905.    'setmessageline Stage two executing...'
  8906.    refresh
  8907.    call delay(4)
  8908.    'setmessageline Stage three executing...'
  8909.    refresh
  8910.  
  8911. The new MYCMD will show the lines as they execute. All that was added was the 
  8912. internal statement REFRESHto cause a screen refresh. (By the way the command 
  8913. 'TOGGLECONTROL 8 0' will turn the messageline off). 
  8914.  
  8915.  
  8916. ΓòÉΓòÉΓòÉ 6.4.2. Using ECHO ΓòÉΓòÉΓòÉ
  8917.  
  8918. Debugging programs can sometimes be a rather tricky task. E is no exception. 
  8919. There is an internal procedure ECHO that can be inserted into programs to allow 
  8920. a command trace. Whenever a command is executed, it will first appear in a 
  8921. message dialog box. By keeping track of the commands the programmer can help 
  8922. trace down errors. 
  8923.  
  8924. There is also a defc front end for this internal command, allowing ECHO to be 
  8925. issued from the command line dialog box. 
  8926.  
  8927. Another useful debug tool is the messageNwait standard procedure. By placing 
  8928. messageNwaits one can view variables and create check points to verify the 
  8929. macro's execution. 
  8930.  
  8931.  
  8932. ΓòÉΓòÉΓòÉ 7. Linkable External Modules ΓòÉΓòÉΓòÉ
  8933.  
  8934. Linkable external modules. 
  8935.  
  8936.  
  8937. ΓòÉΓòÉΓòÉ 7.1. Introduction ΓòÉΓòÉΓòÉ
  8938.  
  8939. You can compile a group of .E files into an .EX file that is separate from the 
  8940. E.EX file, and yet still incorporate both into the editor. In other words, 
  8941. multiple .EX files can be loaded into the editor. Each .EX file can use up to 
  8942. 64K of p-code space. This means that there's effectively no limit on the total 
  8943. size of a user's compiled macros, as long as they can be broken into logical 
  8944. chunks ("modules") of less than 64K each. 
  8945.  
  8946. I'll use the DRAW feature as an example of the new reorganization of E via 
  8947. these linkable modules. We used to include the draw code into the base E.E so 
  8948. that it was always available, and always occupied 3410 bytes of p-code space. 
  8949. But in version 4.02, E.E omits the feature: 
  8950.  
  8951.    compile if EVERSION < '4.02'
  8952.     include 'slimdraw.e'
  8953.    compile endif
  8954. Instead, DRAW.E is compiled separately into its own .EX file. Now when you type 
  8955. draw in the command dialog box, EPM searches for DRAW.EX on disk, loads it into 
  8956. its own block of memory, and begins execution. The relocation of the draw code 
  8957. is transparent to the user, except for the slight delay of the disk search. 
  8958. Once the draw command is completed, the module is released again, to free up 
  8959. memory. 
  8960.  
  8961.  
  8962. ΓòÉΓòÉΓòÉ 7.2. Implicit Loading of External Modules ΓòÉΓòÉΓòÉ
  8963.  
  8964. External modules can be invoked implicitly, by simply issuing the name of the 
  8965. module as a command.  As in our previous example, the user (or a macro) can 
  8966. simply issue the DRAW command (F6). When E sees that the command is not in its 
  8967. base set, it will search the disk for an .EX file of the same name. The search 
  8968. follows the same rules as for shelling an external .EXE program: 
  8969.  
  8970. o It does not occur if AUTOSHELL is off. 
  8971.  
  8972. o The search path is: 
  8973.  
  8974.    - the current directory, 
  8975.    - the directories in PATH, 
  8976.    - the directories in EPMPATH, and 
  8977.    - E's directory. 
  8978.  
  8979. o An .EX file will be found before a .EXE or .CMD file, but after an internal 
  8980.   system command.  (That is, you can't name a module EDIT.EX because EDIT will 
  8981.   always be recognized first as an internal system command.) 
  8982. Upon activation of the module, its code contents will be executed in the 
  8983. following order: 
  8984.  
  8985. o DEFINIT will be executed first if it exists.  This will consist of minor 
  8986.   initialization tasks like predefining variables. 
  8987.  
  8988. o DEFMAIN will be executed.  This is the body of the command.  If you convert 
  8989.   an old macro to an external module, you'll usually rename its DEFC to 
  8990.   DEFMAIN.  For instance, when SLIMDRAW.E was converted to the module DRAW.E, 
  8991.   defc draw was changed to defmain. 
  8992.  
  8993. o DEFEXIT, if it exists, will be executed after DEFMAIN finishes. 
  8994.  
  8995. When a module is invoked implicitly, it is executed once and discarded.  All 
  8996. three sections -- DEFINIT, DEFMAIN, DEFEXIT -- are run in sequence, so the 
  8997. division makes little difference; you'd get the same results by lumping them 
  8998. all into DEFMAIN. 
  8999.  
  9000.  
  9001. ΓòÉΓòÉΓòÉ 7.3. Explicit Linking of External Modules ΓòÉΓòÉΓòÉ
  9002.  
  9003. For better control, you can explicitly load a module with the LINK and UNLINK 
  9004. statements.  The DRAW module can be linked by the statement: 
  9005.  
  9006.    link 'draw'
  9007. E will search the disk for the explicit filename DRAW.EX, without bothering to 
  9008. check for internal system commands or .EXE files. This gives you some minor 
  9009. advantages since an explicit search can be faster, and the module can have the 
  9010. same name as a system command (DIR.EX) or a DEFC compiled into your base set. 
  9011. But the primary advantage is a better control of the order of execution. 
  9012. DEFMAIN is not executed at all.  DEFINIT is executed at link time, and DEFEXIT 
  9013. at unlink time.  In the interim all the module's commands, procs, universal 
  9014. variables and keysets are available globally.  This will be important if 
  9015. procedures or variables are shared by several modules. 
  9016.  
  9017. Explicit linking to the draw module does NOT execute the DRAW command. In fact 
  9018. the DEFMAIN of such a module is never executed if it is explicitly linked. In 
  9019. order to execute the DRAW command under these conditions, you must define a 
  9020. defc draw. The following example shows how the new external draw module allows 
  9021. users to link to it implicitly and explicitly: 
  9022.  
  9023. definit
  9024.     /* initializations, global vars, etc. */
  9025.  
  9026. defmain
  9027.     'draw' arg(1)
  9028.  
  9029. defc draw
  9030.     /* code which implements DRAW command */
  9031.     /*   remains the same as when it was  */
  9032.     /*   included in E.E                  */
  9033.  
  9034. If you repeat a link of an already-linked module, no harm is done.  The disk is 
  9035. not searched again, but the module's DEFINIT is re-executed as if the module 
  9036. were reloaded from scratch. 
  9037.  
  9038. Note:  if your module has a DEFEXIT, don't use a STOP statement to end 
  9039. execution of DEFMAIN.  A STOP will permanently end the module's execution 
  9040. before getting to the DEFEXIT. 
  9041.  
  9042. Note:  The RC, universal return code variable, is set to the module number of 
  9043. the .ex file linked. 
  9044.  
  9045.  
  9046. ΓòÉΓòÉΓòÉ 7.4. Useful Commands ΓòÉΓòÉΓòÉ
  9047.  
  9048. Since LINK and UNLINK are statements, we had to redefine them as commands in 
  9049. order to give you access to explicit linking from the command dialog box. We 
  9050. also added a RELINK command. All of these commands are defined in the file 
  9051. LINKCMDS.E as follows: 
  9052.  
  9053.    defc link
  9054.       link arg(1)
  9055.  
  9056.    defc unlink
  9057.       unlink arg(1)
  9058. A combination of the two gives us the nifty RELINK command: 
  9059.  
  9060.    defc relink
  9061.       if arg() > 0 then
  9062.         modulename=arg(1)     -- if argument is given, then uses that
  9063.       else
  9064.         modulename=.filename  -- if no argument, then assume current file
  9065.         'save '||.filename    --   ... and save current file
  9066.       endif
  9067.       'etpm' modulename       -- Recompile it,
  9068.       unlink modulename       --   unlink the old version,
  9069.       link modulename         --     relink the new one.
  9070. This is very useful for fast development of macros, since you don't have to 
  9071. exit from the editor to compile revised macros and re-run the newly compiled 
  9072. version. You can relink a macro in a few seconds.  (RELINK DRAW, for example, 
  9073. takes 3 seconds on my AT. Understand that the slow step is the compilation; 
  9074. LINK and UNLINK are almost instantaneous.) 
  9075.  
  9076. When using LINK, UNLINK and RELINK as commands, you need not enclose the module 
  9077. name in quotes. For example, the statement link 'draw' is acceptable, but the 
  9078. command link 'draw' would be incorrect. The interpreter would assume that the 
  9079. name of the module was six characters and included the quotes. The correct 
  9080. syntax for the command (i.e. issued from the command line dialog box) is: 
  9081.  
  9082. link draw
  9083.  
  9084.  
  9085. ΓòÉΓòÉΓòÉ 7.5. Keysets ΓòÉΓòÉΓòÉ
  9086.  
  9087. Individual keys cannot be linked; you cannot define a single key (like def f1) 
  9088. in an external module.  You can however link a keyset, which is almost as easy, 
  9089. by following these steps: 
  9090.  
  9091.  1. Begin the key definitions with a DEFKEYS declaration: 
  9092.  
  9093.            In MYMODULE.E:
  9094.  
  9095.               defkeys mymodule_keys
  9096.               def f5=
  9097.                  sayerror 'F5 pressed'
  9098.  
  9099.  2. Compile the module: et mymodule. 
  9100.  
  9101.  3. Link it: link mymodule. 
  9102.  
  9103.  4. Execute a KEYS statement: keys mymodule_keys. The best place to put the 
  9104.     KEYS statement is in the module's DEFINIT so that it automatically gets 
  9105.     executed immediately after linking: 
  9106.  
  9107.               definit        -- Also in MYMODULE.E
  9108.                  keys mymodule_keys
  9109.  
  9110. It doesn't make much sense to define keys in a module that will be implicitly 
  9111. loaded.  An implicitly-loaded module will be run once and discarded; its keyset 
  9112. will not be retained long enough to be used. Instead you should explicitly link 
  9113. an external module with keyset definitions, so that its resources will stick 
  9114. around until released. 
  9115.  
  9116. Keysets are stored economically (as a linked list) so that a two-key keyset 
  9117. occupies only 8 bytes.  The expansion and overlaying onto a base keyset occur 
  9118. at run time, within the KEYS statement. 
  9119.  
  9120. Partial keysets can be defined usefully in external modules. edit_keys can be 
  9121. defined in the base module E.E, and mymodule_keys can be defined elsewhere. 
  9122. The overlaying occurs soon after the link (assuming you put a KEYS statement in 
  9123. MYMODULE's DEFINIT as recommended). We refer to the partial external keyset as 
  9124. an overlay keyset and edit_keys as the base. E will accept BASE as a synonym 
  9125. for NEW, and OVERLAY means the same thing as the absence of NEW.  The following 
  9126. are equivalent: 
  9127.  
  9128.    defkeys edit_keys new     =      defkeys edit_keys base
  9129.    defkeys c_keys            =      defkeys c_keys overlay
  9130.  
  9131. You can return to the base edit_keys either by executing keys edit_keys or by 
  9132. unlink 'mymodule'. When a module is unlinked, its keyset is automatically 
  9133. removed. 
  9134.  
  9135. Note:  That's true only for OVERLAY keysets.  E will complain if you try to 
  9136. unlink a module containing the current base keyset, since that would leave no 
  9137. keys at all.  You'd see the message Cannot unlink base keyset module. 
  9138.  
  9139. Note:  A base keyset (as defined by DEFKEYS BASE or NEW) is automatically given 
  9140. a starting set of the standard 128 ASCII keys, including 'A'-'Z', '0'-'9', and 
  9141. control keys.  Even if you don't give the keyset any DEF's, it will include the 
  9142. ASCII keys.  But some applications might not want those keys included, so 
  9143. another keyset attribute CLEAR has been added.  For example: 
  9144.  
  9145.    defkeys zero_keys base clear
  9146. defines a REALLY empty keyset. 
  9147.  
  9148.  
  9149. ΓòÉΓòÉΓòÉ 7.6. Multiple Definitions ΓòÉΓòÉΓòÉ
  9150.  
  9151. If a command (DEFC) of the same name is defined in more than one module, the 
  9152. highest (latest-linked) module wins.  The last-linked module can be regarded as 
  9153. the "current application", whose commands take precedence in case of name 
  9154. conflicts.  If the highest module is unlinked, commands in lower modules become 
  9155. available again. Keysets are similar.  If multiple modules define the same 
  9156. keyset name, the latest-linked module's keyset wins. 
  9157.  
  9158. If a procedure (DEFPROC) is defined in multiple modules, the definition in the 
  9159. caller's module (if any) wins, whether or not that module is the latest-linked. 
  9160. This is consistent with the concept of a current application. If module 3 calls 
  9161. myproc() and module 3 itself contains a defproc myproc(), that's certainly the 
  9162. one that the application writer intended to be called. 
  9163.  
  9164. If a procedure is multiply defined but none of the definitions are in the 
  9165. caller's module, an error Call: duplicated proc is issued. If a procedure is 
  9166. defined only once, that definition wins even if it isn't in the caller's 
  9167. module. 
  9168.  
  9169. To determine a module number, issue a QLINK command followed by the name of an 
  9170. E module already linked. For example: 
  9171.  
  9172.   QLINK EPM
  9173.  
  9174. would return module number zero (the lowest level) because it is always linked, 
  9175. and always the first module loaded. 
  9176.  
  9177. Universal variables can be declared in many different modules, all of which 
  9178. share the same data. A universal variable is not discarded as long as any 
  9179. active module references it.  Thus a module can initialize a variable and be 
  9180. unlinked, without the value being lost, as long as any other module needs it. 
  9181.  
  9182.  
  9183. ΓòÉΓòÉΓòÉ 7.7. E Applications ΓòÉΓòÉΓòÉ
  9184.  
  9185. Large applications are feasible in the E language. Dynamic linking, i.e. the 
  9186. ability to link a compiled module at run-time, makes it possible to distribute 
  9187. an application as a compiled .EX file.  Distributing object-code-only 
  9188. applications is possible. This is not recommended, as many programmers wish to 
  9189. be able to examine and adjust the source code of applications according to 
  9190. their own needs. However, this type of distribution would have its advantages. 
  9191. For example, this would make such an application much easier for the end-user 
  9192. to use. The user would simply have to: 
  9193.  
  9194.  1. copy it onto the hard disk, somewhere along the PATH, and 
  9195.  
  9196.  2. type its name as a command. 
  9197.  
  9198.     Note:  that's strictly true only for implicit loading. Complex applications 
  9199.     will usually require explicit LINK and UNLINK commands, but even those can 
  9200.     be given single-word front ends if desired; see MATH.E for examples. 
  9201. In addition, invoking it is fast: the time for a link equals a fraction of a 
  9202. second plus the path-search time.  (Path-search times can be minimized by 
  9203. explicit LINK commands with explicit file specs for the modules, like "link 
  9204. c:\epm\mymodule".) 
  9205.  
  9206. Another recent change to support compiled applications is that: EPM.EXE can run 
  9207. earlier-version .EX files.  If a developer releases an application as an 
  9208. object-code black box (compiled, say, with ET 4.03) it will still be runnable 
  9209. if and when the user upgrades EPM.EXE.  The versions of E and ETPM will not 
  9210. have to match, as long as E is more recent than the .EX file. (Assuming we 
  9211. don't make any more major structural revisions as we did in release 4.02.) 
  9212.  
  9213. If your application really must know the exact versions of E and ET it's 
  9214. working with, it can check two things: 
  9215.  
  9216. o EVERSION is a constant supplied automatically by ET.  It's a constant 
  9217.   attribute of the .EX file. The name EVERSION appears to be an unfortunate 
  9218.   choice in hindsight, since it's really ETVERSION. 
  9219.  
  9220. o A new function VER() provides EPM.EXE's version.  This will be the same 
  9221.   version number now shown by the VER command, but in function form so it's 
  9222.   queryable by a macro. 
  9223. Your application could do something like: 
  9224.  
  9225.    if ver() <> EVERSION then
  9226.       sayerror "Sorry, I can only run with EPM.EXE version "EVERSION"."
  9227.       stop
  9228.    endif
  9229.  
  9230. Note:  Advice to writers of add-on applications:  If you're writing a 
  9231. stand-alone E application, one that you'd like to compile separately and link 
  9232. in as an external module (which we recommend), feel free to include STDCONST.E 
  9233. because unused constants do not waste space now.  You should also try to 
  9234. include MYCNF.E to allow the user to pre-override your constants.  A catch-all 
  9235. header is: 
  9236.  
  9237.    include     'colors.e'
  9238.    include     'stdconst.e'
  9239.    tryinclude  'mycnf.e'
  9240. Your applications can check whether the user overrode your constants with 
  9241. compile if defined().  For example: 
  9242.  
  9243.    compile if not defined(AUTOSAVE_PATH)
  9244.       const AUTOSAVE_PATH=''
  9245.    compile endif
  9246. A similar technique allows your application to check whether it's being 
  9247. compiled as part of the base (by an INCLUDE) or as an external module (by a 
  9248. LINK).  Query the existence of any constant that's defined in the base, like 
  9249. SMALL. 
  9250.  
  9251.    compile if not defined(SMALL) -- are we separately compiled?
  9252.     include 'colors.e'           -- if so, must include color names
  9253.    compile endif
  9254.  
  9255. The file USERAPP.SMP, which is included in EMACROS.FLS, is a good example of a 
  9256. routine that tests to see if it's base or external; if external, sets 
  9257. configuration constants the same way they would be set if it were included in 
  9258. the base; and defines the routines it needs without duplicating anything that's 
  9259. included in the base macros. 
  9260.  
  9261.  
  9262. ΓòÉΓòÉΓòÉ 7.8. Dynamic Linking ΓòÉΓòÉΓòÉ
  9263.  
  9264. Dynamic linking is the delayed binding of application program external 
  9265. references to subroutines.  There are two forms of dynamic linking -- load time 
  9266. and run time. 
  9267.  
  9268. In load time dynamic linking, a program calls a dynamically linked routine just 
  9269. as it would any external routine.  When the program is assembled or compiled, a 
  9270. standard external reference is generated.  At link time, the programmer 
  9271. specifies one or more libraries which contain routines to satisfy external 
  9272. references.  External routines to be dynamically linked contain special 
  9273. definition records in the library.  A definition record tells the linker that 
  9274. the routine in question is to be dynamically linked and provides the linker 
  9275. with a dynamic link module name and entry name.  The module name is the name of 
  9276. a special executable file with the filename extension of .DLL which contains 
  9277. dynamic link entry points.  The linker stores module name/entry name pairs 
  9278. describing the dynamic link routines in the executable file created for the 
  9279. program. When the calling program is run, OS/2 loads the dynamic link routines 
  9280. from the modules specified and links the calling program to the called 
  9281. routines. 
  9282.  
  9283. For more information on Dynamic Linking see the OS/2 Technical Reference 
  9284. Manual. For an example of dynamic linking in E using the DYNALINK command see 
  9285. the DYNATEST.E file. 
  9286.  
  9287.  
  9288. ΓòÉΓòÉΓòÉ 7.9. Run-Time Error Messages for Linking and Keysets ΓòÉΓòÉΓòÉ
  9289.  
  9290. Call: duplicated proc 
  9291.                               A macro called a procedure that is not defined in 
  9292.                               the caller's module, but which is defined in more 
  9293.                               than one other module.  The caller can't decide 
  9294.                               which DEFPROC is the right one. 
  9295.  
  9296. Call: unknown proc 
  9297.                               A macro tried to call a procedure that is not 
  9298.                               defined in any module. Note that ET will now 
  9299.                               allow you to compile an .E file with unresolved 
  9300.                               procedure calls; it assumes some other module 
  9301.                               will supply the DEFPROC by the time the call 
  9302.                               occurs.  If that doesn't happen, this message is 
  9303.                               given at run-time. 
  9304.  
  9305. Cannot find keyset 
  9306.                               A macro tried to execute a KEYS statement with an 
  9307.                               unknown keyset name. Perhaps the module 
  9308.                               containing the keyset (the DEFKEYS) has not been 
  9309.                               linked. 
  9310.  
  9311. Cannot unlink base keyset module 
  9312.                               You tried to unlink the module that selected the 
  9313.                               current base keyset. What keys would be left 
  9314.                               after the unlink? 
  9315.  
  9316. Cannot unlink module in use 
  9317.                               A macro tried to unlink the same module it was 
  9318.                               contained in.  Or it tried to unlink a calling 
  9319.                               module (one that must be kept around for 
  9320.                               returning to). Only modules which are not 
  9321.                               involved in the current chain of execution can be 
  9322.                               unlinked.  You can produce this message by the 
  9323.                               command 'UNLINK E' which tries to unlink E.EX. 
  9324.  
  9325. Invalid EX file or incorrect version 
  9326.                               You tried to link to a file that does not have 
  9327.                               the proper .EX format expected, or you tried to 
  9328.                               link to an .EX file that was compiled with a past 
  9329.                               version of the ET translator. 
  9330.  
  9331. Link: file not found 
  9332.                               You probably misspelled the module's filename in 
  9333.                               a LINK statement. The filename.EX could not be 
  9334.                               found in the current directory or along the PATH. 
  9335.  
  9336. Link: invalid filename 
  9337.                               The module name is poorly formed in a link 
  9338.                               statement, for example with multiple periods or 
  9339.                               colons.  This is an unusual error; normally 
  9340.                               you'll get "Link: file not found". 
  9341.  
  9342. Unlink: bad module filename 
  9343.                               You tried to unlink a module that does not exist 
  9344.                               on disk. 
  9345.  
  9346. Unlink: unknown module 
  9347.                               You tried to unlink a module that is not 
  9348.                               currently linked, although it does exist on the 
  9349.                               disk. 
  9350.  
  9351.  
  9352. ΓòÉΓòÉΓòÉ 8. E Language Syntax ΓòÉΓòÉΓòÉ
  9353.  
  9354. In this appendix the syntax of the E language is presented in a modified EBNF 
  9355. notation. For those who are unfamiliar with this form, a brief summary of its 
  9356. symbolic conventions are presented here: 
  9357.  
  9358. Keywords of the E language are printed here entirely in capital letters. All 
  9359. program components (non-terminals) whose definition is included in this section 
  9360. are highlighted in a bold font. All other literals (i.e. those strings that 
  9361. should be included in an E phrase exactly as they appear here in the syntax) 
  9362. are enclosed with single or double quotes. Any other character in the syntax is 
  9363. used as a symbol to convey the following meanings: 
  9364.  
  9365. A B       represents the concatenation of A AND B. 
  9366. (A | B)   represents either expression A OR expression B. 
  9367. [ A ]     represents an optional occurrence of expression A: zero or one 
  9368.           occurrence. 
  9369. { A }     represents zero or more occurrences of expression A. 
  9370. 'a'..'z'  represents: 'a' OR 'b' OR 'c' ... OR 'z' 
  9371.  
  9372.  
  9373. ΓòÉΓòÉΓòÉ 8.1. Syntax Notes ΓòÉΓòÉΓòÉ
  9374.  
  9375.  1. A semicolon is treated the same as a new line.  Wherever you see ';' in the 
  9376.     following listing, a line-break (a 'newline', CR-LF) is acceptable. Several 
  9377.     examples of line breaks were given in the earlier section Line 
  9378.     Continuations. 
  9379.  
  9380.  2. Quoted strings in syntax descriptions below indicate that the enclosed 
  9381.     string is not a keyword in the language.  Quoted strings (ex. 'filename') 
  9382.     below are not case specific. 
  9383.  
  9384.  3. For speed reasons the lexer does not return a space token for space and tab 
  9385.     characters. Syntax descriptions have been written without space tokens for 
  9386.     convenience. 
  9387.  
  9388.  4. Strings may not cross file or line boundaries. 
  9389.  
  9390.  5. Comments may not cross file boundaries.   There are three styles of 
  9391.     comments.    /*  */  may be nested and may cross line boundaries.    ; 
  9392.     in column 1 makes the rest of line a comment.    --    in any column makes 
  9393.     the rest of line a comment. 
  9394.  
  9395.  6. Include files may be nested. 
  9396.  
  9397.  7. Implied concatenation expressions with comments between have undefined 
  9398.     values.       'a'  /* comment */'b'    Undefined value 
  9399.  
  9400.  8. Identifiers are not case sensitive. 
  9401.  
  9402.  9. Compiler directives (COMPILE IF and INCLUDEs) are included in the following 
  9403.     listing, but cannot be sufficiently explained with this limited syntactical 
  9404.     depiction. Be aware that they can occur anywhere a semicolon or newline 
  9405.     can. For a more in depth discussion, see section Compiler Directive 
  9406.     Statements. 
  9407.  
  9408.  
  9409. ΓòÉΓòÉΓòÉ 8.2. The Syntax ΓòÉΓòÉΓòÉ
  9410.  
  9411. Syntax of the E language. 
  9412.  
  9413.  
  9414. ΓòÉΓòÉΓòÉ 8.2.1. e_program ΓòÉΓòÉΓòÉ
  9415.  
  9416. e_program ::=  definition_group 
  9417.  
  9418.  
  9419. ΓòÉΓòÉΓòÉ 8.2.2. definition_group ΓòÉΓòÉΓòÉ
  9420.  
  9421. definition_group ::=   definition  {definition} 
  9422.  
  9423.  
  9424. ΓòÉΓòÉΓòÉ 8.2.3. definition ΓòÉΓòÉΓòÉ
  9425.  
  9426. definition ::=  DEF  keyname {','{';'} keyname} ['=']   global_decl_group 
  9427. statement_group   [RETURN] 
  9428.  
  9429. | DEFC  identifier {',' identifier} ['=']   global_decl_group  statement_group 
  9430. [RETURN [expression] ] 
  9431.  
  9432. | DEFEXIT {';'} global_decl_group  statement_group 
  9433.  
  9434. | DEFINIT {';'} global_decl_group  statement_group 
  9435.  
  9436. | DEFKEYS  identifier [NEW | BASE | OVERLAY | CLEAR] 
  9437.  
  9438. | DEFMAIN {';'} global_decl_group  statement_group 
  9439.  
  9440. | DEFPROC identifier ['('{';'} formal_decl_group')']   global_decl_group 
  9441. statement_group   [RETURN [expression] ] 
  9442.  
  9443. | SET 'cursors' ['=']  number 
  9444.  
  9445. | SET 'insert_state' ['='] 0 | 1 
  9446.  
  9447. | CONST  {';'} const_decl_group 
  9448.  
  9449. | compiler_directive 
  9450.  
  9451. | ';' 
  9452.  
  9453.  
  9454. ΓòÉΓòÉΓòÉ 8.2.4. compiler_directive ΓòÉΓòÉΓòÉ
  9455.  
  9456. compiler_directive  INCLUDE  string ';' 
  9457.  
  9458. | TRYINCLUDE  string ';' 
  9459.  
  9460. | COMPILE IF constant_expression { ';' }     ( statement_group | 
  9461. definition_group )   {COMPILE ELSEIF constant_expression { ';' }     ( 
  9462. statement_group | definition_group ) }   [COMPILE ELSE  { ';' }     ( 
  9463. statement_group | definition_group ) ]   COMPILE ENDIF 
  9464.  
  9465.  
  9466. ΓòÉΓòÉΓòÉ 8.2.5. formal_decl_group ΓòÉΓòÉΓòÉ
  9467.  
  9468. formal_decl_group ::=  formal_declaration { {';'} [','] {';'} 
  9469. formal_declaration } 
  9470.  
  9471.  
  9472. ΓòÉΓòÉΓòÉ 8.2.6. formal_declaration ΓòÉΓòÉΓòÉ
  9473.  
  9474. formal_declaration ::=  [VAR]  identifier 
  9475.  
  9476.  
  9477. ΓòÉΓòÉΓòÉ 8.2.7. const_decl_group ΓòÉΓòÉΓòÉ
  9478.  
  9479. const_decl_group ::=  { constant_declaration {';'} (';' | ',') {';'} } 
  9480.  
  9481.  
  9482. ΓòÉΓòÉΓòÉ 8.2.8. constant_declaration ΓòÉΓòÉΓòÉ
  9483.  
  9484. constant_declaration ::=  identifier '='  expression 
  9485.  
  9486.  
  9487. ΓòÉΓòÉΓòÉ 8.2.9. global_decl_group ΓòÉΓòÉΓòÉ
  9488.  
  9489. global_decl_group ::=  {global_declaration {';'} } 
  9490.  
  9491.  
  9492. ΓòÉΓòÉΓòÉ 8.2.10. global_declaration ΓòÉΓòÉΓòÉ
  9493.  
  9494. global_declaration ::=  UNIVERSAL {';'}  identifier ['*']  {';'} {',' {';'} 
  9495. identifier } 
  9496.  
  9497.  
  9498. ΓòÉΓòÉΓòÉ 8.2.11. keyname ΓòÉΓòÉΓòÉ
  9499.  
  9500. keyname ::=  " ' " printable_char " ' " 
  9501.  
  9502. | " ' " printable_char " ' " '-' " ' "printable_char " ' " 
  9503.  
  9504. Although ETPM will accept all key definitions, some may seem not to take effect 
  9505. because PM intercepts these keys before EPM sees them. For a list of these keys 
  9506. see PM Keys. 
  9507.  
  9508. | 'backspace' 
  9509.  
  9510. | 'keydown' 
  9511.  
  9512. | 'keyend' 
  9513.  
  9514. | 'keyenter' 
  9515.  
  9516. | 'keyleft' 
  9517.  
  9518. | 'keyright' 
  9519.  
  9520. | 'keytab' 
  9521.  
  9522. | 'keyup' 
  9523.  
  9524. | 'space' 
  9525.  
  9526. | 'del' 
  9527.  
  9528. | 'end' 
  9529.  
  9530. | 'tab' 
  9531.  
  9532. | 'up' 
  9533.  
  9534. | 'enter' 
  9535.  
  9536. | 'entry' 
  9537.  
  9538. | 'esc' 
  9539.  
  9540. | 'f1'..'f12' 
  9541.  
  9542. | 'down' 
  9543.  
  9544. | 'home' 
  9545.  
  9546. | 'ins' 
  9547.  
  9548. | 'left' 
  9549.  
  9550. | 'pgdn' 
  9551.                                | 'pagedown' 
  9552.  
  9553. | 'pgup' 
  9554.                                | 'pageup' 
  9555.  
  9556. | 'right' 
  9557.  
  9558. | 'padenter' 
  9559.                                | 'pad_enter' 
  9560.  
  9561. | 's_f1'..'s_f12' 
  9562.  
  9563. | 's_tab' 
  9564.  
  9565. | 's_backspace' 
  9566.  
  9567. | 's_enter' 
  9568.  
  9569. | 's_esc' 
  9570.  
  9571. | 's_pgup' 
  9572.                                | 's_pageup' 
  9573.  
  9574. | 's_pgdn' 
  9575.                                | 's_pagedown' 
  9576.  
  9577. | 's_end' 
  9578.  
  9579. | 's_home' 
  9580.  
  9581. | 's_left' 
  9582.  
  9583. | 's_up' 
  9584.  
  9585. | 's_right' 
  9586.  
  9587. | 's_down' 
  9588.  
  9589. | 's_ins' 
  9590.  
  9591. | 's_del' 
  9592.  
  9593. | 's_padenter' 
  9594.  
  9595. | 's_space 
  9596.  
  9597. | 'a_0'..'a_9' 
  9598.  
  9599. | 'a_a'..'a_z' 
  9600.  
  9601. | 'a_f1'..'a_f12' 
  9602.  
  9603. | 'a_enter' 
  9604.  
  9605. | 'a_padenter' 
  9606.  
  9607. | 'a_backspace' 
  9608.  
  9609. | 'a_space' 
  9610.  
  9611. | 'a_minus' 
  9612.  
  9613. | 'a_equal' 
  9614.  
  9615. | 'a_leftbracket' 
  9616.  
  9617. | 'a_rightbracket' 
  9618.  
  9619. | 'a_tab' 
  9620.  
  9621. | 'a_quote' 
  9622.  
  9623. | 'a_comma' 
  9624.  
  9625. | 'a_period' 
  9626.  
  9627. | 'a_slash' 
  9628.  
  9629. | 'a_semicolon' 
  9630.  
  9631. | 'a_backslash' 
  9632.  
  9633. | 'c_0'..'c_9' 
  9634.  
  9635. | 'c_a'..'c_z' 
  9636.  
  9637. | 'c_f1'..'c_f12' 
  9638.  
  9639. | 'c_backslash' 
  9640.  
  9641. | 'c_backspace' 
  9642.  
  9643. | 'c_keyenter' 
  9644.  
  9645. | 'c_pagdown' 
  9646.                                | 'c_pgdn' 
  9647.  
  9648. | 'c_pageup' 
  9649.                                | 'c_pgup' 
  9650.  
  9651. | 'c_space' 
  9652.  
  9653. | 'c_quote' 
  9654.  
  9655. | 'c_comma' 
  9656.  
  9657. | 'c_period' 
  9658.  
  9659. | 'c_slash' 
  9660.  
  9661. | 'c_semicolon' 
  9662.  
  9663. | 'c_equal' 
  9664.  
  9665. | 'c_del' 
  9666.  
  9667. | 'c_down' 
  9668.  
  9669. | 'c_end' 
  9670.  
  9671. | 'c_enter' 
  9672.  
  9673. | 'c_home' 
  9674.  
  9675. | 'c_ins' 
  9676.  
  9677. | 'c_left' 
  9678.  
  9679. | 'c_leftbracket' 
  9680.  
  9681. | 'c_minus' 
  9682.  
  9683. | 'c_prtsc' 
  9684.  
  9685. | 'c_right' 
  9686.  
  9687. | 'c_rightbracket' 
  9688.  
  9689. | 'c_tab' 
  9690.  
  9691. | 'c_up' 
  9692.  
  9693. | 'c_padenter' 
  9694.                                | 'c_pad_enter' 
  9695.  
  9696. | 'otherkeys' 
  9697.                                | 'other_keys' 
  9698.  
  9699.  
  9700. ΓòÉΓòÉΓòÉ 8.2.12. statement_group ΓòÉΓòÉΓòÉ
  9701.  
  9702. statement_group ::=  { {';'}  statement ';' {';'} } 
  9703.  
  9704.  
  9705. ΓòÉΓòÉΓòÉ 8.2.13. statement ΓòÉΓòÉΓòÉ
  9706.  
  9707. statement ::=  assignment_statement 
  9708.  
  9709. | built-in_statement 
  9710.  
  9711. | conditional_statement 
  9712.  
  9713. | parse_statement 
  9714.  
  9715. | compiler_directive 
  9716.  
  9717. | procedure_call 
  9718.  
  9719. |  " ' "command" ' " All commands used in an E program must be quoted, e.g. 
  9720. if new=0 then       'edit' 
  9721.  
  9722.  
  9723. ΓòÉΓòÉΓòÉ 8.2.14. assignment_statement ΓòÉΓòÉΓòÉ
  9724.  
  9725. assignment_statement ::=  designator '=' expression 
  9726.  
  9727.  
  9728. ΓòÉΓòÉΓòÉ 8.2.15. designator ΓòÉΓòÉΓòÉ
  9729.  
  9730. designator ::=  identifier 
  9731.  
  9732. | identifier '.'  field 
  9733.  
  9734. | '.'  field 
  9735.  
  9736. | built-in_universal_variable 
  9737.  
  9738.  
  9739. ΓòÉΓòÉΓòÉ 8.2.16. field ΓòÉΓòÉΓòÉ
  9740.  
  9741. field ::=  'autosave' 
  9742.  
  9743. | 'autoshell' 
  9744.  
  9745. | 'col' 
  9746.  
  9747. | 'cursorx' 
  9748.  
  9749. | 'cursory' 
  9750.  
  9751. | 'dragcolor' 
  9752.  
  9753. | 'dragstyle' 
  9754.  
  9755. | 'filename' 
  9756.  
  9757. | 'font' 
  9758.  
  9759. | 'fontheight' 
  9760.  
  9761. | 'fontwidth' 
  9762.  
  9763. | 'keyset' 
  9764.  
  9765. | 'last' 
  9766.  
  9767. | 'line' 
  9768.  
  9769. | 'lineg' 
  9770.  
  9771. | 'lockhandle' 
  9772.  
  9773. | 'margins' 
  9774.  
  9775. | 'markcolor' 
  9776.  
  9777. | 'messagecolor' 
  9778.  
  9779. | 'modify' 
  9780.  
  9781. | 'mousex' 
  9782.  
  9783. | 'mousey' 
  9784.  
  9785. | 'statuscolor' 
  9786.  
  9787. | 'tabs' 
  9788.  
  9789. | 'textcolor' 
  9790.  
  9791. | 'userstring' 
  9792.  
  9793. | 'visible' 
  9794.  
  9795. | 'windowheight' 
  9796.  
  9797. | 'windowwidth' 
  9798.  
  9799. | 'windowx' 
  9800.  
  9801. | 'windowy' 
  9802.  
  9803.  
  9804. ΓòÉΓòÉΓòÉ 8.2.17. built-in_universal_variable ΓòÉΓòÉΓòÉ
  9805.  
  9806. built-in_universal_variable ::= CENTER_SEARCH 
  9807.  
  9808. | JOIN_AFTER_WRAP 
  9809.  
  9810. | RC 
  9811.  
  9812. | EXIT_AFTER_LAST_FILE 
  9813.  
  9814. | TWO_SPACES 
  9815.  
  9816.  
  9817. ΓòÉΓòÉΓòÉ 8.2.18. built-in_statement ΓòÉΓòÉΓòÉ
  9818.  
  9819. built-in_statement ::= See individual statement. 
  9820.  
  9821.  
  9822. ΓòÉΓòÉΓòÉ 8.2.19. conditional_statement ΓòÉΓòÉΓòÉ
  9823.  
  9824. conditional_statement ::=  DO  i=expression  TO  expression [BY expression] 
  9825. statement_group  [LEAVE] [ITERATE] statement_group  (END | ENDDO) 
  9826.  
  9827. | DO FOREVER   statement_group  [LEAVE] [ITERATE] statement_group  (END | 
  9828. ENDDO) 
  9829.  
  9830. | DO WHILE expression   statement_group  [LEAVE] [ITERATE] statement_group 
  9831. (END | ENDDO) 
  9832.  
  9833. | FOR i=expression TO expression [BY expression]   statement_group  [LEAVE] 
  9834. [ITERATE] statement_group  ENDFOR 
  9835.  
  9836. | IF expression { ';' } THEN statement_group   {ELSEIF expression { ';' } THEN 
  9837. statement_group}   [ELSE statement_group]  { ';' }  ENDIF 
  9838.  
  9839. | LOOP   statement_group  [LEAVE] [ITERATE] statement_group  ENDLOOP 
  9840.  
  9841. | WHILE expression { ';' } DO   statement_group  [LEAVE] [ITERATE] 
  9842. statement_group  ENDWHILE 
  9843.  
  9844.  
  9845. ΓòÉΓòÉΓòÉ 8.2.20. parse_statement ΓòÉΓòÉΓòÉ
  9846.  
  9847. parse_statement ::=  PARSE ARG  {string | +number | -number |number | 
  9848. identifier } 
  9849.  
  9850. | PARSE VALUE expression   WITH {string | +number | -number |number | 
  9851. identifier } 
  9852.  
  9853.  
  9854. ΓòÉΓòÉΓòÉ 8.2.21. expression ΓòÉΓòÉΓòÉ
  9855.  
  9856. expression ::=  simple_expression [relation simple_expression] 
  9857.  
  9858.  
  9859. ΓòÉΓòÉΓòÉ 8.2.22. simple_expression ΓòÉΓòÉΓòÉ
  9860.  
  9861. simple_expression ::=  term  {operator  term} 
  9862.  
  9863.  
  9864. ΓòÉΓòÉΓòÉ 8.2.23. term ΓòÉΓòÉΓòÉ
  9865.  
  9866. term ::=  numeric_term 
  9867.  
  9868. | string 
  9869.  
  9870. | unary_operator term 
  9871.  
  9872. | '(' expression ')' 
  9873.  
  9874.  
  9875. ΓòÉΓòÉΓòÉ 8.2.24. arithmetic_expression ΓòÉΓòÉΓòÉ
  9876.  
  9877. arithmetic_expression ::=  arithmetic_term {arithmetic_operator 
  9878. arithmetic_term} 
  9879.  
  9880.  
  9881. ΓòÉΓòÉΓòÉ 8.2.25. arithmetic_term ΓòÉΓòÉΓòÉ
  9882.  
  9883. arithmetic_term ::=  '('arithmetic_expression')' 
  9884.  
  9885. | number 
  9886.  
  9887. | hex_number 
  9888.  
  9889. | octal_number 
  9890.  
  9891. | [numeric_unary_operator] arithmetic_term 
  9892.  
  9893.  
  9894. ΓòÉΓòÉΓòÉ 8.2.26. numeric_expression ΓòÉΓòÉΓòÉ
  9895.  
  9896. numeric_expression ::=  numeric_term {numeric_operator  numeric_term} 
  9897.  
  9898.  
  9899. ΓòÉΓòÉΓòÉ 8.2.27. numeric_term ΓòÉΓòÉΓòÉ
  9900.  
  9901. numeric_term ::=  number 
  9902.  
  9903. | designator 
  9904.  
  9905. | '('numeric_expression')' 
  9906.  
  9907. | procedure_call 
  9908.  
  9909. | numeric_unary_operator numeric_term 
  9910.  
  9911.  
  9912. ΓòÉΓòÉΓòÉ 8.2.28. string_expression ΓòÉΓòÉΓòÉ
  9913.  
  9914. string_expression ::=  string 
  9915.  
  9916. | designator 
  9917.  
  9918. | procedure_call 
  9919.  
  9920.  
  9921. ΓòÉΓòÉΓòÉ 8.2.29. constant_expression ΓòÉΓòÉΓòÉ
  9922.  
  9923. constant_expression ::=   simple_constant_expression  [ relation 
  9924. simple_constant_expression ] 
  9925.  
  9926.  
  9927. ΓòÉΓòÉΓòÉ 8.2.30. simple_constant_expression ΓòÉΓòÉΓòÉ
  9928.  
  9929. simple_constant_expression ::=   constant_term { operator  constant_term } 
  9930.  
  9931.  
  9932. ΓòÉΓòÉΓòÉ 8.2.31. constant_term ΓòÉΓòÉΓòÉ
  9933.  
  9934. constant_term ::=   number 
  9935.  
  9936. | designator 
  9937.  
  9938. | '('simple_constant_expression')' 
  9939.  
  9940. | unary_operator  constant_term 
  9941.  
  9942. | string 
  9943.  
  9944.  
  9945. ΓòÉΓòÉΓòÉ 8.2.32. relation ΓòÉΓòÉΓòÉ
  9946.  
  9947. relation ::=  '==' 
  9948.  
  9949. | '/==' 
  9950.  
  9951. | '=' 
  9952.  
  9953. | '<>' 
  9954.  
  9955. | '<=' 
  9956.  
  9957. | '>=' 
  9958.  
  9959. | '<' 
  9960.  
  9961. | '>' 
  9962.  
  9963.  
  9964. ΓòÉΓòÉΓòÉ 8.2.33. operator ΓòÉΓòÉΓòÉ
  9965.  
  9966. operator ::=  numeric_operator 
  9967.  
  9968. | AND 
  9969.  
  9970. | '&' 
  9971.  
  9972. | OR 
  9973.  
  9974. | '|' 
  9975.  
  9976. | '||' 
  9977.  
  9978. | spaces 
  9979.  
  9980.  
  9981. ΓòÉΓòÉΓòÉ 8.2.34. spaces ΓòÉΓòÉΓòÉ
  9982.  
  9983. spaces ::=  (' '|'\t')  spaces 
  9984.  
  9985.  
  9986. ΓòÉΓòÉΓòÉ 8.2.35. numeric_operator ΓòÉΓòÉΓòÉ
  9987.  
  9988. numeric_operator ::=  arithmetic_operator 
  9989.  
  9990. | '//' 
  9991.  
  9992. | '%' 
  9993.  
  9994.  
  9995. ΓòÉΓòÉΓòÉ 8.2.36. arithmetic_operator ΓòÉΓòÉΓòÉ
  9996.  
  9997. arithmetic_operator ::=  '+' 
  9998.  
  9999. | '-' 
  10000.  
  10001. | '*' 
  10002.  
  10003. | '/' 
  10004.  
  10005.  
  10006. ΓòÉΓòÉΓòÉ 8.2.37. unary_operator ΓòÉΓòÉΓòÉ
  10007.  
  10008. unary_operator ::=  NOT 
  10009.  
  10010. | numeric_unary_operator 
  10011.  
  10012.  
  10013. ΓòÉΓòÉΓòÉ 8.2.38. numeric_unary_operator ΓòÉΓòÉΓòÉ
  10014.  
  10015. numeric_unary_operator ::=  '+' 
  10016.  
  10017. | '-' 
  10018.  
  10019.  
  10020. ΓòÉΓòÉΓòÉ 8.2.39. procedure_call ΓòÉΓòÉΓòÉ
  10021.  
  10022. procedure_call ::=  user_defined_proc_call 
  10023.  
  10024. | built-in_proc_call 
  10025.  
  10026.  
  10027. ΓòÉΓòÉΓòÉ 8.2.40. user_defined_proc_call ΓòÉΓòÉΓòÉ
  10028.  
  10029. user_defined_proc_call ::=  identifier '(' [expression_list] ')' 
  10030.  
  10031.  
  10032. ΓòÉΓòÉΓòÉ 8.2.41. built-in_proc_call ΓòÉΓòÉΓòÉ
  10033.  
  10034. built-in_proc_call ::= See individual procedure. 
  10035.  
  10036.  
  10037. ΓòÉΓòÉΓòÉ 8.2.42. command ΓòÉΓòÉΓòÉ
  10038.  
  10039. command ::=  macro-defined_command 
  10040.  
  10041. | internal_command 
  10042.  
  10043. | dos_command 
  10044.  
  10045.  
  10046. ΓòÉΓòÉΓòÉ 8.2.43. internal_command ΓòÉΓòÉΓòÉ
  10047.  
  10048. internal_command ::=  NUMBER 
  10049.  
  10050. |  '+' [number] 
  10051.  
  10052. |  '-' [number] 
  10053.  
  10054. | 'C/' unquoted_string '/' unquoted_string '/' ['-'] ['+'] ['*'] ['m'] ['a'] 
  10055. ['c'] ['e'] ['r'] ['f'] ['g'] 
  10056.  
  10057. | ( 'E' | 'ED' | 'EDIT' )  {['/d'] ['/e'] ['/n'] ['='] unquoted_string} 
  10058. [quoted_string] 
  10059.  
  10060. | ( 'F' | 'FILE' ) ['/t'] [unquoted_string] 
  10061.  
  10062. | ( 'L/' | '/' ) unquoted_string '/' unquoted_string'/' ['-'] ['+'] ['m'] ['a'] 
  10063. ['c'] ['e'] ['r'] ['f'] ['g'] 
  10064.  
  10065. | ( 'MA' | 'MARGINS' ) [number_list3] 
  10066.  
  10067. | ( 'N' | 'NAME' ) [unquoted_string] 
  10068.  
  10069. | ( 'O' | 'OPEN' ) {[ options ] filespec } 
  10070.  
  10071. | 'OS2' string_expression 
  10072.  
  10073. | ( 'Q' | 'QUIT' ) 
  10074.  
  10075. | ( 'S' | 'SAVE' ) ['/t'] [unquoted_string] 
  10076.  
  10077. | 'TABS' number_list3 
  10078.  
  10079. | 'VER' 
  10080.  
  10081. | 'XCOM' internal_command 
  10082.  
  10083.  
  10084. ΓòÉΓòÉΓòÉ 8.2.44. macro-defined_command ΓòÉΓòÉΓòÉ
  10085.  
  10086. macro-defined_command ::=  'ADD' 
  10087.  
  10088. | 'ALL' '/' searchstring ['/'][c] 
  10089.  
  10090. | ( 'APPEND' | 'APP' ) [unquoted_string] 
  10091.  
  10092. | 'ASC' ( character ) 
  10093.  
  10094. | 'AUTOSAVE' [ ( number | 'on' | 'off') ] 
  10095.  
  10096. | 'AUTOSAVEDLG' 
  10097.  
  10098. | 'AUTOSHELL' ( ['0' | '1' ] ) 
  10099.  
  10100. | ( 'BOTTOM' | 'BOT' ) 
  10101.  
  10102. | 'BOX' ('1' | '2' | '3' | '4' | '5' | '6' | 'C' | 'P' | 'A' | 'E' | 'R' | 
  10103. '/'character) 
  10104.  
  10105. | 'BROWSE' ( ['ON' | 'OFF' | '?'] ) 
  10106.  
  10107. | 'CD'  [unquoted_string] 
  10108.  
  10109. | ( 'CHANGE' | 'C' )  '/' find_text '/' replace_text ['/' [-] [+] [*] [M] [A] 
  10110. [C] [E] [R] [F] [G] ] 
  10111.  
  10112. | 'CHANGEDLG' 
  10113.  
  10114. | 'CENTER' 
  10115.  
  10116. | 'CHR' number 
  10117.  
  10118. | 'CLOSE' 
  10119.  
  10120. | 'COMMANDLINE [ string_expression ] 
  10121.  
  10122. | 'CUT' 
  10123.  
  10124. | 'DIR' [ path ] 
  10125.  
  10126. | 'DOLINES' 
  10127.  
  10128. | 'DPATH' 
  10129.  
  10130. | 'DRAW' ('1' | '2' | '3' | '4' | '5' | '6' | 'B' | '/'character) 
  10131.  
  10132. | 'ECHO' ('on' | 'off') 
  10133.  
  10134. | ( 'ETPM' | 'ET' ) ['/e' unquoted_string] ['/u'] 
  10135.  
  10136.   [unquoted_string  [unquoted_string] ] 
  10137.  
  10138. | 'EXPAND' ['on' | 'off'] 
  10139.  
  10140. | 'FILL' character 
  10141.  
  10142. | 'FINDDLG' 
  10143.  
  10144. | ( 'FINDFILE' | 'FILEFIND' ) unquoted_string 
  10145.  
  10146. | 'GET' unquoted_string 
  10147.  
  10148. | 'HELP' 
  10149.  
  10150. | 'KEY' ( number ' ' character ) 
  10151.  
  10152. | 'LINK' ( filespec ) 
  10153.  
  10154. | 'LIST' [unquoted_string] 
  10155.  
  10156. | 'LOCK' ( [ filespec ] ) 
  10157.  
  10158. | 'LOOPKEY' ( number | 'all' ) 
  10159.  
  10160. | 'LOWERCASE' 
  10161.  
  10162. | 'MARGINSDLG' 
  10163.  
  10164. | 'MARKWORD' 
  10165.  
  10166. | 'MATCHTAB' ['on' | 'off'] 
  10167.  
  10168. | 'MATH' arithmetic_expression 
  10169.  
  10170. | 'MATHO' arithmetic_expression 
  10171.  
  10172. | 'MATHX' arithmetic_expression 
  10173.  
  10174. | 'MESSAGEBOX' 
  10175.  
  10176. | 'MULT' 
  10177.  
  10178. | 'OPENDLG' 
  10179.  
  10180. | 'PASTE' 
  10181.  
  10182. | 'PATH' 
  10183.  
  10184. | 'PRINT' [ printer_name ] 
  10185.  
  10186. | 'PROCESSBREAK' 
  10187.  
  10188. | 'PROOF' 
  10189.  
  10190. | 'PROOFWORD' 
  10191.  
  10192. | 'PUT' [unquoted_string] 
  10193.  
  10194. | 'QCONTROL' idnum 
  10195.  
  10196. | ( 'QDATE' | 'QD' ) 
  10197.  
  10198. | ( 'QL' | 'QLINK' | 'QLINKED' ) 
  10199.  
  10200. | ( 'QUIETSHELL' | 'QS' ) 
  10201.  
  10202. | ( 'QTIME' | 'QT' ) 
  10203.  
  10204. | 'RC' command 
  10205.  
  10206. | 'RELINK'  [ filename ] 
  10207.  
  10208. | 'SET' 
  10209.  
  10210. | 'SETSCROLLS' 
  10211.  
  10212. | ( 'SORT' | 'SORTDLL' )  [ 'R' ] [ 'C' ] 
  10213.  
  10214. | 'STAY' ( 'ON' | 'OFF' ) 
  10215.  
  10216. | 'STDFILE_READ' 
  10217.  
  10218. | 'STDFILE_WRITE' 
  10219.  
  10220. | 'TABS' { numeric_expression } 
  10221.  
  10222. | 'TOGGLECONTROL' numeric_expression [, '0' | '1' ] 
  10223.  
  10224. | 'TOGGLEFONT' 
  10225.  
  10226. | 'TOP' 
  10227.  
  10228. | 'UNLINK' [ filespec ] 
  10229.  
  10230. | 'UNLOCK' filespec 
  10231.  
  10232. | 'UPPERCASE' 
  10233.  
  10234. | 'VOL' 
  10235.  
  10236.  
  10237. ΓòÉΓòÉΓòÉ 8.2.45. dos_command ΓòÉΓòÉΓòÉ
  10238.  
  10239. dos_command ::=  Any command recognized and interpreted by the current 
  10240. operating system, whether that is DOS or OS/2. 
  10241.  
  10242.  
  10243. ΓòÉΓòÉΓòÉ 8.2.46. expression_list ΓòÉΓòÉΓòÉ
  10244.  
  10245. expression_list ::=  expression { {';'} [','] {';'} expression } 
  10246.  
  10247.  
  10248. ΓòÉΓòÉΓòÉ 8.2.47. identifier ΓòÉΓòÉΓòÉ
  10249.  
  10250. identifier ::=  letter {letter |  digit | '_' } 
  10251.  
  10252.  
  10253. ΓòÉΓòÉΓòÉ 8.2.48. identifier_list ΓòÉΓòÉΓòÉ
  10254.  
  10255. identifier_list ::=  identifier [spaces  identifier [spaces  identifier [spaces 
  10256. identifier . . . ] ] ] 
  10257.  
  10258.  
  10259. ΓòÉΓòÉΓòÉ 8.2.49. unquoted_string ΓòÉΓòÉΓòÉ
  10260.  
  10261. unquoted_string ::=  {character} 
  10262.  
  10263.  
  10264. ΓòÉΓòÉΓòÉ 8.2.50. string ΓòÉΓòÉΓòÉ
  10265.  
  10266. string ::=  " ' " {character} " ' " 
  10267.  
  10268. | ' " ' {character} ' " ' 
  10269.  
  10270. | esc_code 
  10271.  
  10272.  
  10273. ΓòÉΓòÉΓòÉ 8.2.51. letter ΓòÉΓòÉΓòÉ
  10274.  
  10275. letter ::=  'a' .. 'z' | 'A' .. 'Z' 
  10276.  
  10277.  
  10278. ΓòÉΓòÉΓòÉ 8.2.52. character ΓòÉΓòÉΓòÉ
  10279.  
  10280. character ::=  any character whose ASCII value is between 0 and 255 
  10281.  
  10282.  
  10283. ΓòÉΓòÉΓòÉ 8.2.53. printable_char ΓòÉΓòÉΓòÉ
  10284.  
  10285. printable_char ::=  any character whose ASCII value is between 0 and 255 
  10286.  
  10287.  
  10288. ΓòÉΓòÉΓòÉ 8.2.54. esc_code ΓòÉΓòÉΓòÉ
  10289.  
  10290. esc_code ::=  '\' ('n' | 't' | 'b' | 'r' | 'f') 
  10291.  
  10292. | '\'  digit [digit [digit] ] 
  10293.  
  10294. | '\'x  hex_digit [hex_digit] 
  10295.  
  10296.  
  10297. ΓòÉΓòÉΓòÉ 8.2.55. hex_number ΓòÉΓòÉΓòÉ
  10298.  
  10299. hex_number ::=  'x'hex_digit {hex_digit} 
  10300.  
  10301.  
  10302. ΓòÉΓòÉΓòÉ 8.2.56. octal_number ΓòÉΓòÉΓòÉ
  10303.  
  10304. octal_number ::=  'o'octal_digit {octal_digit} 
  10305.  
  10306.  
  10307. ΓòÉΓòÉΓòÉ 8.2.57. octal_digit ΓòÉΓòÉΓòÉ
  10308.  
  10309. octal_digit ::=  '0'..'7' 
  10310.  
  10311.  
  10312. ΓòÉΓòÉΓòÉ 8.2.58. hex_digit ΓòÉΓòÉΓòÉ
  10313.  
  10314. hexdigit ::=  (number | 'a' .. 'f' | 'A' .. 'F' ) 
  10315.  
  10316.  
  10317. ΓòÉΓòÉΓòÉ 8.2.59. number ΓòÉΓòÉΓòÉ
  10318.  
  10319. number ::=  digit{digit} 
  10320.  
  10321.  
  10322. ΓòÉΓòÉΓòÉ 8.2.60. digit ΓòÉΓòÉΓòÉ
  10323.  
  10324. digit ::=  '0' .. '9' 
  10325.  
  10326.  
  10327. ΓòÉΓòÉΓòÉ 8.2.61. number_list2 ΓòÉΓòÉΓòÉ
  10328.  
  10329. number_list2 ::=  number  [spaces  number] 
  10330.  
  10331.  
  10332. ΓòÉΓòÉΓòÉ 8.2.62. number_list3 ΓòÉΓòÉΓòÉ
  10333.  
  10334. number_list3 ::=  number  [spaces  number  [ spaces  number] ] 
  10335.  
  10336.  
  10337. ΓòÉΓòÉΓòÉ 8.2.63. number_list4 ΓòÉΓòÉΓòÉ
  10338.  
  10339. number_list4 ::=  number  [spaces  number  [ spaces  number  [spaces  number] ] 
  10340.  
  10341.  
  10342. ΓòÉΓòÉΓòÉ 9. Summary of Keywords, Procedures, Variables, and Keys ΓòÉΓòÉΓòÉ
  10343.  
  10344. Summary of keywords, procedures, variables and keys. 
  10345.  
  10346.  
  10347. ΓòÉΓòÉΓòÉ 9.1. Built-in Statement and Procedure Summary ΓòÉΓòÉΓòÉ
  10348.  
  10349. In this section all of E's internal procedure and statements are listed 
  10350. followed by a brief description.  See Built-in Statements and Procedures for 
  10351. more complete descriptions and parameters.  Procedures are followed by 
  10352. parentheses and can return values. Statements have no parentheses, return 
  10353. nothing, and generally perform some operation on the screen. Both statements 
  10354. and procedures can be followed by arguments.  Procedure arguments must appear 
  10355. within the parentheses. 
  10356.  
  10357. ABBREV() 
  10358.                     returns 1 if one string is an abbreviation of another 
  10359. ACTIVATEFILE 
  10360.                     makes a file the current file 
  10361. ADDRESS() 
  10362.                     returns the address of a variable 
  10363. ADJUSTBLOCK 
  10364.                     moves a marked area by overlaying 
  10365. ADJUST_BLOCK 
  10366.                     same as ADJUSTBLOCK 
  10367. ADJUSTMARK 
  10368.                     same as ADJUSTBLOCK for any marked type 
  10369. ADJUST_MARK 
  10370.                     same as ADJUSTMARK 
  10371. ARG() 
  10372.                     returns an argument 
  10373. ASC() 
  10374.                     determins an ASCII value 
  10375. ATOI() 
  10376.                     converts a string to integer 
  10377. ATOL() 
  10378.                     converts a string to a long integer 
  10379. ATTRIBUTE_ACTION 
  10380.                     does an attribute action 
  10381. BACKTAB 
  10382.                     moves cursor to previous tab 
  10383. BACKTABWORD 
  10384.                     moves cursor to beginning of last word 
  10385. BACKTAB_WORD 
  10386.                     same as BACKTABWORD 
  10387. BEEP() 
  10388.                     emits a noise 
  10389. BEGINLINE 
  10390.                     moves cursor to beginning of line 
  10391. BEGIN_LINE 
  10392.                     same as BEGINLINE 
  10393. BOT 
  10394.                     goes to the bottom of the file 
  10395. BOTTOM 
  10396.                     same as BOT 
  10397. BEGINLINE 
  10398.                     moves cursor to beginning of the line 
  10399. BEGIN_LINE 
  10400.                     same as BEGIN_LINE 
  10401. BINSEARCH() 
  10402.                     perform a binary search in a file 
  10403. BROWSE() 
  10404.                     turns browse mode on/off 
  10405. BUFFER() 
  10406.                     allows shared buffers 
  10407. BUILDMENUITEM 
  10408.                     builds an action bar menu item 
  10409. BUILDSUBMENU 
  10410.                     builds an action bar sub menu item 
  10411. CALL 
  10412.                     executes a procedure 
  10413. CENTER 
  10414.                     centers a string in a given length field 
  10415. CENTRE 
  10416.                     centers a string in a given length field 
  10417. CHR() 
  10418.                     finds the character from an ASCII value 
  10419. COMPARE 
  10420.                     compares two strings; returns the character position of the 
  10421.                     first difference 
  10422. COPIES 
  10423.                     returns n copies of the given string 
  10424. COPYMARK 
  10425.                     copies marked to text to the cursor pos. 
  10426. COPY_MARK 
  10427.                     same as COPYMARK 
  10428. COUNT() 
  10429.                     returns the number of occurrances of one string in another 
  10430. C2X() 
  10431.                     returns the printable hex representation of a binary string 
  10432. DELETE 
  10433.                     deletes the line the cursor is on 
  10434. DELETECHAR 
  10435.                     deletes the character under the cursor 
  10436. DELETE_CHAR 
  10437.                     same as DELETECHAR 
  10438. DELETELINE 
  10439.                     deletes a line of text 
  10440. DELETEMARK 
  10441.                     removes marked text 
  10442. DELETE_MARK 
  10443.                     same as DELETEMARK 
  10444. DELETEMENU 
  10445.                     removes an action bar menu item or subitem 
  10446. DELSTR 
  10447.                     deletes a substring of a string 
  10448. DELWORD 
  10449.                     deletes a phrase from a string 
  10450. DIRECTORY( [path]) 
  10451.                     returns current directory; if path is given, changes 
  10452.                     current directory first 
  10453. DISPLAY 
  10454.                     allows screen updating etc. to be toggled 
  10455. DO 
  10456.                     start of an iteration routine 
  10457. DO_ARRAY 
  10458.                     handles arrays in E 
  10459. DO_OVERLAYWINDOWS 
  10460.                     is undisclosed 
  10461. DOWN 
  10462.                     moves the cursor down a line 
  10463. DYNAFREE() 
  10464.                     releases a dynalink library 
  10465. DYNALINK() 
  10466.                     allows PM calls thru C code 
  10467. DYNALINKC() 
  10468.                     same as DYNALINK but in C format 
  10469. DYNALINK32() 
  10470.                     same as DYNALINKC but for calling 32-bit code 
  10471. ECHO() 
  10472.                     performs a command execution trace 
  10473. ENDLINE 
  10474.                     moves the cursor to the end of line 
  10475. END_LINE 
  10476.                     same as ENDLINE 
  10477. ERASEENDLINE 
  10478.                     erases text to the end of line 
  10479. ERASE_END_LINE 
  10480.                     same as ERASEENDLINE 
  10481. EXECUTE 
  10482.                     executes the command dialog box 
  10483. EXECUTEKEY 
  10484.                     executes the key specified 
  10485. EXIT 
  10486.                     exits from the current macro 
  10487. FILECOMPARE 
  10488.                     compares two files in the ring 
  10489. FILESINRING 
  10490.                     returns the number of files in the ring 
  10491. FILESIZE 
  10492.                     returns the sum of the lengths of all lines in the file 
  10493. FILLMARK 
  10494.                     fills the marked area 
  10495. FILL_MARK 
  10496.                     same as FILLMARK 
  10497. FINDFILE 
  10498.                     finds a file path 
  10499. FOR 
  10500.                     begining of an iterative loop 
  10501. GETFILEID 
  10502.                     gets a file id number 
  10503. GETKEYSTATE() 
  10504.                     gets the shift state of keys 
  10505. GET_KEY_STATE 
  10506.                     same as GETKEYSTATE 
  10507. GETLINE 
  10508.                     returns the current text line 
  10509. GETMARK 
  10510.                     gets the type of mark 
  10511. GETPMINFO() 
  10512.                     returns PM information 
  10513. GETSEARCH 
  10514.                     saves the last search string 
  10515. GET_SEARCH 
  10516.                     same as SETSEARCH 
  10517. HEX() 
  10518.                     returns the hex value of a char. 
  10519. IF - THEN - ELSE 
  10520.                     the beginning of a conditional stmt. 
  10521. INCLUDE 
  10522.                     includes another E file 
  10523. INSERT 
  10524.                     inserts a blank line 
  10525. INSERT_ATTRIBUTE 
  10526.                     inserts an attribute 
  10527. INSERTLINE 
  10528.                     inserts a line at a specified location 
  10529. INSERTSTATE() 
  10530.                     returns insert/replace mode 
  10531. INSERT_STATE() 
  10532.                     same as INSERTSTATE() 
  10533. INSERTSTR 
  10534.                     inserts a string into another string 
  10535. INSERTTOGGLE 
  10536.                     toggles the insert/replace modes 
  10537. INSERT_TOGGLE 
  10538.                     same as INSERTTOGGLE 
  10539. ISADEFC() 
  10540.                     tells if a given command has been defined 
  10541. ISADEFPROC() 
  10542.                     tells if a given procedure has been defined 
  10543. ISADIRTYLINE() 
  10544.                     tells if the current line has been modified and not yet 
  10545.                     "checked in" 
  10546. ITERATE 
  10547.                     part of a repeat loop 
  10548. ITOA() 
  10549.                     converts a integer to string 
  10550. JOIN 
  10551.                     joins two lines 
  10552. KEY 
  10553.                     executes the key specified 
  10554. KEYIN 
  10555.                     enters text into the file 
  10556. KEYS 
  10557.                     actives a keyset name 
  10558. LASTERROR() 
  10559.                     returns the last error code 
  10560. LAST_ERROR() 
  10561.                     same as LASTERROR 
  10562. LASTKEY() 
  10563.                     returns the last key hit 
  10564. LASTPOS() 
  10565.                     finds text in the file 
  10566. LEAVE 
  10567.                     leaves a repetitive loop 
  10568. LEFT 
  10569.                     moves the cursor one column left 
  10570. LEFTSTR() 
  10571.                     returns the leftmost n characters of a string 
  10572. LENGTH() 
  10573.                     retuns the length of a string 
  10574. LEXAM() 
  10575.                     access the dictionary functions 
  10576. LINK 
  10577.                     links an .EX module into EPM 
  10578. LINKED() 
  10579.                     returns if a module is linked 
  10580. LONGESTLINE() 
  10581.                     returns the length of the longest line in the file 
  10582. LOOP 
  10583.                     a iterative looping command 
  10584. LOWCASE() 
  10585.                     lowers the case on a string 
  10586. LTOA() 
  10587.                     converts a string to a long integer 
  10588. MACHINE() 
  10589.                     returns the type of Operating System 
  10590. MARKBLOCK 
  10591.                     issues a block-type mark 
  10592. MARK_BLOCK 
  10593.                     same as a MARKBLOCK 
  10594. MARKCHAR 
  10595.                     issues a character-type mark 
  10596. MARK_CHAR 
  10597.                     same as a MARKCHAR 
  10598. MARKLINE 
  10599.                     issues a line-type mark 
  10600. MARK_LINE 
  10601.                     same as a MARKLINE 
  10602. MARKSIZE() 
  10603.                     returns the number of marked characters 
  10604. MARKTYPE() 
  10605.                     returns the marktype set 
  10606. MEMCPYX() 
  10607.                     copies information from one memory location to another 
  10608. MOUSE_SETPOINTER 
  10609.                     sets the mouse pointer 
  10610. MOVEMARK 
  10611.                     moves marked text to the cursor pos. 
  10612. MOVE_MARK 
  10613.                     same as MOVEMARK 
  10614. NEXTFILE 
  10615.                     actives the next file in the ring 
  10616. NEXT_FILE 
  10617.                     same as NEXTFILE 
  10618. OFFSET() 
  10619.                     returns the offset in binary 
  10620. OFS() 
  10621.                     returns the offset in a string format 
  10622. OVERLAY 
  10623.                     allows the overlay of strings 
  10624. OVERLAYBLOCK 
  10625.                     copies marked text without inserting 
  10626. OVERLAY_BLOCK 
  10627.                     same as OVERLAY_BLOCK 
  10628. PAGEDOWN 
  10629.                     moves the cursor one page down 
  10630. PAGE_DOWN 
  10631.                     same as PAGEDOWN 
  10632. PAGEUP 
  10633.                     moves the cursor one page up 
  10634. PAGE_UP 
  10635.                     same as PAGEUP 
  10636. PARSE 
  10637.                     parses a string 
  10638. PEEK() 
  10639.                     looks up a memory location value 
  10640. PEEK32() 
  10641.                     looks up a memory location value 
  10642. PEEKZ() 
  10643.                     returns an ASCIIZ string from memory 
  10644. PEEKZ32() 
  10645.                     returns an ASCIIZ string from memory 
  10646. POKE() 
  10647.                     inserts a value into a memory location 
  10648. POKE32() 
  10649.                     inserts a value into a memory location 
  10650. PREVFILE 
  10651.                     moves to the previous file 
  10652. QUERY_ATTRIBUTE 
  10653.                     determines the attribute type set 
  10654. QUERYMENUSTRING 
  10655.                     get the command associated with an menu option 
  10656. QUERYPROFILE() 
  10657.                     gets a string from OS2.INI 
  10658. QUIETSHELL 
  10659.                     allows an OS/2 command to be executed 
  10660. REFLOW 
  10661.                     reformats text 
  10662. REFRESH 
  10663.                     updates the screen 
  10664. REGEXPCOMP 
  10665.                     pre-compiles an extended GREP search string into an EGREP 
  10666.                     program. 
  10667. REGEXPEXEC 
  10668.                     does an EGREP search of a string, using a pre-compiled 
  10669.                     program. 
  10670. RELINK 
  10671.                     compiles and links .E modules 
  10672. REPEATFIND 
  10673.                     finds the next occurrence of a search 
  10674. REPEAT_FIND 
  10675.                     same as REPEATFIND 
  10676. REPLACELINE 
  10677.                     replaces a line with new text 
  10678. RETURN 
  10679.                     returns an expression to the caller 
  10680. REVERSE() 
  10681.                     returns the reverse of a string 
  10682. RIGHT 
  10683.                     moves the cursor one column right 
  10684. RIGHTSTR() 
  10685.                     returns the rightmost n characters of a string 
  10686. RUBOUT 
  10687.                     deletes the character to the left 
  10688. SAYAT 
  10689.                     writes text at a location on the screen 
  10690. SAY_AT 
  10691.                     same as SAYAT 
  10692. SAYERROR 
  10693.                     displays an error code or a message 
  10694. SAYERROR() 
  10695.                     displays a message 
  10696. SAYERRORTEXT() 
  10697.                     returns the error message associated with a given error 
  10698.                     code 
  10699. SCREENHEIGHT() 
  10700.                     returns the screen height 
  10701. SCREENWIDTH() 
  10702.                     returns the screen width 
  10703. SEG() 
  10704.                     returns the segment address as a string 
  10705. SELECTOR() 
  10706.                     returns the segment address in binary 
  10707. SETPROFILE() 
  10708.                     sets a string in OS2.INI 
  10709. SETSEARCH 
  10710.                     sets the search command string 
  10711. SET_SEARCH 
  10712.                     same as SETSEARCH 
  10713. SHIFTLEFT 
  10714.                     shifts marked text one position left 
  10715. SHIFT_LEFT 
  10716.                     same as SHIFTLEFT 
  10717. SHIFTRIGHT 
  10718.                     shifts marked text one position right 
  10719. SHIFT_RIGHT 
  10720.                     same as SHIFTRIGHT 
  10721. SHOWMENU 
  10722.                     displays a newly built action bar menu 
  10723. SPLIT 
  10724.                     splits a line of text into two lines 
  10725. STOP 
  10726.                     stops execution of a macro 
  10727. STOPONRC 
  10728.                     stops only if RC is non-zero 
  10729. STOP_ON_RC 
  10730.                     same as STOPONRC 
  10731. STRIP() 
  10732.                     strips away extra spaces 
  10733. SUBSTR() 
  10734.                     returns a sub-string from within a string 
  10735. SUBWORD 
  10736.                     returns a phrase from a string 
  10737. TAB 
  10738.                     moves to the next tab stop 
  10739. TABGLYPH() 
  10740.                     specifies whether the tab glyph should be displayed 
  10741. TABWORD 
  10742.                     moves to the beginning of the next word 
  10743. TAB_WORD 
  10744.                     same as TABWORD 
  10745. TEXTLINE() 
  10746.                     gets the contents of the indicated line 
  10747. TOP 
  10748.                     moves to the top of the file 
  10749. TRANSLATE() 
  10750.                     translates a string according to a given translate table 
  10751. TRYINCLUDE 
  10752.                     attempts to include a .E file 
  10753. UNDO 
  10754.                     undoes changes on a line 
  10755. UNLINK 
  10756.                     removes a .EX module from EPM 
  10757. UNMARK 
  10758.                     unmarks text 
  10759. UP 
  10760.                     moves the cursor up one key 
  10761. UPCASE() 
  10762.                     converts a string to upper case 
  10763. VALIDATEFILEID() 
  10764.                     verifies that a fileid is valid 
  10765. VER() 
  10766.                     returns the version number 
  10767. VERIFY() 
  10768.                     makes sure a string is valid in a set 
  10769. WHEREDEFC() 
  10770.                     tells in which .ex file a defc is defined 
  10771. WINMESSAGEBOX() 
  10772.                     does a Dynalink call to the PM WinMessageBox function 
  10773. WORD() 
  10774.                     returns the nthe word of a string 
  10775. WORDINDEX() 
  10776.                     returns the character position of a word in a string 
  10777. WORDLENGTH() 
  10778.                     returns the length of a word in a string 
  10779. WORDPOS() 
  10780.                     returns the position of a phrase in a string 
  10781. WORDS() 
  10782.                     returns the number of words in a string 
  10783. WHILE 
  10784.                     a conditional repetitive statement 
  10785.  
  10786.  
  10787. ΓòÉΓòÉΓòÉ 9.2. Command Summary ΓòÉΓòÉΓòÉ
  10788.  
  10789. These commands can be issued from within the command line dialog box or from 
  10790. within a program. When used within the E language they must be surrounded by 
  10791. quotation marks. For example: 
  10792.  
  10793.   `CD'
  10794. or
  10795.   `CD C:\EPM\FILES'
  10796. or
  10797.   `CD` mypath
  10798.  
  10799. In the first example the macro command CD will be executed as if the user typed 
  10800. it in on the command line dialog. In the second example CD was issued with an 
  10801. argument. And in the third example, the argument was a variable name. For more 
  10802. information on the commands and their syntax see The EPM User's Guide and 
  10803. Commands Omitted From the User's Guide in this manual. 
  10804.  
  10805. #### 
  10806.                     goes to line number #### 
  10807. + [####] 
  10808.                     moves cursor forward #### lines. 
  10809. -  [####] 
  10810.                     moves cursor backward #### lines. 
  10811. /find_string/[options] 
  10812.                     same as 'L' command 
  10813. ACTIVATEFILEID 
  10814.                     activates the file specified 
  10815. ADD 
  10816.                     adds a marked block of numbers 
  10817. ALL 
  10818.                     if included, it finds all occurrences of a given string in 
  10819.                     the current file 
  10820. APP 
  10821.                     appends marked text to a file 
  10822. APPEND 
  10823.                     same as APP 
  10824. ASC 
  10825.                     determines the ASCII value of a char. 
  10826. AUTOSAVE 
  10827.                     sets the AUTOSAVE field value 
  10828. AUTOSAVEDLG 
  10829.                     brings up the AUTOSAVE dialog box 
  10830. AUTOSHELL 
  10831.                     turns AUTOSHELLing on or off 
  10832. BOT 
  10833.                     goes to the bottom of the file 
  10834. BOTTOM 
  10835.                     same as BOT 
  10836. BOX 
  10837.                     draws a box of specified style around block mark. (See 
  10838.                     BOX.E) 
  10839. BROWSE 
  10840.                     make the file read-only or read-write 
  10841.                     changes text strings 
  10842. CD 
  10843.                     changes the default drive/path 
  10844. CENTER 
  10845.                     centers marked text 
  10846. CHANGE 
  10847.                     same as C 
  10848. CHANGEDLG 
  10849.                     brings up the change dialog box 
  10850. CHR 
  10851.                     displays the character associated 
  10852. CLEARSHARBUFF 
  10853.                     clears the shared buffer 
  10854. CLOSE 
  10855.                     closes files in the ring 
  10856. COMMANDLINE 
  10857.                     brings up the command line dialog box 
  10858. COPY2DMBUFF 
  10859.                     copies marked area to "Delete Mark" buffer 
  10860. COPY2SHARBUFF 
  10861.                     copies marked area to shared buffer 
  10862. CURSOROFF 
  10863.                     turns the cursor off 
  10864. CUT 
  10865.                     moves marked text to the shared buffer 
  10866. DIR 
  10867.                     lists the directory in a temp. file 
  10868. DOLINES 
  10869.                     executes the current line or marked lines 
  10870. DPATH 
  10871.                     shows the DPATH setting 
  10872. DRAW 
  10873.                     enters draw mode 
  10874. DUPMARK 
  10875.                     executes a mark action specified 
  10876. ECHO 
  10877.                     turns command trace on 
  10878.                     edit a file 
  10879. ED 
  10880.                     same as E 
  10881. EDIT 
  10882.                     same as E and ED 
  10883. ET 
  10884.                     invoke the compiler 
  10885. ETPM 
  10886.                     same as ET 
  10887. EXPAND 
  10888.                     turns syntax expansion on/off 
  10889.                     saves and quit the current file 
  10890. FILE 
  10891.                     same as F 
  10892. FILEFIND 
  10893.                     attempts to find a file 
  10894. FILL 
  10895.                     fills the marked block with a character 
  10896. FINDDLG 
  10897.                     invokes the find dialog box 
  10898. FINDFILE 
  10899.                     same as FILEFIND 
  10900. GET 
  10901.                     gets the file into the current file 
  10902. GETDMBUFF 
  10903.                     gets text from the delete mark buffer 
  10904. GETSHARBUFF 
  10905.                     gets text from the shared buffer 
  10906. HELP 
  10907.                     brings up EPM help 
  10908. KEY 
  10909.                     allows the repeat of a key or macro 
  10910.                     searches for text 
  10911. LINK 
  10912.                     links an .EX module into EPM 
  10913. LIST 
  10914.                     same as FILEFIND and FINDFILE 
  10915. LOADDEFAULTMENU 
  10916.                     loads the default action bar menu 
  10917. LOCK 
  10918.                     prevents other users from updating a file 
  10919. LOOPKEY 
  10920.                     repeats a key in a vertical direction 
  10921. LOWERCASE 
  10922.                     converts marked text into lowercase 
  10923. MA 
  10924.                     sets/displays the margin settings 
  10925. MARGINS 
  10926.                     same as MA 
  10927. MARGINSDLG 
  10928.                     brings up the margins dialog box 
  10929. MARKWORD 
  10930.                     marks the word under the mouse pointer 
  10931. MATCHTAB 
  10932.                     sets tab stops to the words in the line above 
  10933. MATH 
  10934.                     computes an expression in base 10 
  10935. MATHO 
  10936.                     computes an expression in base 8 
  10937. MATHX 
  10938.                     computes an expression in base 16 
  10939. MESSAGEBOX 
  10940.                     brings up the message review dialog box 
  10941. MH_BEGIN_MARK 
  10942.                     mouse handler begin mark 
  10943. MH_CANCEL_MARK 
  10944.                     mouse hander cancel mark 
  10945. MH_END_MARK 
  10946.                     mouse handler end mark 
  10947. MH_GOTOPOSITION 
  10948.                     mouse handler go to position 
  10949. MULT 
  10950.                     multiplies the numbers in a marked area 
  10951.                     renames the current file 
  10952. NAME 
  10953.                     same as N 
  10954.                     loads a file into a new window 
  10955. OPEN 
  10956.                     same as O 
  10957. OPENDLG 
  10958.                     brings up the OPEN dialog box 
  10959. OS2 
  10960.                     executes an OS/2 command 
  10961. PASTE 
  10962.                     copies text from the shared buffer 
  10963. PATH 
  10964.                     displays the path settings 
  10965. PRINT 
  10966.                     prints a marked area or whole file 
  10967. PROCESSBREAK 
  10968.                     stops a macro in progress 
  10969. PROOF 
  10970.                     initiates spell checking 
  10971. PROOFWORD 
  10972.                     spell checks the current word 
  10973. PUT 
  10974.                     writes the marked text to a file 
  10975. QCONTROL 
  10976.                     determines the status of windows 
  10977. QD 
  10978.                     returns the current date 
  10979. QDATE 
  10980.                     same as QD 
  10981. QL 
  10982.                     determines if a module is linked 
  10983. QLINK 
  10984.                     same as QL 
  10985. QLINKED 
  10986.                     same as QL and QLINK 
  10987. QS 
  10988.                     executes an OS/2 command w/ no results 
  10989. QUIETSHELL 
  10990.                     same as QS 
  10991. QT 
  10992.                     displays the time 
  10993. QTIME 
  10994.                     same as QT 
  10995.                     quits the current file 
  10996. QUIT 
  10997.                     same as Q 
  10998. RC 
  10999.                     returns the error code of a command 
  11000. RELINK 
  11001.                     compiles and links and E module 
  11002.                     saves a file to disk 
  11003. SAVE 
  11004.                     same as S 
  11005. SET 
  11006.                     displays all SET parameters in a temp. file 
  11007. SETSCROLLS 
  11008.                     turns the scroll bars on/off 
  11009. SORT 
  11010.                     sorts marked text or the whole file 
  11011. SORTDLL 
  11012.                     same as SORT 
  11013. STAY 
  11014.                     sets whether to move on a find & replace 
  11015. STDFILE_READ 
  11016.                     reads in from standard input stream 
  11017. STDFILE_WRITE 
  11018.                     writes out the the standard output stream 
  11019. TABS 
  11020.                     sets the tabs stops 
  11021. TOGGLECONTROL 
  11022.                     toggles the window on/off 
  11023. TOGGLEFONT 
  11024.                     toggles between large/small fonts 
  11025. TOP 
  11026.                     goes to the top of the current file 
  11027. UNLINK 
  11028.                     removes an .EX module from EPM 
  11029. UNLOCK 
  11030.                     allows other users to update a file 
  11031. UPPERCASE 
  11032.                     makes text in a marked area uppercased 
  11033. VER 
  11034.                     displays the EPM version 
  11035. VOL 
  11036.                     displays the current drive's volume info 
  11037. XCOM 
  11038.                     executes a built in command 
  11039.  
  11040.  
  11041. ΓòÉΓòÉΓòÉ 9.3. E Language Keywords ΓòÉΓòÉΓòÉ
  11042.  
  11043. AND 
  11044.                 Boolean AND function.  That is, a logical AND like REXX, not a 
  11045.                 bit operator. 
  11046. ARG 
  11047.                 is used in parse constructs 
  11048. BASE 
  11049.                 is used in defkeys construct 
  11050. BY 
  11051.                 is used in loop constructs 
  11052. CLEAR 
  11053.                 is used in defkeys construct 
  11054. COMPILE 
  11055.                 conditional compilation instruction, followed by 
  11056.                 IF/ELSE/ELSEIF/ENDIF 
  11057. CONST 
  11058.                 defines constants that the E translator uses during translation 
  11059.                 of the E procs 
  11060. DEF 
  11061.                 defines a key or pseudo-key that belongs to the current keyset 
  11062. DEFC 
  11063.                 defines new commands 
  11064. DEFINIT 
  11065.                 allows initialization of variables for use by other E 
  11066.                 procedures 
  11067. DEFKEYS 
  11068.                 names a keyset 
  11069. DEFLOAD 
  11070.                 is executed whenever a new file is loaded 
  11071. DEFMAIN 
  11072.                 allows the user to take control of the command dialog box 
  11073.                 arguments of the editor 
  11074. DEFMODIFY 
  11075.                 is executed when .modify passes certain threshold values 
  11076. DEFPROC 
  11077.                 is used to define new procedures (functions) 
  11078. DEFSELECT 
  11079.                 is executed whenever you switch to a different file 
  11080. DO 
  11081.                 is used in loop constructs 
  11082. ELSE 
  11083.                 indicates action to take place when an IF statement proves 
  11084.                 false 
  11085. ELSEIF 
  11086.                 executes a secondary IF when an IF statement proves false 
  11087. END or ENDDO 
  11088.                 is used in loop constructs, to terminate a DO block (DO WHILE, 
  11089.                 DO (FOR), or DO FOREVER) 
  11090. ENDFOR 
  11091.                 is used in loop constructs 
  11092. ENDIF 
  11093.                 marks the end of an IF block 
  11094. ENDLOOP 
  11095.                 is used in loop constructs 
  11096. ENDWHILE 
  11097.                 is used in loop constructs 
  11098. FOR 
  11099.                 is used in loop constructs 
  11100. FOREVER 
  11101.                 is used in loop constructs 
  11102. IF 
  11103.                 changes the flow of statements depending upon a condition 
  11104. INCLUDE 
  11105.                 includes another file into the current file for compilation. 
  11106. ITERATE 
  11107.                 iterates a loop, while, or do 
  11108. LEAVE 
  11109.                 exits loop, while, or do 
  11110. LOOP 
  11111.                 is used in loop constructs 
  11112. NEW 
  11113.                 is used in defkeys construct 
  11114. NOT 
  11115.                 Boolean NOT function 
  11116. OR 
  11117.                 Boolean OR function 
  11118. OVERLAY 
  11119.                 is used in defkeys construct 
  11120. PARSE 
  11121.                 is used to extract information from a string 
  11122. RETURN 
  11123.                 returns from a defined procedure or command, with an 
  11124.                 expression. 
  11125. SAY 
  11126.                 writes a line to terminal when shelled to OS/2 
  11127. SAYS 
  11128.                 writes a line to terminal when shelled to OS/2, no CR-LF 
  11129. SET 
  11130.                 defines configuration options.  Only a few options are still 
  11131.                 set in this way:  cursors and insertstate. 
  11132. THEN 
  11133.                 indicates action to take place when an IF statement proves true 
  11134. TO 
  11135.                 is used in loop constructs 
  11136. TRYINCLUDE 
  11137.                 includes another file into the current file for compilation, 
  11138.                 similar to INCLUDE, but does not stop compilation if the file 
  11139.                 cannot be found. 
  11140. UNIVERSAL 
  11141.                 specifies that a variable is available to all procs, is not 
  11142.                 local to the current one. 
  11143. VALUE 
  11144.                 is used in Parse constructs 
  11145. VAR 
  11146.                 is used in DEFPROC definitions.  Specifies that the following 
  11147.                 variable is passed by reference.  If the procedure modifies the 
  11148.                 variable its value is also changed in the caller.  Otherwise 
  11149.                 the caller's value for the variable is not modifiable by the 
  11150.                 called procedure. 
  11151. WHILE 
  11152.                 is used in loop constructs 
  11153. WITH 
  11154.                 is used in Parse constructs 
  11155.  
  11156.  
  11157. ΓòÉΓòÉΓòÉ 9.4. Field Attributes ΓòÉΓòÉΓòÉ
  11158.  
  11159. Field attributes are variables that are unique to each file. They can be 
  11160. accessed by specifying the fileid and the attribute name separated by a period. 
  11161. If the fileid is omitted, the current file is assumed. Some are able to be 
  11162. assigned and all are able to be referenced. For example: 
  11163.  
  11164.         .line = 1
  11165.         sayerror "The current line is: "||.line
  11166.         tmpfileid.line = 1
  11167.  
  11168. The first is an assignment statement. The second is reference statement. In the 
  11169. third a fileid (in the form of the variable tmpfileid) is used. For a more 
  11170. complete description of field variables see Field Variables Listed. Valid field 
  11171. variables are: 
  11172.  
  11173. .AUTOSAVE 
  11174.                     number of changes before autosaving 
  11175. .AUTOSHELL 
  11176.                     allow checking externally for commands not recognized 
  11177.                     internally 
  11178. .COL 
  11179.                     the cursor column position 
  11180. .CURSORX 
  11181.                     the cursor x coordinate 
  11182. .CURSORY 
  11183.                     the cursor y coordinate 
  11184. .DRAGCOLOR 
  11185.                     the drag color 
  11186. .DRAGSTYLE 
  11187.                     the drag style 
  11188. .FILENAME 
  11189.                     the current file's filename 
  11190. .FONT 
  11191.                     the font id of the current file's font 
  11192. .FONTHEIGHT 
  11193.                     the font height 
  11194. .FONTWIDTH 
  11195.                     the font width 
  11196. .KEYSET 
  11197.                     the current active keyset 
  11198. .LAST 
  11199.                     the maximum file line number 
  11200. .LINE 
  11201.                     the cursor's line number 
  11202. .LINEG 
  11203.                     same as .LINE, but setting it doesn't cause scrolling 
  11204. .LOCKHANDLE 
  11205.                     determines if the file is LOCKed 
  11206. .MARGINS 
  11207.                     contains the margin settings 
  11208. .MARKCOLOR 
  11209.                     contains the mark color 
  11210. .MESSAGECOLOR 
  11211.                     contains the message color 
  11212. .MODIFY 
  11213.                     the number of modifications made 
  11214. .MOUSEX 
  11215.                     the mouse's x coordinate 
  11216. .MOUSEY 
  11217.                     the mouse's y coordinate 
  11218. .STATUSCOLOR 
  11219.                     the status bar color 
  11220. .TABS 
  11221.                     the tab settings 
  11222. .TEXTCOLOR 
  11223.                     the text color 
  11224. .USERSTRING 
  11225.                     a user definable variable 
  11226. .VISIBLE 
  11227.                     determines if the file is visible 
  11228. .WINDOWHEIGHT 
  11229.                     contains the window height 
  11230. .WINDOWWIDTH 
  11231.                     contains the window width 
  11232. .WINDOWX 
  11233.                     the window x coordinate 
  11234. .WINDOWY 
  11235.                     the window y coordinate 
  11236.  
  11237.  
  11238. ΓòÉΓòÉΓòÉ 9.5. E-Definable Keys ΓòÉΓòÉΓòÉ
  11239.  
  11240. The following keys may be defined using E.  In all cases, the prefix A_ means 
  11241. that the Alt key must be depressed at the same time as the key to get the 
  11242. desired function.  Similarly, the prefix C_ means the Ctrl key must be used, 
  11243. and S_ means the shift key must be used. For information on the format of 
  11244. defining these keys, refer to section Key Definitions (DEF and DEFKEYS) or E 
  11245. Language Syntax. 
  11246.  
  11247. A - Z 
  11248. A_A - A_Z 
  11249. A_EQUAL 
  11250. A_F1 - A_F12 
  11251. A_LEFTBRACKET 
  11252. A_MINUS 
  11253. A_RIGHTBRACKET 
  11254. A_TAB 
  11255. A_0 - A_9 
  11256. BACKSPACE 
  11257. C_A - C_Z 
  11258. C_BACKSLASH 
  11259. C_BACKSPACE 
  11260. C_DEL 
  11261. C_DOWN 
  11262. C_END 
  11263. C_ENTER 
  11264. C_F1 - C_F10 
  11265. C_HOME 
  11266. C_INS 
  11267. C_LEFT 
  11268. C_LEFTBRACKET 
  11269. C_MINUS 
  11270. C_PGDN 
  11271. C_PGUP 
  11272. C_PRTSC 
  11273. C_RIGHT 
  11274. C_RIGHTBRACKET 
  11275. C_TAB 
  11276. C_UP 
  11277. C_2, C_6 
  11278. DEL 
  11279. DOWN 
  11280. END 
  11281. ENTER 
  11282. ESC 
  11283. F1 - F10 
  11284. HOME 
  11285. INS 
  11286. LEFT 
  11287. PGDN 
  11288. PGUP 
  11289. RIGHT 
  11290. S_F1 - S_F10 
  11291. S_PAD5 
  11292. S_TAB 
  11293. TAB 
  11294. UP 
  11295. any printable character whose ASCII value is 0 to 255. 
  11296. The following name may be defined in the same manner as keys, but is used as a 
  11297. pseudo-key: 
  11298.  
  11299. ENTRY 
  11300. The following keys are available only on enhanced keyboards, which come with 
  11301. the PS/2 and AT models: 
  11302.  
  11303. A_ENTER 
  11304.  
  11305. A_F11, A_F12 
  11306.  
  11307. A_PADENTER 
  11308.  
  11309. C_F11, C_F12 
  11310.  
  11311. C_PADENTER 
  11312.  
  11313. F11, F12 
  11314.  
  11315. PADENTER 
  11316.  
  11317. S_F11, S_F12 
  11318.  
  11319.  
  11320. ΓòÉΓòÉΓòÉ 9.5.1. PM Keys ΓòÉΓòÉΓòÉ
  11321.  
  11322. The keys listed below are used be Presentation Manager to accomplish certain 
  11323. functions standard to all PM applications (set by CUA standards). To maintain 
  11324. consistency between PM applications, these keys cannot be redefined. 
  11325.  
  11326. Key            PM Function 
  11327.   F1 
  11328.                Help 
  11329.   F10 
  11330.                Goto action bar. 
  11331.   A_F7 
  11332.                Move a PM window. 
  11333.   A_F8 
  11334.                Size a PM window. 
  11335.   A_F9 
  11336.                Minimize a PM window. 
  11337.   A_F10 
  11338.                Maximize a PM window. 
  11339.   A_Esc 
  11340.                Switch application. 
  11341.   C_Esc 
  11342.                Goto Task List. 
  11343.  
  11344.  
  11345. ΓòÉΓòÉΓòÉ 10. General Structure of E-Macro Files ΓòÉΓòÉΓòÉ
  11346.  
  11347. ALL.E               Procedure for including the ALL command and the ctrl-Q key 
  11348.                     setup for paging between ALL occurrences.  This file is 
  11349.                     only included if the configuration constant WANT_ALL is 
  11350.                     TRUE. 
  11351.  
  11352. ASSIST.E            Procedure for including the bracket-matching code.  This 
  11353.                     file is only included if the configuration constant 
  11354.                     WANT_BRACKET_MATCHING is TRUE. 
  11355.  
  11356. BOOKMARK.E          Procedures for working with bookmarks, and for loading and 
  11357.                     saving EPM attributes as an Extended Attribute associated 
  11358.                     with the file.  This file is only included if the 
  11359.                     configuration constant WANT_BOOKMARKS is TRUE. 
  11360.  
  11361. BOX.E               Procedure for the BOX command. This is compiled separately 
  11362.                     into a BOX.EX file. The file is loaded when the user issues 
  11363.                     a BOX command. When the command finished, BOX is unlinked 
  11364.                     from EPM, thereby saving memory space. 
  11365.  
  11366. BUFF.E              Test procedures for the buffer() opcode. 
  11367.  
  11368. CALLREXX.E          Procedures for calling Rexx macros.  This file is only 
  11369.                     included if the configuration constant WANT_REXX is TRUE. 
  11370.  
  11371. CHAROPS.E           Procedures for block fill, copy, delete and mark, for 
  11372.                     character-marked text. 
  11373.  
  11374. CKEYS.E             Syntax aids for C files. 
  11375.  
  11376. CKEYSEL.E           A small file which selects the C keyset.  This is a 
  11377.                     separate file to allow easy omission of the 
  11378.                     syntax-expansion feature by erasing CKEYS*.E.  Only used 
  11379.                     for E3, not for EPM - as of version 4.12, this file is no 
  11380.                     longer needed.  The selection of the keyset is done in 
  11381.                     CKEYS.E where the keyset is defined. This is made possible 
  11382.                     by the new DEFLOAD feature.  Similarly, EKEYSEL.E and 
  11383.                     PKEYSEL.E are unnecessary. 
  11384.  
  11385. CLIPBRD.E           Contains procedures and commands that: 
  11386.  
  11387.    o allow a user to pass lines of text between edit windows 
  11388.    o allow text to be placed in the PM clipboard. 
  11389.  
  11390. COLORS.E            Defines default colors. 
  11391.  
  11392. DOSUTIL.E           Procedures interfacing to the operating system. 
  11393.  
  11394.                     Note:  No longer used under OS/2. 
  11395.  
  11396. DRAW.E              Includes the procedures for the DRAW command. This is 
  11397.                     compiled separately into a DRAW.EX file. The file is loaded 
  11398.                     when the user issues a DRAW command. The code is then 
  11399.                     unlinked when the DRAW command is finished. 
  11400.  
  11401. DRAWKEY.E           Includes the key definition for F6 to trigger the draw 
  11402.                     command. 
  11403.  
  11404. DYNATEST.E          An example program showing how to program in E using the 
  11405.                     DYNALINK command. 
  11406.  
  11407. E.E                 The main file containing all the include statements that 
  11408.                     create EPM. Do not compile this module, however. Compile 
  11409.                     the EPM.E file. 
  11410.  
  11411. E3EMUL.E            Includes the procedures and commands to enable E3EMUL host 
  11412.                     support. See The EPM User's Guide for more information on 
  11413.                     the E3EMUL package support. 
  11414.  
  11415. EKEYS.E             Key definitions for E syntax support. 
  11416.  
  11417. EKEYSEL.E           See CKEYSEL.E. 
  11418.  
  11419. ENGLISH.E           The file containing all the text strings used by the 
  11420.                     macros. This file is only included if the configuration 
  11421.                     constant NLS_LANGUAGE = 'ENGLISH'.  Other NLS translations 
  11422.                     exist, but are owned by Boca. 
  11423.  
  11424. EPM.E               The main file for compilation. See The EPM User's Guide for 
  11425.                     information on compiling this file. 
  11426.  
  11427. EPMDBCS.E           Procedures related to DBCS support.  This file is only 
  11428.                     included if the configuration constant WANT_DBCS is TRUE. 
  11429.  
  11430. EPMGCNF.SMP         This is a copy of the MYCNF.E used to compile the *.ex 
  11431.                     files shipped externally. 
  11432.  
  11433. EPMLEX.E            Includes spell checking and synonym support for the EPM 
  11434.                     editor. This file is only included if the configuration 
  11435.                     constant SPELL_SUPPORT = 1.  Can also be compiled 
  11436.                     separately and linked in. 
  11437.  
  11438. EPMSHELL.E          Procedures related to EPM's Shell support.  This file is 
  11439.                     only included if the configuration constant WANT_EPM_SHELL 
  11440.                     is TRUE. 
  11441.  
  11442. EPM_EA.E            Procedures dealing with extended attributes. 
  11443.  
  11444. EXIT.E              Asks the user if he really wants to leave EOS2. No longer 
  11445.                     used in EPM. 
  11446.  
  11447. EXTRA.E             A file used to split some of the function out of EPM.EX 
  11448.                     when it grew above 64k, before EPM 6.00 supported larger 
  11449.                     .ex files.  See EXTRA_EX in The EPM User's Guide. 
  11450.  
  11451. FEVSHMNU.E          An alternate to STDMENU.E that implements the "FEVSH" menu 
  11452.                     style of OS/2 Warp.  Used only if the configuration 
  11453.                     constant STD_MENU_NAME = "FEVSHMNU.E", this should only be 
  11454.                     used in EPM 6.00 or above, as it doesn't have an Options 
  11455.                     menu.  The newer settings notebook of EPM 6 allows the user 
  11456.                     to select most of the settings which would otherwise be 
  11457.                     lost. 
  11458.  
  11459. GET.E               Procedures for the GET command. This is an external package 
  11460.                     created to save memory space. When the user issues a GET 
  11461.                     command, EPM loads the GET.EX file. Once the GET command is 
  11462.                     completed, GET will unlink itself from memory to free up 
  11463.                     memory space. 
  11464.  
  11465. HELP.E              Procedure for the HELP command. This is an external package 
  11466.                     created to save memory space. When the user issues a HELP 
  11467.                     command, EPM loads the HELP.EX file. Once the user has 
  11468.                     finished viewing the EPMHELP.HLP file, HELP automatically 
  11469.                     unlinks itself from memory to free up memory space. 
  11470.  
  11471. KWHELP.E            Procedures related to EPM's keyword help feature.  This 
  11472.                     file is only included if the configuration constant 
  11473.                     WANT_KEYWORD_HELP is TRUE. 
  11474.  
  11475. LINKCMDS.E          Contains procedures and commands related to the linking of 
  11476.                     editor modules (ie. LINK, ETPM, RELINK and UNLINK). 
  11477.  
  11478. LOAD.E              This file contains the default DEFLOAD procedure. 
  11479.  
  11480. MAIN.E              Contains the DEFMAIN procedure, which is where E begins 
  11481.                     execution after all DEFINITs.  Processes the OS/2 command 
  11482.                     line. 
  11483.  
  11484. MAKETAGS.E          Procedures for the MAKETAGS command.  This is normally 
  11485.                     compiled to an external MAKETAGS.EX file rather than 
  11486.                     included in the base .ex files. 
  11487.  
  11488. MARKFILT.E          Defines procedures to extract and replace strings from 
  11489.                     marked text. 
  11490.  
  11491. MATH.E              Definitions for ADD and MULT commands. Also refer to the 
  11492.                     file MATHLIB.E for more math command definitions. 
  11493.  
  11494. MATHLIB.E           An extension of MATH.E created for EOS/2 to allow the 
  11495.                     components to compile only if needed. See MATH.E for more 
  11496.                     math command definitions. 
  11497.  
  11498. MENUHELP.H          Contains definitions of the help panel IDs.  This file is 
  11499.                     shared between the macros and the help file source. 
  11500.  
  11501. MODIFY.E            This file contains the procedures and commands executed 
  11502.                     when a DEMODIFY event is triggered. The DEMODIFY event 
  11503.                     occurs when a file's number of modifications (.modify): 
  11504.  
  11505.    o goes from zero to nonzero (first modification, so we can change the 
  11506.      textcolor or title to indicate that the file needs to be saved; 
  11507.    o goes from nonzero to zero (so we can return to the safe textcolor, usually 
  11508.      after a save); 
  11509.    o goes from less than .autosave to greater than or equal to .autosave. 
  11510.  
  11511.                     The DEMODIFY.E file is new as of EPM. 
  11512.  
  11513. MOUSE.E             Contains the commands and procedures associated with the 
  11514.                     MOUSE movements and actions. This file is new as of EPM. 
  11515.  
  11516. OS2TOOLS.CFG        This is a copy of the MYCNF.E used to compile the *.ex 
  11517.                     files shipped internally to IBM. 
  11518.  
  11519. OVSHMENU.E          An alternate to STDMENU.E that implements the proposed 
  11520.                     "OVSH" menu style. Used only if the configuration constant 
  11521.                     STD_MENU_NAME = "OVSHMENU.E", this should only be used in 
  11522.                     EPM 6.00 or above.  (See comments under FEVSHMNU.E.) 
  11523.  
  11524. PKEYS.E             Syntax aids for Pascal files. 
  11525.  
  11526. PKEYSEL.E           See CKEYSEL.E. 
  11527.  
  11528. PUT.E               Contains the procedures and statements for the PUT command. 
  11529.                     This was made an external module to save space. 
  11530.  
  11531. RETREIVE.E          Used to retrieve commands from a hidden file in E3. This 
  11532.                     file is no longer used under EPM. 
  11533.  
  11534. REXXKEYS.E          Syntax aids for Rexx command files. 
  11535.  
  11536. RKEYSEL.E           See CKEYSEL.E. 
  11537.  
  11538. SAVELOAD.E          Things common to loading and saving files (host file 
  11539.                     support). 
  11540.  
  11541. SELECT.E            Contains the procedure select_edit_keys() which selects 
  11542.                     options (like keysets) whenever you switch to a new file. 
  11543.  
  11544. SHELL.E             Presents an E interface to the internal shell command. 
  11545.  
  11546. SLNOHOST.E          Substitute for SAVELOAD.E, without host file support. 
  11547.  
  11548. SMALL.E             A version of E.E with several features removed to save 
  11549.                     memory. 
  11550.  
  11551. SORTDLL.E           Provides the link between the E's SORT command and the 
  11552.                     QISRTMEM sort DLL. 
  11553.  
  11554. SORTE.E             Definitions for the sorting using the E language. 
  11555.  
  11556. SORTEPM.E           Definitions for the sorting using the EPM 5.60 or above 
  11557.                     internal sort. 
  11558.  
  11559. STDCMDS.E           Definitions of standard E commands. 
  11560.  
  11561. STDCNF.E            Mode settings and default values for the standard E 
  11562.                     configuration. 
  11563.  
  11564. STDCONST.E          Contains EPM's standard constants. 
  11565.  
  11566. STDCTRL.E           Adds LISTBOX and MENU support.  Routines to interface with 
  11567.                     EPM and PM controls are defined here. 
  11568.  
  11569. STDKEYS.E           Standard E command-key definitions. 
  11570.  
  11571. STDMENU.E           The default action bar is defined here. 
  11572.  
  11573. STDPROCS.E          Standard procedural support for other files. 
  11574.  
  11575. TAGS.E              Procedures related to EPM's tags file support.  This file 
  11576.                     is only included if the configuration constant WANT_TAGS = 
  11577.                     1. It can also be linked dynamically. 
  11578.  
  11579. WINDOW.E            Definitions for tiled window support.  No longer used in 
  11580.                     EPM. 
  11581.  
  11582.  
  11583. ΓòÉΓòÉΓòÉ 11. Descriptions of Procedures in Standard EPM ΓòÉΓòÉΓòÉ
  11584.  
  11585. This section lists in alphabetical order all of the procedures in the *.E files 
  11586. and gives a brief description of how they function and what they are used for. 
  11587. For more detailed information, please study the comments in the .E code itself. 
  11588.  
  11589.  
  11590. ΓòÉΓòÉΓòÉ 11.1. ALREADY_IN_RING(filename, var tryid) ΓòÉΓòÉΓòÉ
  11591.  
  11592. Attempts to find the filename in the current ring. If successful tryid returns 
  11593. the file id for the filename. This function returns a one if the filename is in 
  11594. the ring and a zero if not. 
  11595.  
  11596.  
  11597. ΓòÉΓòÉΓòÉ 11.2. APPEND_PATH(filename) ΓòÉΓòÉΓòÉ
  11598.  
  11599. For use with DOS 3.30 or higher: searches the path listed in the APPEND path 
  11600. string for filename and returns the path (ended by a trailing backslash) where 
  11601. it was found; otherwise it returns null. Only included if requested with the 
  11602. USE_APPEND configuration constant. 
  11603.  
  11604.  
  11605. ΓòÉΓòÉΓòÉ 11.3. ASKYESNO() ΓòÉΓòÉΓòÉ
  11606.  
  11607. Displays the message: 'Are you sure (Y/N)' and returns an uppercase keystroke 
  11608. to the caller. If called with a string parameter, the string is displayed 
  11609. before the message: 'Are you sure (Y/N)'. An optional second argument is a flag 
  11610. to prevent the 'Are you sure (Y/N)' message from appearing. For example: 
  11611.  
  11612. usersays = askyesno("About to erase")
  11613.  
  11614. The user's response would be placed in the variable usersays. 
  11615.  
  11616.  
  11617. ΓòÉΓòÉΓòÉ 11.4. BEEP(pitch,duration) ΓòÉΓòÉΓòÉ
  11618.  
  11619. Emits a tone of pitch (range 25Hz - 7FFFHz) and a duration of duration in 
  11620. milliseconds. 
  11621.  
  11622.  
  11623. ΓòÉΓòÉΓòÉ 11.5. BREAKOUT_MVS(filename,lastqual) ΓòÉΓòÉΓòÉ
  11624.  
  11625. Breaks out a filetype from a MVS filename.  PASCAL will return PAS and C will 
  11626. return C. Only included if requested with HOST_SUPPORT. 
  11627.  
  11628.  
  11629. ΓòÉΓòÉΓòÉ 11.6. CHECK_FOR_HOST_FILE() ΓòÉΓòÉΓòÉ
  11630.  
  11631. Parses arg(1) in the host filename form:  fname ftype fmode; gives an error 
  11632. message and returns zero if not in correct format; returns one if in correct 
  11633. format. Included only if HOST_SUPPORT is requested. 
  11634.  
  11635.  
  11636. ΓòÉΓòÉΓòÉ 11.7. CHECK_FOR_PRINTER(name) ΓòÉΓòÉΓòÉ
  11637.  
  11638. Tests whether name is actually a printer device. Returns zero if not a valid 
  11639. printer device and the printer number if valid. 
  11640.  
  11641.  
  11642. ΓòÉΓòÉΓòÉ 11.8. CHECK_MARK_ON_SCREEN() ΓòÉΓòÉΓòÉ
  11643.  
  11644. Tells if a mark is visible on the screen. Returns a one if the mark is on the 
  11645. visible screen and a zero if not. Use checkmark() to see if a mark exists 
  11646. anywhere in the file. 
  11647.  
  11648.  
  11649. ΓòÉΓòÉΓòÉ 11.9. checkmark() ΓòÉΓòÉΓòÉ
  11650.  
  11651. Checks if a marked area exists in the current file. Returns a one if a mark is 
  11652. set; zero if no mark exists. 
  11653.  
  11654.  
  11655. ΓòÉΓòÉΓòÉ 11.10. CURSOROFF() ΓòÉΓòÉΓòÉ
  11656.  
  11657. Turns the cursor off. 
  11658.  
  11659.  
  11660. ΓòÉΓòÉΓòÉ 11.11. DEC2HEX() ΓòÉΓòÉΓòÉ
  11661.  
  11662. Converts a decimal number, arg(1), to a number of base arg(2) (default is 
  11663. hexadecimal). Example usage is: 
  11664.  
  11665.         HexStringOut=Dec2Hex(DecimalIn)
  11666.  
  11667.  
  11668. ΓòÉΓòÉΓòÉ 11.12. DOS_COMMAND() ΓòÉΓòÉΓòÉ
  11669.  
  11670. Executes the DOS (OS/2) command specified in the arg(1) and redirects the 
  11671. output to the file specified in vTEMP_FILENAME. Used by commands like the DIR 
  11672. command. 
  11673.  
  11674.  
  11675. ΓòÉΓòÉΓòÉ 11.13. DOS_VERSION() ΓòÉΓòÉΓòÉ
  11676.  
  11677. Returns DOS version number, multiplied by 100 so it can be treated as an 
  11678. integer string.  For example DOS 3.2 is reported as "320". 
  11679.  
  11680.  
  11681. ΓòÉΓòÉΓòÉ 11.14. EINSERT_LINE() ΓòÉΓòÉΓòÉ
  11682.  
  11683. Inserts a line after current line and positions the cursor on the same column 
  11684. number of the first nonblank character of preceding line. 
  11685.  
  11686.  
  11687. ΓòÉΓòÉΓòÉ 11.15. ENTRY_BOX(title) ΓòÉΓòÉΓòÉ
  11688.  
  11689. Creates a System-Modal Dialog Box with an entry field and two push buttons. The 
  11690. format for entry_box is: 
  11691.  
  11692. userstext = entrybox(title,buttons,entrytext,cols,
  11693.             maxchars)
  11694.  
  11695. with the following field definitions: 
  11696.  
  11697. userstext is the variable that will contain the user's text entered. 
  11698. title     the text to be displayed in the title bar. 
  11699. buttons   the labels on the buttons separated by delimiting characters. If this 
  11700.           entry is null, the EPM defaults to Enter and Cancel. 
  11701. entrytext contains the text to be entered into the user's text entry area. This 
  11702.           is useful for displaying defaults for change. 
  11703. cols      is the width of the dialog box. 
  11704. maxchars  is the maximum number of characters allowed for entry. 
  11705.  
  11706. An example of a procedure (called testit) that uses the entrybox command 
  11707. follows: 
  11708.  
  11709. defc testit
  11710.   k=entrybox('This is a test box.', '/one/two/',
  11711.              'Hi!',30, 10)
  11712.     message("The character returned was = "||k)
  11713.  
  11714. In the procedure, a dialog box with the title This is a test box will appear. 
  11715. The two buttons will be labeled one and two. Initially the word Hi! will be 
  11716. entered in the text input area. This is useful for displaying current values 
  11717. and allowing the user to change them. The dialog box will be thirty characters 
  11718. wide and allow the user to input up to ten characters. The input will be stored 
  11719. in the variable k and the command message will display the input. 
  11720.  
  11721. Also see the LISTBOX procedure in this section for an alternative means of 
  11722. getting user input. 
  11723.  
  11724.  
  11725. ΓòÉΓòÉΓòÉ 11.16. ERASETEMP(filename) ΓòÉΓòÉΓòÉ
  11726.  
  11727. Erases a file quietly (no "File not found" message) on both DOS and OS/2; 
  11728. returns 0 if successful erase, and the error code (if on DOS) which is usually 
  11729. 2 for 'file not found'. 
  11730.  
  11731.  
  11732. ΓòÉΓòÉΓòÉ 11.17. EXIST(filename) ΓòÉΓòÉΓòÉ
  11733.  
  11734. Determines whether filename exists. Returns a one if it does exist; a zero if 
  11735. it doesn't. 
  11736.  
  11737.  
  11738. ΓòÉΓòÉΓòÉ 11.18. FILETYPE() -- in SLNOHOST.E ΓòÉΓòÉΓòÉ
  11739.  
  11740. Returns the extension (everything after '.') of the current filename or fileid 
  11741. specified in arg(1). 
  11742.  
  11743.  
  11744. ΓòÉΓòÉΓòÉ 11.19. FILETYPE() -- in SAVELOAD.E ΓòÉΓòÉΓòÉ
  11745.  
  11746. Returns the 'ftype' portion of the host filename. 
  11747.  
  11748.  
  11749. ΓòÉΓòÉΓòÉ 11.20. FIND_ROUTINE(utility) ΓòÉΓòÉΓòÉ
  11750.  
  11751. Used to both verify that the external utility program exists, and to get its 
  11752. path. 
  11753.  
  11754.  
  11755. ΓòÉΓòÉΓòÉ 11.21. GET_CHAR() ΓòÉΓòÉΓòÉ
  11756.  
  11757. Returns the character at the current cursor position. 
  11758.  
  11759.  
  11760. ΓòÉΓòÉΓòÉ 11.22. GET_ENV(varname) ΓòÉΓòÉΓòÉ
  11761.  
  11762. Returns whether the variable name (varname) is found in the environment. 
  11763. Returns the setting if found; zero if not found. For example: 
  11764.  
  11765.         res=get_env('DPATH')
  11766.  
  11767. In this case the contents of the DPATH environment variable would be returned 
  11768. into the variable res. 
  11769.  
  11770.  
  11771. ΓòÉΓòÉΓòÉ 11.23. GETDATE() ΓòÉΓòÉΓòÉ
  11772.  
  11773. Returns the date in the form: Weekday Month Day, Year; MonthNum. 
  11774.  
  11775.  
  11776. ΓòÉΓòÉΓòÉ 11.24. GETTIME() ΓòÉΓòÉΓòÉ
  11777.  
  11778. Returns the time in the form: hh:mm:ss xm;hour24:hund. 
  11779.  
  11780.  
  11781. ΓòÉΓòÉΓòÉ 11.25. HEX2DEC() ΓòÉΓòÉΓòÉ
  11782.  
  11783. Converts the number in arg(1) to a decimal number; arg(1) is assumed to be a 
  11784. number of base arg(2) (hexadecimal by default). See the dec2hex() procedure for 
  11785. an example. 
  11786.  
  11787.  
  11788. ΓòÉΓòÉΓòÉ 11.26. ISA_MVS_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11789.  
  11790. Returns a zero and the error message (in error_msg) if it is not a valid MVS 
  11791. filename; and returns a one and the rest of the information if the candidate is 
  11792. a valid MVS filename. 
  11793.  
  11794.  
  11795. ΓòÉΓòÉΓòÉ 11.27. ISA_PC_FILENAME(candidate, var tempfile, var error_msg) ΓòÉΓòÉΓòÉ
  11796.  
  11797. Returns a zero and the error message (in error_msg) if it is not a valid PC 
  11798. filename; and returns a one and the rest of the information if the candidate 
  11799.  
  11800.  
  11801. ΓòÉΓòÉΓòÉ 11.28. ISA_VM_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11802.  
  11803. Returns a zero and the error message (in error_msg) if it is not a valid VM 
  11804. filename; and returns a one and the rest of the information if the candidate 
  11805.  
  11806.  
  11807. ΓòÉΓòÉΓòÉ 11.29. ISHOST(candidate, verb, var hostfile, var tempfile, var thisLT, var bin) ΓòÉΓòÉΓòÉ
  11808.  
  11809. Determines a filename's type and returns: 
  11810.  
  11811. 0 = PC filename 
  11812. 1 = VM filename 
  11813. 2 = MVS filenme 
  11814.  
  11815.  
  11816. ΓòÉΓòÉΓòÉ 11.30. ISNUM() ΓòÉΓòÉΓòÉ
  11817.  
  11818. Returns true if parameter given is a number, ignores leading and trailing 
  11819. spaces. 
  11820.  
  11821.  
  11822. ΓòÉΓòÉΓòÉ 11.31. ISOPTION(var cmdline, optionletter) ΓòÉΓòÉΓòÉ
  11823.  
  11824. Eliminates optionletter from cmdline; if optionletter occurred in the 
  11825. commandline, returns 1; returns 0 otherwise. 
  11826.  
  11827.  
  11828. ΓòÉΓòÉΓòÉ 11.32. JOINLINES() ΓòÉΓòÉΓòÉ
  11829.  
  11830. Joins the line below the cursor line with the cursor line. 
  11831.  
  11832.  
  11833. ΓòÉΓòÉΓòÉ 11.33. LISTBOX(params) ΓòÉΓòÉΓòÉ
  11834.  
  11835. Enables the dynamic creation of modal PM list boxes. A macro can pop up a list 
  11836. of items and have the user's selection returned to the macro. The entry chosen 
  11837. (with a mouse double click or enter from the keyboard) is returned. If ESC was 
  11838. hit then a null string is returned. Parameters are: 
  11839.  
  11840. param1  the title for the listbox 
  11841. param2  the list of items, separated by a common separator.  The common 
  11842.         separator is the first character in the string. 
  11843.  
  11844.                 example:  /cat/dog/fish
  11845.                           separator='/'
  11846.                           list=cat, dog, fish
  11847.                 example:  $cat/ground$fish/water
  11848.                           separator='$'
  11849.                           list=cat/ground, fish/water
  11850.  
  11851.         These lists will be displayed like the past commands are displayed in 
  11852.         the command line dialog box. If one of elements in the box is 
  11853.         double-clicked on, it will be returned. For instance, if the second 
  11854.         element of the first example list was chosen by the user, the string 
  11855.         DOG would be returned. 
  11856.  
  11857.         An alternate method, useful for long lists which might not fit into an 
  11858.         EPM string, is passing the data in a buffer.  This is indicated by 
  11859.         passing in a string starting with a hex '00', followed by the buffer 
  11860.         size, the buffer address, and an optional set of flags.  The full 
  11861.         param2 in this case would be, for 6.00 and above: 
  11862.  
  11863.                 \0 || atol(usedsize) || atoi(buffer_offset) || atoi(buffer_selector) [ || flag ]
  11864.         and for earlier versions: 
  11865.  
  11866.                 \0 || atoi(usedsize) || atoi(buffer_selector) || atoi(buffer_offset) [ || flag ]
  11867.  
  11868.         The function listbox_buffer_from_file, defined in STDCTRL.E, can be 
  11869.         used for putting the contents of a file into a buffer in a suitable 
  11870.         format for listbox(). 
  11871.  
  11872.         The default flag is 3.  The bits are: 
  11873.  
  11874.    1 Position the listbox below the points specified. 
  11875.  
  11876.    2 Map the points to the desktop. 
  11877.  
  11878.    4 Each listbox item starts with an ASCII help panel ID.  The IDs are removed 
  11879.      before filling the listbox.  The first button is assumed to be a Details 
  11880.      button.  Pressing it invokes help for the panel ID associated with the 
  11881.      current listbox item.  (This feature is used by the Workframe/2.) 
  11882. param3  (optional) button names.  A maximum of four button names can be 
  11883.         specified to allow multiple buttons. If button one is clicked on, the 
  11884.         highlighted value from the list is returned and so should probably be 
  11885.         entitled ENTER. If the second button is chosen, a null string will be 
  11886.         returned as so should have a title something equivalent to Cancel. If 
  11887.         included the third and fourth boxes return the numbers 3 and 4 
  11888.         respectively. The meanings of these buttons can be defined by the 
  11889.         programmer. If no button names are given, buttons one and two will 
  11890.         default to ENTER and CANCEL respectively. 
  11891. param4  (optional) row of text in which list box will go under. If this 
  11892.         parameter is not specified or if a parameter of zero (0) is specified, 
  11893.         the box will be placed under the cursor. 
  11894. param5  (optional) column of text in which list box will go under. If this 
  11895.         parameter is not specified or if a parameter of zero (0) is specified, 
  11896.         the box will be placed under the cursor. 
  11897.  
  11898.         Note:  If the row parameter is selected the column parameter must be 
  11899.         selected as well. 
  11900. param6  (optional) height of the listbox in characters 
  11901.  
  11902.         Note:  Since the default PM font is proportional the character height 
  11903.         and width are approximate values. 
  11904. param7  (optional) width of listbox in characters. 
  11905. param8  (optional) a buffer string - see below. 
  11906.  
  11907. An example of listbox usage is: 
  11908.  
  11909. retvalue = listbox("Pick a number",
  11910.                    "/one/two/three",
  11911.                    "/Enter/Cancel/None")
  11912.  
  11913. In this example there would be three entries in the list: one, two, and three. 
  11914. There would also be three buttons entitled: Enter, Cancel, and None. Since the 
  11915. last three parameters were omitted, the box would be located at the cursor 
  11916. position and would be wide enough to accommodate the longest element of the 
  11917. list and three buttons. 
  11918.  
  11919. The above only lets the caller get back a string containing an entry from the 
  11920. list if button 1 is selected.  The buffer string allows you to get both the 
  11921. button number and the selected text.  If present, it is a string consisting of 
  11922. (5.51 and below): 
  11923.  
  11924. item# || button# || help_ID || handle || prompt
  11925. or, in 5.60 and above, of: 
  11926.  
  11927. handle || item# || button# || help_ID || prompt
  11928. where item# is the listbox entry to be initially selected, button# is the 
  11929. button that will be the default, help_ID is a help panel ID (all shorts), 
  11930. handle is the window handle of the OWNERCLIENT (needed to call help; ignored if 
  11931. help_ID is 0), and prompt is an ASCIIZ string to be displayed below the title 
  11932. bar.  If help_ID is non-zero, the rightmost button is assumed to be the help 
  11933. button.  The new parameters are passed to the toolkit in the return buffer, 
  11934. which is padded with nulls, so only the minimum needed string need be sent. 
  11935. The old way only supported returning a string if button 1 was pressed; button 2 
  11936. was assumed to be Cancel, and returned null; anything else returned the button 
  11937. number.  The new way returns one byte representing the button number (in hex) 
  11938. followed by the selected item. A button number of 0 means Esc was pressed or 
  11939. the dialog was closed.  If param8 was passed, the listbox() routine returns 
  11940. this entire string; if not, it parses it and returns what the old callers 
  11941. expected. 
  11942.  
  11943. Examples of using all the features of listbox() can be found in BOOKMARK.E. 
  11944.  
  11945. Also see the ENTRYBOX procedure in this section for an alternative method of 
  11946. getting user input. 
  11947.  
  11948.  
  11949. ΓòÉΓòÉΓòÉ 11.34. LOADFILE(files, options) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  11950.  
  11951. Issues edit command on the specified files with the specified options. 
  11952.  
  11953.  
  11954. ΓòÉΓòÉΓòÉ 11.35. LOADFILE(files,options) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11955.  
  11956. Issues edit command on the specified files with the specified options, after 
  11957. checking for host file specification ('H:'). 
  11958.  
  11959.  
  11960. ΓòÉΓòÉΓòÉ 11.36. LOCK() ΓòÉΓòÉΓòÉ
  11961.  
  11962. Locks a file from other users in a LAN situation. Returns a zero if successful; 
  11963. one if unsuccessful. This procedure is only available if requested with the 
  11964. WANT_LAN_SUPPORT configuration constant. 
  11965.  
  11966.  
  11967. ΓòÉΓòÉΓòÉ 11.37. MakeTempName() ΓòÉΓòÉΓòÉ
  11968.  
  11969. Creates a temporary filename using the optional arguments filename and fileid. 
  11970. If no arguments are specified, the current filename and current fileid are 
  11971. used. For example, if filename = `origname' and its fileid is 2, then the 
  11972. temporary filename returned will be origname.$$2. 
  11973.  
  11974.  
  11975. ΓòÉΓòÉΓòÉ 11.38. MATHCOMMON(input, suffix) ΓòÉΓòÉΓòÉ
  11976.  
  11977. Is responsible for math computations (dec, hex, or oct) done at commandline in 
  11978. E, where input is the expression to be calculated and suffix is either 'x', 'o' 
  11979. or '' depending upon the base of the number to be returned. 
  11980.  
  11981.  
  11982. ΓòÉΓòÉΓòÉ 11.39. MAX(a,b) ΓòÉΓòÉΓòÉ
  11983.  
  11984. Returns the number which has the maximum value of those numbers in the 
  11985. arguments list. As many arguments as needed can be listed. 
  11986.  
  11987.  
  11988. ΓòÉΓòÉΓòÉ 11.40. MESSAGE(mymsg) ΓòÉΓòÉΓòÉ
  11989.  
  11990. Prints the message specified by the string mymsg on the messageline. This 
  11991. procedure is a carry-over from earlier versions of E and effectively does the 
  11992. same thing as a SAYERROR statement, except this MESSAGE() procedure takes up 
  11993. more code. 
  11994.  
  11995.  
  11996. ΓòÉΓòÉΓòÉ 11.41. MESSAGENWAIT() ΓòÉΓòÉΓòÉ
  11997.  
  11998. Prints the message passed to it in the editor messages dialog box and waits for 
  11999. Cancel or ESC. 
  12000.  
  12001.  
  12002. ΓòÉΓòÉΓòÉ 11.42. MIN(a,b) ΓòÉΓòÉΓòÉ
  12003.  
  12004. Returns the number which has the minimum value of those numbers in the list of 
  12005. parameters. As many parameters as needed can be included for comparison. 
  12006.  
  12007.  
  12008. ΓòÉΓòÉΓòÉ 11.43. MY_C_ENTER() ΓòÉΓòÉΓòÉ
  12009.  
  12010. Applies to c_enter key the appropriate action defined in C_ENTER_ACTION 
  12011. constant. 
  12012.  
  12013.  
  12014. ΓòÉΓòÉΓòÉ 11.44. MY_ENTER() ΓòÉΓòÉΓòÉ
  12015.  
  12016. Applies to enter key the appropriate action defined in ENTER_ACTION constant. 
  12017.  
  12018.  
  12019. ΓòÉΓòÉΓòÉ 11.45. NAMEFILE() -- in SLNOLOAD.e ΓòÉΓòÉΓòÉ
  12020.  
  12021. Issues name command using arg(1) as the new filename. 
  12022.  
  12023.  
  12024. ΓòÉΓòÉΓòÉ 11.46. NAMEFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12025.  
  12026. Issues name command using arg(1) as the new filename, after checking whether 
  12027. file is a host file. 
  12028.  
  12029.  
  12030. ΓòÉΓòÉΓòÉ 11.47. NO_CHAR_MARK() ΓòÉΓòÉΓòÉ
  12031.  
  12032. Checks if WANT_CHAR_OPS option was set in STDCNF.e. 
  12033.  
  12034.  
  12035. ΓòÉΓòÉΓòÉ 11.48. OPENSHELLWINDOW() ΓòÉΓòÉΓòÉ
  12036.  
  12037. Opens a edit window under a temporary filename for output. (i.e. like the DIR 
  12038. command does) 
  12039.  
  12040.  
  12041. ΓòÉΓòÉΓòÉ 11.49. PARSE_FILE_N_OPTS(argstr) ΓòÉΓòÉΓòÉ
  12042.  
  12043. Parses argstr which contains a mix of options and DOS file specs. The DOS file 
  12044. specs can contain an '=' for the path or fileid, which will be replaced by the 
  12045. corresponding part of the previous file. 
  12046.  
  12047.  
  12048. ΓòÉΓòÉΓòÉ 11.50. PARSE_FILENAME(var filename) ΓòÉΓòÉΓòÉ
  12049.  
  12050. Parses a DOS filename.  Optional second argument gives source for '=' when used 
  12051. for path of fileid.  Rc is 0 if successful, or rc is the position of '=' in 
  12052. first argument if no second argument given but was needed. 
  12053.  
  12054.  
  12055. ΓòÉΓòÉΓòÉ 11.51. PARSE_LEADING_OPTIONS(var rest, var options) ΓòÉΓòÉΓòÉ
  12056.  
  12057. Parses options portion of the edit command. It does not assume that all options 
  12058. are specified before filenames. It is called by DEFC EDIT. 
  12059.  
  12060.  
  12061. ΓòÉΓòÉΓòÉ 11.52. PBEGIN_MARK() ΓòÉΓòÉΓòÉ
  12062.  
  12063. Moves the cursor to the first character of the mark area.  If the mark area is 
  12064. not in the active file, the marked file is activated. 
  12065.  
  12066.  
  12067. ΓòÉΓòÉΓòÉ 11.53. PBEGIN_WORD() ΓòÉΓòÉΓòÉ
  12068.  
  12069. Moves the cursor to the beginning of the word if the cursor is on this word. 
  12070. If its not on a word, its moved to the beginning of the first word on the left. 
  12071. If there is no word on the left its moved to the beginning of the word on the 
  12072. right.  If the line is empty the cursor doesn't move. 
  12073.  
  12074.  
  12075. ΓòÉΓòÉΓòÉ 11.54. PBLOCK_REFLOW(option, var space, var tempofid) ΓòÉΓòÉΓòÉ
  12076.  
  12077. Reflows the text in the marked area; then the destination block area must be 
  12078. selected and a second call to this procedure to reflow the source block in the 
  12079. destination block.  The source block is filled with spaces. Option=0 saves the 
  12080. marked block in temp file; option=1 reflows temp file text and copies it to 
  12081. marked area 
  12082.  
  12083.  
  12084. ΓòÉΓòÉΓòÉ 11.55. PCENTER_MARK() ΓòÉΓòÉΓòÉ
  12085.  
  12086. Centers the strings inside a block mark. If a line mark exists, the text in the 
  12087. marked lines is centered within the current margins. If no mark exists, the 
  12088. text on the current line is centered within the current margins. 
  12089.  
  12090.  
  12091. ΓòÉΓòÉΓòÉ 11.56. PCOMMON_ADJUST_OVERLAY(letter) ΓòÉΓòÉΓòÉ
  12092.  
  12093. Implements adjust and overlay commands for character and line marks (previously 
  12094. only block marks enjoyed these privileges); parameter letter specifies 'A' for 
  12095. adjust and 'O' for overlay. This procedure is only included if requested with 
  12096. the WANT_CHAR_OPS configuration constant. 
  12097.  
  12098.  
  12099. ΓòÉΓòÉΓòÉ 11.57. PCOPY_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  12100.  
  12101. Implements the copymark statement for character marks; parameters specify the 
  12102. marked area. 
  12103.  
  12104.  
  12105. ΓòÉΓòÉΓòÉ 11.58. PDELETE_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  12106.  
  12107. Implements the deletemark statement for character marks; parameters specify the 
  12108. marked area. 
  12109.  
  12110.  
  12111. ΓòÉΓòÉΓòÉ 11.59. PDISPLAY_MARGINS() ΓòÉΓòÉΓòÉ
  12112.  
  12113. Puts the margin settings on the current line. 
  12114.  
  12115.  
  12116. ΓòÉΓòÉΓòÉ 11.60. PDISPLAY_TABS() ΓòÉΓòÉΓòÉ
  12117.  
  12118. Puts the tab stops on the current line. 
  12119.  
  12120.  
  12121. ΓòÉΓòÉΓòÉ 11.61. PEND_MARK() ΓòÉΓòÉΓòÉ
  12122.  
  12123. Moves the cursor to the end of the marked area. 
  12124.  
  12125.  
  12126. ΓòÉΓòÉΓòÉ 11.62. PEND_WORD() ΓòÉΓòÉΓòÉ
  12127.  
  12128. Moves the cursor to the end of the word if the cursor is on this word.  If it's 
  12129. not on a word, it's moved to the end of the first word on the right.  If there 
  12130. is no word on the right it's moved to the end of the word on the left.  If the 
  12131. line is empty the cursor doesn't move. 
  12132.  
  12133.  
  12134. ΓòÉΓòÉΓòÉ 11.63. PFILE_EXISTS() ΓòÉΓòÉΓòÉ
  12135.  
  12136. Checks if file already exists in ring. 
  12137.  
  12138.  
  12139. ΓòÉΓòÉΓòÉ 11.64. PFILL_MARK() ΓòÉΓòÉΓòÉ
  12140.  
  12141. Implements the fillmark statement for character marks; checks arg() to see if a 
  12142. character for fill was specified, otherwise prompts for a character. This 
  12143. procedure is available only if requested with the WANT_CHAR_OPS configuration 
  12144. constant. 
  12145.  
  12146.  
  12147. ΓòÉΓòÉΓòÉ 11.65. PFIND_BLANK_LINE() ΓòÉΓòÉΓòÉ
  12148.  
  12149. Finds first blank line starting from current line. 
  12150.  
  12151.  
  12152. ΓòÉΓòÉΓòÉ 11.66. PFIRST_NONBLANK() ΓòÉΓòÉΓòÉ
  12153.  
  12154. Finds first nonblank character in the current line. 
  12155.  
  12156.  
  12157. ΓòÉΓòÉΓòÉ 11.67. PLOWERCASE() ΓòÉΓòÉΓòÉ
  12158.  
  12159. Changes all alphabetic characters in the marked area to lowercase. 
  12160.  
  12161.  
  12162. ΓòÉΓòÉΓòÉ 11.68. PMARGINS() ΓòÉΓòÉΓòÉ
  12163.  
  12164. Returns the current margins setting.  Uses pcommon_tab_margin(). 
  12165.  
  12166.  
  12167. ΓòÉΓòÉΓòÉ 11.69. PMARK(mt) ΓòÉΓòÉΓòÉ
  12168.  
  12169. Marks at the cursor position; receives the mark type as an argument. 
  12170.  
  12171.  
  12172. ΓòÉΓòÉΓòÉ 11.70. PMARK_WORD() ΓòÉΓòÉΓòÉ
  12173.  
  12174. Marks the word pointed at by the cursor.  If the cursor is on a space the word 
  12175. at the right is marked.  If there is no word on the right, the word on the left 
  12176. is marked. 
  12177.  
  12178.  
  12179. ΓòÉΓòÉΓòÉ 11.71. PMOVE_MARK() ΓòÉΓòÉΓòÉ
  12180.  
  12181. Implements the movemark statement for character marks by calling pcopy_mark() 
  12182. and pcopy_delete(). 
  12183.  
  12184.  
  12185. ΓòÉΓòÉΓòÉ 11.72. PPUT_STRING_BACK(string) ΓòÉΓòÉΓòÉ
  12186.  
  12187. Puts string back into marked area on current line. 
  12188.  
  12189.  
  12190. ΓòÉΓòÉΓòÉ 11.73. PRESTORE_MARK(savemark) ΓòÉΓòÉΓòÉ
  12191.  
  12192. Marks the area specified in savemark, where savemark  is a concatenated string 
  12193. composed of the components: first_line, last_line, first_col, last_col, fileid, 
  12194. marktype. 
  12195.  
  12196.  
  12197. ΓòÉΓòÉΓòÉ 11.74. PRESTORE_POS(save_pos) ΓòÉΓòÉΓòÉ
  12198.  
  12199. Resets the cursor position according to save_pos, a string composed of the 
  12200. concatenation of the fields:  .col, .line, .cursorx, and .cursory. 
  12201.  
  12202.  
  12203. ΓòÉΓòÉΓòÉ 11.75. PRINTER_READY() ΓòÉΓòÉΓòÉ
  12204.  
  12205. In EPM this procedure will always return ready. It remains for compatibility 
  12206. with previous E macros. 
  12207.  
  12208.  
  12209. ΓòÉΓòÉΓòÉ 11.76. PROOF1(word) ΓòÉΓòÉΓòÉ
  12210.  
  12211. Calls Lexam to spell check for the word specified by word. 
  12212.  
  12213.  
  12214. ΓòÉΓòÉΓòÉ 11.77. PROOF2() ΓòÉΓòÉΓòÉ
  12215.  
  12216. Calls Lexam to begin spell-checking at the current word. 
  12217.  
  12218.  
  12219. ΓòÉΓòÉΓòÉ 11.78. PSAVE_MARK(var savemark) ΓòÉΓòÉΓòÉ
  12220.  
  12221. Saves the specifications of the currently marked area in savemark, a string 
  12222. composed of the concatenation of: first_line, last_line, first_col, last_col, 
  12223. fileid, and marktype. 
  12224.  
  12225.  
  12226. ΓòÉΓòÉΓòÉ 11.79. PSAVE_POS(var save_pos) ΓòÉΓòÉΓòÉ
  12227.  
  12228. Saves the cursor position according to save_pos, a string composed of the 
  12229. concatenation of the fields:  .line, .col, .cursorx, and .cursory. 
  12230.  
  12231.  
  12232. ΓòÉΓòÉΓòÉ 11.80. PSET_MARK(firstline, lastline, firstcol, lastcol, mt, fileid) ΓòÉΓòÉΓòÉ
  12233.  
  12234. Marks the area designated by the parameters.  The firstline, lastline, firstcol 
  12235. and lastcol refer to position of the text in the file.  The mt is the mark type 
  12236. (block, line, or character).  The fileid is the id number of the file to be 
  12237. marked. 
  12238.  
  12239.  
  12240. ΓòÉΓòÉΓòÉ 11.81. PTABS() ΓòÉΓòÉΓòÉ
  12241.  
  12242. Calls pcommon_tab_margin() to return tab settings. 
  12243.  
  12244.  
  12245. ΓòÉΓòÉΓòÉ 11.82. PUPPERCASE() ΓòÉΓòÉΓòÉ
  12246.  
  12247. Converts all alphabetic characters in the marked area to uppercase letters. 
  12248.  
  12249.  
  12250. ΓòÉΓòÉΓòÉ 11.83. QUITFILE() -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  12251.  
  12252. Issues quit command after checking windowing and modify status. 
  12253.  
  12254.  
  12255. ΓòÉΓòÉΓòÉ 11.84. QUITFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12256.  
  12257. Issues quit command after checking windowing and modify status. 
  12258.  
  12259.  
  12260. ΓòÉΓòÉΓòÉ 11.85. REGISTER_MOUSEHANDLER(IsGlobal, event, mcommand) ΓòÉΓòÉΓòÉ
  12261.  
  12262. Allows the binding of mouse actions to commands. Mouse actions can be global or 
  12263. local. Mouse actions will be processed as follows: 
  12264.  
  12265.  1. local mouse action definition 
  12266.  2. global mouse action definition 
  12267.  3. mouse action ignored 
  12268.  
  12269. The variable IsGlobal determines whether the mouse action described is local or 
  12270. global. The variable event determines the mouse action to be bound with the 
  12271. command listed in the variable mcommand. Event should be in the following 
  12272. format: 
  12273.  
  12274.         'key action state'
  12275.  
  12276. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  12277. following: 
  12278.  
  12279. BEGINDRAG           activates at the beginning of the drag 
  12280. ENDDRAG             activates at the end of a drag 
  12281. CANCELDRAG          activates if a drag is cancelled 
  12282. CLICK               activates if a button (specified by key) is single clicked 
  12283. SECONDCLK           activates if a button (specified by key) is double clicked 
  12284.  
  12285. These actions must be capitalized and have exactly one space between the key 
  12286. and the state numbers. The state should be the sum of the following: 
  12287.  
  12288. 0 = no states active 
  12289. 1 = shift key active 
  12290. 2 = control key active 
  12291. 4 = alternate key active 
  12292.  
  12293. An example of a mouse action definition is: 
  12294.  
  12295. register_mousehandler(0,'2 SECONDCLK 3','quit')
  12296.  
  12297. This would set the second click of button two on the mouse with the shift and 
  12298. control states activated to do a QUIT command. This key action would be bound 
  12299. locally to a particular file. 
  12300.  
  12301.  
  12302. ΓòÉΓòÉΓòÉ 11.86. REMOVE_TRAILING_SPACES() ΓòÉΓòÉΓòÉ
  12303.  
  12304. Calls strip() to remove all trailing blanks; no longer used by standard EPM, 
  12305. but left in for compatibility --> use strip() directly. 
  12306.  
  12307.  
  12308. ΓòÉΓòÉΓòÉ 11.87. SAVEFILE(name) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  12309.  
  12310. Issues save command with file specified in name parameter. 
  12311.  
  12312.  
  12313. ΓòÉΓòÉΓòÉ 11.88. SAVEFILE(name) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  12314.  
  12315. Issues save command with file specified, after checking whether the file is a 
  12316. host file. 
  12317.  
  12318.  
  12319. ΓòÉΓòÉΓòÉ 11.89. SAYATBOX() ΓòÉΓòÉΓòÉ
  12320.  
  12321. Use the messageNwait command instead. 
  12322.  
  12323.  
  12324. ΓòÉΓòÉΓòÉ 11.90. SCROLL_LOCK() ΓòÉΓòÉΓòÉ
  12325.  
  12326. Determines whether or not the Scroll Lock key has been set on; if so, returns 
  12327. 1; otherwise returns 0. 
  12328.  
  12329.  
  12330. ΓòÉΓòÉΓòÉ 11.91. SEARCH_PATH(AppendPath, FileName) ΓòÉΓòÉΓòÉ
  12331.  
  12332. Searches a path specifed in AppendPath for the file specified in FileName. 
  12333. Returns the pathname, if successful; a null string if unsuccessful. 
  12334.  
  12335.  
  12336. ΓòÉΓòÉΓòÉ 11.92. SELECT_EDIT_KEYS() ΓòÉΓòÉΓòÉ
  12337.  
  12338. Calls filetype() which returns the extension of the file whose fileid is 
  12339. specified in arg(1), then activates the default keyset edit_keys. In EPM this 
  12340. function is defunct. 
  12341.  
  12342.  
  12343. ΓòÉΓòÉΓòÉ 11.93. SETLT(var LT_to_use) ΓòÉΓòÉΓòÉ
  12344.  
  12345. Sets the logical terminal to use. This procedure is only active if host editing 
  12346. is included. 
  12347.  
  12348.  
  12349. ΓòÉΓòÉΓòÉ 11.94. SET_FTO(hostfile, bin var fto) ΓòÉΓòÉΓòÉ
  12350.  
  12351. Sets the file transfer options. This procedure is only active if host editing 
  12352. is included. 
  12353.  
  12354.  
  12355. ΓòÉΓòÉΓòÉ 11.95. SetMouseSet (IsGlobal, NewMSName) ΓòÉΓòÉΓòÉ
  12356.  
  12357. Sets the current mouse action definition keys to the NewMSName. If IsGlobal is 
  12358. true then the effects will be global, if IsGlobal if false then the new 
  12359. settings will only affect the local file and not the rest of the files in the 
  12360. ring. 
  12361.  
  12362.  
  12363. ΓòÉΓòÉΓòÉ 11.96. SetTitleText() ΓòÉΓòÉΓòÉ
  12364.  
  12365. Sets the text in the editor's active title bar. 
  12366.  
  12367.  
  12368. ΓòÉΓòÉΓòÉ 11.97. SHOWWINDOW() ΓòÉΓòÉΓòÉ
  12369.  
  12370. Allows the edit window to be invisible or visible. 
  12371.  
  12372.  
  12373. ΓòÉΓòÉΓòÉ 11.98. SKIP_SPACES() ΓòÉΓòÉΓòÉ
  12374.  
  12375. Performs upon universal variables input (a string) and i (a position in the 
  12376. string) set by next_sym(); increments i beyond any blank spaces. 
  12377.  
  12378.  
  12379. ΓòÉΓòÉΓòÉ 11.99. SORT(firstline, lastline, firstcol, lastcol, fileid) ΓòÉΓòÉΓòÉ
  12380.  
  12381. Sorts the text in the area specified by the parameters. The first four 
  12382. arguements outlines the area of the text to be sorted and the fifth is the id 
  12383. number of the file to be sorted. 
  12384.  
  12385.  
  12386. ΓòÉΓòÉΓòÉ 11.100. SPELLWORD() ΓòÉΓòÉΓòÉ
  12387.  
  12388. Checks the word at the cursor position, removing punctuation characters.  It is 
  12389. assumed that the cursor is positioned at the beginning of the word.  (Used by 
  12390. proof2 and proofword.)  If it's a valid word then check the spelling of the 
  12391. word using the lexam opcode.  If a valid result is returned place it in a PM 
  12392. list box using the 'listbox' procedure. Returns the length of the word found. 
  12393. The optional argument is a string containing a button name.  E.g., '/Next' 
  12394.  
  12395.  
  12396. ΓòÉΓòÉΓòÉ 11.101. SPLITLINES() ΓòÉΓòÉΓòÉ
  12397.  
  12398. Inserts a line; moves the text from the cursor position to the end of line onto 
  12399. the new line; and indents the new line to the column of the first non-blank 
  12400. character of the line preceding it. 
  12401.  
  12402.  
  12403. ΓòÉΓòÉΓòÉ 11.102. SUBDIR() ΓòÉΓòÉΓòÉ
  12404.  
  12405. Uses SUBDIR if in DOS; uses FILEFIND if in OS/2 protect mode; then calls 
  12406. find_routine() to verify that the external utility program exists, and to get 
  12407. its path. 
  12408.  
  12409.  
  12410. ΓòÉΓòÉΓòÉ 11.103. SYNONYM() ΓòÉΓòÉΓòÉ
  12411.  
  12412. Checks the next word on the line for its possible synonyms. If synonyms are 
  12413. found a PM list box is displayed showing the possible new words. 
  12414.  
  12415.  
  12416. ΓòÉΓòÉΓòÉ 11.104. TRUNC(num) ΓòÉΓòÉΓòÉ
  12417.  
  12418. Truncates that part (if any) of num after a decimal point. 
  12419.  
  12420.  
  12421. ΓòÉΓòÉΓòÉ 11.105. UNLOCK(fileid) ΓòÉΓòÉΓòÉ
  12422.  
  12423. Attempts to unlock a previously locked file in a LAN situation. Returns a zero 
  12424. if successful; a one if unsuccessful. This procedure is only available if 
  12425. requested with the WANT_LAN_SUPPORT configuration constant. 
  12426.  
  12427.  
  12428. ΓòÉΓòÉΓòÉ 11.106. VMFILE(var name, var cmdline) ΓòÉΓòÉΓòÉ
  12429.  
  12430. Checks to make sure that a host filename (name) is of the correct form. 
  12431.  
  12432.  
  12433. ΓòÉΓòÉΓòÉ 11.107. WINDOWSIZE1(row,col,x,y) ΓòÉΓòÉΓòÉ
  12434.  
  12435. Sizes a window row high and col wide based at the lower left hand corner 
  12436. coordinates of x and y. An optional fifth argument sets: 
  12437.  
  12438. 1 = size window 
  12439. 2 = move window 
  12440. 3 = both (default) 
  12441.  
  12442.  
  12443. ΓòÉΓòÉΓòÉ 12. Return Codes ΓòÉΓòÉΓòÉ
  12444.  
  12445.   RC    Error strings
  12446.  ----  -----------------
  12447.    -1  Unable to Initialize interpreter object
  12448.    -2  File not found
  12449.    -3  Path not found
  12450.    -4  Too many open files
  12451.    -5  Access denied
  12452.    -6  DOS ERROR: Message not available
  12453.    -7  Memory control blocks destroyed. Save files and reboot.
  12454.    -8  Insufficient memory
  12455.    -9  Error Building SubMenu
  12456.   -10  Error Building Menu Item
  12457.  
  12458.   -11  Error Showing Menu
  12459.   -12  Error Deleting Menu
  12460.   -13  Too Many AVIO window
  12461.   -14  DOS ERROR: Message not available
  12462.   -15  Invalid drive
  12463.   -16  DOS ERROR: Message not available
  12464.   -17  DIS ERROR: Message not available
  12465.   -18  No more files
  12466.   -19  Disk is write-protected
  12467.   -20  Unknown unit
  12468.  
  12469.   -21  Drive not ready
  12470.   -22  Unknown command
  12471.   -23  Data error (CRC)
  12472.   -24  Bad request structure length
  12473.   -25  Seek error
  12474.   -26  Unknown media type
  12475.   -27  Sector not found
  12476.   -28  Printer out of paper
  12477.   -29  Write fault
  12478.   -30  Read fault
  12479.  
  12480.   -31  General failure
  12481.   -32  ERROR: Message not available
  12482.  ...   ERROR: Message not available
  12483.  -253  ERROR: Message not available
  12484.  -254  Numeric overflow or underflow
  12485.  -255  Invalid number of arguments
  12486.  -256  Recursion too deep
  12487.  -257  Invalid number of parameters
  12488.  -258  Out of string space
  12489.  -259  Expression stack overflow
  12490.  -260  Invalid fileid
  12491.  
  12492.  -261  Illegal opcode
  12493.  -262
  12494.  -263  Invalid argument
  12495.  -264  For loops nested too deep
  12496.  -265  Divide by zero
  12497.  -266  Unable to shrink
  12498.  -267  Invalid call by reference
  12499.  -268  Procedure needs more arguments
  12500.  -269  User Break. Command halted
  12501.  -270  Not enough memory
  12502.  
  12503.  -271  Error in margin settings
  12504.  -272  Error in tab settings
  12505.  -273  String not found
  12506.  -274  Unknown command
  12507.  -275  Missing filename
  12508.  -276  Line too long to join
  12509.  -277  Too many files
  12510.  -278  Line(s) truncated
  12511.  -279  Text already marked
  12512.  -280  Text not marked
  12513.  
  12514.  -281  Source destination conflict
  12515.  -282  New file
  12516.  -283  Line mark required
  12517.  -284  Error opening file
  12518.  -285  Error writing file
  12519.  -286  Error reading file
  12520.  -287  Insufficient disk space
  12521.  -288  Block mark required
  12522.  -289  Too many rings
  12523.  -290  Invalid EX file or incorrect version.
  12524.  
  12525.  -291  No main entry point
  12526.  -292  Error closing file
  12527.  -293  has been modified
  12528.  -294  Quit without saving?
  12529.  -295
  12530.  -296
  12531.  -297
  12532.  -298
  12533.  -299
  12534.  -300  Command dialog box too long to shell
  12535.  
  12536.  -301  Cannot unlink module in use
  12537.  -302  Cannot unlink base keyset module
  12538.  -303  Internal error: unlink invalid mod
  12539.  -304  Linking module error
  12540.  -305  DEFMAIN not found
  12541.  -306  DEFINIT not found
  12542.  -307  Link: file not found
  12543.  -308  Link: invalid filename
  12544.  -309  File already linked
  12545.  -310  Unlink: unknown module
  12546.  
  12547.  -311  Unlink: bad module filename
  12548.  -312  Call: duplicated proc
  12549.  -313  Call: unknown proc
  12550.  -314  Grep: memory error
  12551.  -315  Grep: missing ]
  12552.  -316  Grep: bad range in [a-z]
  12553.  -317  Grep: empty []
  12554.  -318  Grep: regular expression too long
  12555.  -319  Dynalink: incorrect number of parameters
  12556.  -320
  12557.  
  12558.  -321  Cannot find keyset
  12559.  -322  Dynalink: unrecognized library name
  12560.  -323  Line number invalid or too large for file
  12561.  -324  Keyboard status failed
  12562.  -325  Buffer creation size too large
  12563.  -326  Dynalink: unrecognized procedure name
  12564.  -327  Too many keysets
  12565.  -328
  12566.  -328  Invalid first parameter
  12567.  -329  Invalid second parameter
  12568.  -330  Invalid third parameter
  12569.  
  12570.  -331  Invalid fourth parameter
  12571.  -332  Invalid fifth parameter
  12572.  -333  Invalid sixth parameter
  12573.  -334  Invalid seventh parameter
  12574.  -335  Invalid Subcommand
  12575.  -336  Invalid column number
  12576.  -337  Invalid array identifier
  12577.  -338  Array already exists:
  12578.  -339  ERROR: Message not available
  12579.   ...  ERROR: Message not available
  12580.   etc.
  12581.  
  12582.  
  12583. ΓòÉΓòÉΓòÉ 13. ET Compilation Error Message Explanations ΓòÉΓòÉΓòÉ
  12584.  
  12585. If you have made changes to the configuration or have programmed your own 
  12586. macros in the E language, this section is important to you. Any syntactic or 
  12587. semantic errors in your programming, will be noted by the ET compiler. The 
  12588. following section describes each compilation error in simple terms. When you 
  12589. receive an error from ET, note the error message and look it up in the 
  12590. following list. The messages appear in alphabetic order. 
  12591.  
  12592.  
  12593. ΓòÉΓòÉΓòÉ 13.1. Column specification out of range. ΓòÉΓòÉΓòÉ
  12594.  
  12595. The value specified for a column position exceeds the compiler's maximum line 
  12596. length of 255. 
  12597.  
  12598.  
  12599. ΓòÉΓòÉΓòÉ 13.2. Comment not terminated. ΓòÉΓòÉΓòÉ
  12600.  
  12601. You have begun a comment with the '/*' string but never ended it with a 
  12602. matching '*/'. This means that all code after the comment has been ignored by 
  12603. the compiler.  Reaching an end of file has alerted the compiler to the fact 
  12604. that the comment was not terminated. 
  12605.  
  12606.  
  12607. ΓòÉΓòÉΓòÉ 13.3. DEFMAIN already defined. ΓòÉΓòÉΓòÉ
  12608.  
  12609. You have defined more than one main procedure using the DEFMAIN statement. Only 
  12610. one can be defined at a time. See User's Manual section Definition Primitives 
  12611. for more information. 
  12612.  
  12613.  
  12614. ΓòÉΓòÉΓòÉ 13.4. EX code too big. ΓòÉΓòÉΓòÉ
  12615.  
  12616. The code that ET is producing after compiling your input file is taking up more 
  12617. space than allowable. The maximum amount of memory available for a .EX file is 
  12618. 65,500 bytes. 
  12619.  
  12620.  
  12621. ΓòÉΓòÉΓòÉ 13.5. Expecting '('. ΓòÉΓòÉΓòÉ
  12622.  
  12623. The compiler was expecting a left parenthesis.  Possible reasons for this are 
  12624. that you have called a procedure and omitted the parentheses after the 
  12625. procedure name. The syntax for procedure calls is either: 
  12626.  
  12627.      proc_name([parameters])
  12628.  OR  call proc_name([parameters])
  12629.  
  12630.  
  12631. ΓòÉΓòÉΓòÉ 13.6. Expecting ')'. ΓòÉΓòÉΓòÉ
  12632.  
  12633. The compiler was expecting a right parenthesis to match a left parenthesis 
  12634. which was read in earlier.  Perhaps you have not matched each parenthesis in a 
  12635. procedure call or complex expression.  For example, if the following expression 
  12636. was typed in YOUR_FILE.E:           call proc_test( k=( (a*b)+ 8 ),  you would 
  12637. have received such an error message because there are three left parentheses 
  12638. and only two right parentheses. 
  12639.  
  12640.  
  12641. ΓòÉΓòÉΓòÉ 13.7. Expecting ';'. ΓòÉΓòÉΓòÉ
  12642.  
  12643. The compiler's newline symbol is the semi-colon (';'). Therefore, they are 
  12644. often interchangeable. A statement was encountered whose syntax requires either 
  12645. a semi-colon or a new line in a specific place, but no such semi-colon or new 
  12646. line was found. For example, each INCLUDE statement is required to end with 
  12647. either a semi-colon or a new line. All of the following examples are 
  12648. syntactically correct: 
  12649.  
  12650. include 'mystuff.e' ; include 'mykeys.e'
  12651.  
  12652. AND
  12653.  
  12654. include 'mystuff.e'
  12655. include 'mykeys.e'
  12656.  
  12657. AND
  12658.  
  12659. include 'mystuff.e' ; x = 1
  12660. However, you could not have multiple INCLUDE statements on one line without a 
  12661. semi-colon as separator. 
  12662.  
  12663.  
  12664. ΓòÉΓòÉΓòÉ 13.8. Expecting ','. ΓòÉΓòÉΓòÉ
  12665.  
  12666. A statement has been found whose syntax dictates that there should be a comma 
  12667. in a specific position, yet no comma was found there. The most likely cause of 
  12668. this error message is that you have called some built-in procedure, but have 
  12669. not given the correct number of parameters.  The compiler is looking for a 
  12670. comma which would indicate that there are more parameters still to come. 
  12671.  
  12672.  
  12673. ΓòÉΓòÉΓòÉ 13.9. Expecting '='. ΓòÉΓòÉΓòÉ
  12674.  
  12675. A statement was found whose syntax dictates that an assignment operator must 
  12676. occur at some specific place in the statement, but no such assignment symbol 
  12677. was found.  One example of such a statement is the FOR statement.  As shown in 
  12678. section Conditional and Loop Statements, there must be a '=' symbol immediately 
  12679. after the loop variable name. The other likely causes of this error are syntax 
  12680. errors in a CONST declaration (see Constants). 
  12681.  
  12682.  
  12683. ΓòÉΓòÉΓòÉ 13.10. Expecting an identifier. ΓòÉΓòÉΓòÉ
  12684.  
  12685. A statement has been found whose syntax dictates that there should be an 
  12686. identifier in a specific position, yet no such identifier was found. One 
  12687. possible cause of this error message is that you have defined a keyset with the 
  12688. DEFKEYS keyword, but forgot to name the keyset. See section Key Definitions 
  12689. (DEF and DEFKEYS) for the syntax of the DEFKEYS statement. 
  12690.  
  12691. Another less obvious reason for this error is that you have used a keyword or 
  12692. procedure name in place of an identifier. For example, if you try to declare: 
  12693.  
  12694. UNIVERSAL function_key_text
  12695. Since function_key_text is a predefined universal variable, it is a reserved 
  12696. word, and therefore is not considered an identifier. 
  12697.  
  12698.  
  12699. ΓòÉΓòÉΓòÉ 13.11. Expecting constant expression. ΓòÉΓòÉΓòÉ
  12700.  
  12701. You have begun a constant definition statement by using the CONST keyword, but 
  12702. you have not assigned a constant expression (an expression involving only 
  12703. arithmetic operators, numbers and previously defined constants) to an 
  12704. identifier. Please use the following syntax: 
  12705.  
  12706. CONST
  12707.    max_id=7
  12708.    max_len=max_id * 10
  12709.  
  12710.  
  12711. ΓòÉΓòÉΓòÉ 13.12. Expecting DEFinition primitive. ΓòÉΓòÉΓòÉ
  12712.  
  12713. The compiler is expecting a definition primitive, i.e. one of the DEFxxxx 
  12714. statements, a SET statement, an INCLUDE statement or a CONST statement. 
  12715. Unfortunately, this error message can be triggered at inappropriate times when 
  12716. the compiler is confused by the syntax it has read. This error message often 
  12717. complains about a statement in the middle of a DEF construct. Do not 
  12718. necessarily assume that you need to add a DEF. Each of these cases must be 
  12719. evaluated individually. 
  12720.  
  12721. However, this error message does have value when it reports on a statement that 
  12722. has been issued outside a DEF construct. Remember that you cannot have 
  12723. statements outside a DEFxxxx block. All statements must be contained within a 
  12724. DEFxxxx primitive. Often a statement issued outside a DEF is not reported 
  12725. because since there is no keyword or statement to terminate the DEF, the 
  12726. compiler assumes that the statement belongs to the last DEF. However, there are 
  12727. cases when it will correctly report this error. For example, assume the 
  12728. following statements occur in some file TEST.E: 
  12729.  
  12730. CONST
  12731.    stuff = 1
  12732.  
  12733. sayerror "stuff is " stuff
  12734.  
  12735. defproc test1()
  12736.    temp = 45 * 36
  12737. During compilation of TEST.E, the user would receive an "Expecting DEF" error 
  12738. message with an arrow pointing to the sayerror statement. Since a CONST 
  12739. statement is a DEF primitive, it ends all previous DEFS, and since sayerror is 
  12740. not accepted as part of a CONST construct, an error is reported. 
  12741.  
  12742.  
  12743. ΓòÉΓòÉΓòÉ 13.13. Expecting DO ΓòÉΓòÉΓòÉ
  12744.  
  12745. A WHILE construct has been started, i.e. a WHILE keyword has been found, but 
  12746. the keyword DO is missing from the statement.  Please check the section on 
  12747. Conditional and Loop Statements for the syntax of the WHILE DO statement. 
  12748.  
  12749.  
  12750. ΓòÉΓòÉΓòÉ 13.14. Expecting DO WHILE or DO FOREVER ΓòÉΓòÉΓòÉ
  12751.  
  12752. One of the DO constructs has been started, i.e.  a DO keyword was found, but 
  12753. the rest of the statement's syntax does not fit any of the DO constructs ( DO 
  12754. WHILE, DO FOREVER, and/or DO (FOR) ).  See section Conditional and Loop 
  12755. Statements for the syntax of the DO construct. 
  12756.  
  12757.  
  12758. ΓòÉΓòÉΓòÉ 13.15. Expecting END to DO loop. ΓòÉΓòÉΓòÉ
  12759.  
  12760. One of the DO constructs ( DO-WHILE, DO FOREVER or DO (FOR) ) has been started, 
  12761. but no 'END' or 'ENDDO' statement has been found to end the loop. Please refer 
  12762. to section Conditional and Loop Statements for the syntax of the DO constructs. 
  12763.  
  12764.  
  12765. ΓòÉΓòÉΓòÉ 13.16. Expecting ENDFOR. ΓòÉΓòÉΓòÉ
  12766.  
  12767. A FOR construct has been started, i.e.  a FOR keyword has been found, but no 
  12768. ENDFOR keyword has been found to end the loop. Please check the section on 
  12769. Conditional and Loop Statements for the syntax of the FOR statement. 
  12770.  
  12771.  
  12772. ΓòÉΓòÉΓòÉ 13.17. Expecting ENDIF to terminate IF statement. ΓòÉΓòÉΓòÉ
  12773.  
  12774. An IF keyword has been read, but no ENDIF statement has been found to end the 
  12775. block of statements encased by the IF condition.  See the section on 
  12776. Conditional and Loop Statements for the syntax of the IF statement. 
  12777.  
  12778.  
  12779. ΓòÉΓòÉΓòÉ 13.18. Expecting ENDLOOP to terminate LOOP. ΓòÉΓòÉΓòÉ
  12780.  
  12781. A LOOP construct has been started, but no ENDLOOP statement has been found to 
  12782. end the loop.  See section Conditional and Loop Statements for the syntax of 
  12783. the LOOP construct. 
  12784.  
  12785.  
  12786. ΓòÉΓòÉΓòÉ 13.19. Expecting ENDWHILE to terminate WHILE. ΓòÉΓòÉΓòÉ
  12787.  
  12788. A WHILE construct has been started, but no ENDWHILE statement has been found to 
  12789. end the loop. Please refer to section Conditional and Loop Statements for the 
  12790. syntax of the WHILE construct. 
  12791.  
  12792.  
  12793. ΓòÉΓòÉΓòÉ 13.20. Expecting procedure name. ΓòÉΓòÉΓòÉ
  12794.  
  12795. A procedure definition has been started, i.e. a DEFPROC keyword has been found, 
  12796. but no procedure name appeared after it to identify the procedure. Please see 
  12797. the section on Definition Primitives for the syntax of a DEFPROC statement. 
  12798.  
  12799.  
  12800. ΓòÉΓòÉΓòÉ 13.21. Expecting quoted string. ΓòÉΓòÉΓòÉ
  12801.  
  12802. A statement was found whose syntax dictates that a quoted string must occur at 
  12803. some specific place in the statement, but no such quoted string was found. An 
  12804. example of such a statement is the SAY statement. As shown in section Built-in 
  12805. Statements and Procedures, there must be a quoted string immediately after the 
  12806. SAY keyword. 
  12807.  
  12808.  
  12809. ΓòÉΓòÉΓòÉ 13.22. Expecting THEN. ΓòÉΓòÉΓòÉ
  12810.  
  12811. An IF construct has been started, i.e.  an IF keyword was found, but no THEN 
  12812. keyword can been found.  See section Conditional and Loop Statements for the 
  12813. syntax of the IF-THEN-ELSE statement. 
  12814.  
  12815.  
  12816. ΓòÉΓòÉΓòÉ 13.23. Expecting TO. ΓòÉΓòÉΓòÉ
  12817.  
  12818. A FOR construct has been started, i.e. a FOR keyword has been found, but the 
  12819. keyword TO is missing from the statement.  Please check the section Conditional 
  12820. and Loop Statements for the syntax of the FOR statement. 
  12821.  
  12822.  
  12823. ΓòÉΓòÉΓòÉ 13.24. Expecting VALUE. ΓòÉΓòÉΓòÉ
  12824.  
  12825. A PARSE statement has been started, i.e. the keyword PARSE was found, but 
  12826. neither a VALUE nor an ARG keyword can been found.  See the User's Manual 
  12827. section The Parse Statement for the syntax of the PARSE statement. 
  12828.  
  12829.  
  12830. ΓòÉΓòÉΓòÉ 13.25. Expecting variable name. ΓòÉΓòÉΓòÉ
  12831.  
  12832. A statement was found whose syntax dictates that a variable name must occur at 
  12833. some specific place in the statement, but no such variable name was found. An 
  12834. example of such a statement is the FOR statement. As shown in the section on 
  12835. Conditional and Loop Statements, there must be a variable name (the loop 
  12836. variable to be incremented) immediately after the FOR keyword. 
  12837.  
  12838.  
  12839. ΓòÉΓòÉΓòÉ 13.26. Expecting WITH. ΓòÉΓòÉΓòÉ
  12840.  
  12841. A PARSE-VALUE statement has been started, i.e.  the keywords PARSE and VALUE 
  12842. were found, but a WITH keyword cannot be found.  See the section on The Parse 
  12843. Statement for the syntax of the PARSE statement. 
  12844.  
  12845.  
  12846. ΓòÉΓòÉΓòÉ 13.27. Expression not assignment compatible. ΓòÉΓòÉΓòÉ
  12847.  
  12848. The compiler has detected an assignment in which the expression on the right 
  12849. side of the assignment operator can not be assigned to the expression or 
  12850. identifier on the left side.  The most common cause of this is that you have 
  12851. tried to assign a value to something other than a variable, i.e. a constant or 
  12852. procedure. 
  12853.  
  12854.  
  12855. ΓòÉΓòÉΓòÉ 13.28. Expression too complex. ΓòÉΓòÉΓòÉ
  12856.  
  12857. An expression is any combination of identifiers (variables, constants, and/or 
  12858. procedures), numbers and operators that fit the syntax of a language. A complex 
  12859. expression is one that contains expressions within itself. For example, the 
  12860. following is an expression: 
  12861.  
  12862. test_var + 6.
  12863. An example of a complex expression would be: 
  12864.  
  12865. ( (test_var + 6) * 8).
  12866. Each of the innermost expressions must be evaluated before the entire 
  12867. expression can be assigned a value.  The specified expression in your input 
  12868. file is too complicated, i.e.  has too many expressions within itself, for the 
  12869. compiler to evaluate it.  Please break the expression into several less complex 
  12870. expressions.  For example, let us assume that the following expression was too 
  12871. complex: 
  12872.  
  12873. call proc_test( k=( (a*b)+ 8 ) ),
  12874. You could simplify the call to proc_test by assigning some of the inner 
  12875. expressions to temporary variables.  One solution would be: 
  12876.  
  12877. temp1 = a*b
  12878. k = temp1 + 8
  12879. call proc_test(k)
  12880. Note: The above expression is a simple example. It is not too complex for the 
  12881. compiler. ET allows for 40 expressions within an expression. 
  12882.  
  12883.  
  12884. ΓòÉΓòÉΓòÉ 13.29. Extraneous parameters. ΓòÉΓòÉΓòÉ
  12885.  
  12886. You have specified too many parameters in the command dialog box.  The syntax 
  12887. is:      ET [options] inputfile[.e] [outputfile[.ex]]  Remember that any 
  12888. options MUST PRECEDE the input and output filenames! 
  12889.  
  12890.  
  12891. ΓòÉΓòÉΓòÉ 13.30. Identifier already defined as same or different type. ΓòÉΓòÉΓòÉ
  12892.  
  12893. You are trying to use an identifier to name a variable, constant or procedure 
  12894. uniquely, yet the identifier has already been used in the same scope for 
  12895. another purpose. Check over your program and rename the appropriate 
  12896. identifiers. 
  12897.  
  12898.  
  12899. ΓòÉΓòÉΓòÉ 13.31. Identifier too long. ΓòÉΓòÉΓòÉ
  12900.  
  12901. The number of characters in the name of the specified variable, constant, 
  12902. procedure, etc. exceeds the maximum allowance of 255 characters. Please rename 
  12903. it with fewer letters and/or numbers. 
  12904.  
  12905.  
  12906. ΓòÉΓòÉΓòÉ 13.32. Illegal character. ΓòÉΓòÉΓòÉ
  12907.  
  12908. This character does not make sense or is not allowed in the E language. One 
  12909. example of E code which would yield this error message is if a unary minus or 
  12910. plus operator is used preceding an alphabetic character rather than a digit. 
  12911. For example, 
  12912.  
  12913. temp = +c
  12914. These unary operators make sense only with numeric operands. 
  12915.  
  12916.  
  12917. ΓòÉΓòÉΓòÉ 13.33. Illegal operator. ΓòÉΓòÉΓòÉ
  12918.  
  12919. An operator is some function to be performed on its operands. Operands are 
  12920. identifiers or constant values that are acted upon by operators.  Examples of 
  12921. operators are: '+' (addition), '=' (assignment), 'NOT' (logical negation), and 
  12922. '<=' (less than or equal). The operator you have specified does not exist in 
  12923. the E language. Please check the Operators section for a complete list of 
  12924. operators. 
  12925.  
  12926.  
  12927. ΓòÉΓòÉΓòÉ 13.34. INCLUDES nested too deep. ΓòÉΓòÉΓòÉ
  12928.  
  12929. A nested INCLUDE statement means that a file, for example FILE1.E, contains a 
  12930. statement:           include 'file2.e'  and that file2.e also contains an 
  12931. INCLUDE statement, which includes a third file. ET only allows for 5 levels of 
  12932. nested include files. You have exceeded this limit. Please reorganize your 
  12933. files. 
  12934.  
  12935.  
  12936. ΓòÉΓòÉΓòÉ 13.35. Internal error in POPS. ΓòÉΓòÉΓòÉ
  12937.  
  12938. This error is internal to the workings of the ET compiler. It has nothing to do 
  12939. with user input. Please send a note to the userid EOS2 at YORKTOWN with 
  12940. information regarding the error. 
  12941.  
  12942.  
  12943. ΓòÉΓòÉΓòÉ 13.36. Invalid argument. ΓòÉΓòÉΓòÉ
  12944.  
  12945. The argument specified in the procedure call is incorrect. Specifically, the 
  12946. string argument in the SAYERROR() procedure call does not match any of the 
  12947. strings associated with error messages known to the compiler. Read the 
  12948. description of the usage of the SAYERROR() procedure in section Built-in 
  12949. Statements and Procedures for more information. 
  12950.  
  12951.  
  12952. ΓòÉΓòÉΓòÉ 13.37. Invalid color. ΓòÉΓòÉΓòÉ
  12953.  
  12954. You are trying to redefine the colors of the E editor; however the syntax of 
  12955. your statement is incorrect.  Possible explanations of this are that: (1) you 
  12956. have not used an identifier to name the constant, (2) you have not used a valid 
  12957. color value name, or (3) you have not separated each assignment with either a 
  12958. semi-colon or a new line. An example of the syntax is:    /* color example */ 
  12959. TEXTCOLOR   = BLUE  For more information on usage, see section Changing the 
  12960. Default Configuration in The EPM User's Guide. For a list of valid color value 
  12961. names, see the top of the COLORS.E file which contains the values of the 
  12962. defaults. 
  12963.  
  12964.  
  12965. ΓòÉΓòÉΓòÉ 13.38. Invalid cursor setting. ΓòÉΓòÉΓòÉ
  12966.  
  12967. You are trying to set the default cursor sizes, but the values you have given 
  12968. in the set cursors statement are not valid. Valid values are 1 through 15. 
  12969.  
  12970.  
  12971. ΓòÉΓòÉΓòÉ 13.39. Invalid expression. ΓòÉΓòÉΓòÉ
  12972.  
  12973. This expression is not a valid expression in the E language. Please refer to E 
  12974. Language Syntax for a list of all valid expressions. 
  12975.  
  12976.  
  12977. ΓòÉΓòÉΓòÉ 13.40. Invalid field name. ΓòÉΓòÉΓòÉ
  12978.  
  12979. You have attempted to manipulate a field in the fileid structure; however the 
  12980. field you have named does not exist. Check section Fileid Structure for a list 
  12981. of all field names. 
  12982.  
  12983.  
  12984. ΓòÉΓòÉΓòÉ 13.41. Invalid key name. ΓòÉΓòÉΓòÉ
  12985.  
  12986. A KEY keyword has been found, but no valid keyname followed the keyword. There 
  12987. are a limited number of keys on the keyboard that can be redefined. For a 
  12988. complete list of those keys, see E Language Syntax. 
  12989.  
  12990.  
  12991. ΓòÉΓòÉΓòÉ 13.42. Invalid margin setting. ΓòÉΓòÉΓòÉ
  12992.  
  12993. You are trying to reset the margins for the E editor, but the column values of 
  12994. your desired margin settings are invalid. Possible causes of this error are 
  12995. that you have tried: (1) to set a margin past E's maximum margin column (254), 
  12996. (2) to set a margin in a zero or negative column, or (3) to set the left margin 
  12997. in a column greater than the right margin. Please refer to The EPM User's Guide 
  12998. for examples of the correct syntax. 
  12999.  
  13000.  
  13001. ΓòÉΓòÉΓòÉ 13.43. Invalid number of parameters. ΓòÉΓòÉΓòÉ
  13002.  
  13003. You have called a procedure with fewer parameters than it is defined to have. 
  13004. For example, in the section Built-in Statements and Procedures, look at the 
  13005. description of the procedure SUBSTR(). SUBSTR() is defined to have two, three 
  13006. or four parameters, but it requires AT LEAST two parameters to perform its 
  13007. function.  If the user invokes the function with only one argument, for example 
  13008. SUBSTR('abc'), an error will occur. 
  13009.  
  13010.  
  13011. ΓòÉΓòÉΓòÉ 13.44. Invalid numeric. ΓòÉΓòÉΓòÉ
  13012.  
  13013. You have attempted to perform some arithmetic function on variables that are 
  13014. not numeric; or you have mixed other characters in with some digits. For 
  13015. example, 35.x or 3temp_var are not valid expressions. The compiler expects 
  13016. identifiers to BEGIN WITH AN ALPHABETIC CHARACTER, and expects numbers to 
  13017. consist solely of digits and certain special characters (for example, the 
  13018. decimal point "."). 
  13019.  
  13020.  
  13021. ΓòÉΓòÉΓòÉ 13.45. Invalid option. ΓòÉΓòÉΓòÉ
  13022.  
  13023. You have specified an option in the command dialog box which does not exist. 
  13024. Check The EPM User's Guide or section Command Summary for all possible command 
  13025. dialog box options. 
  13026.  
  13027.  
  13028. ΓòÉΓòÉΓòÉ 13.46. Invalid set name. ΓòÉΓòÉΓòÉ
  13029.  
  13030. You are trying to set a configurable option for the E editor, but the option 
  13031. you have named in the SET statement does not exist. Please check The EPM User's 
  13032. Guide for a complete list of options. 
  13033.  
  13034.  
  13035. ΓòÉΓòÉΓòÉ 13.47. Invalid tab setting. ΓòÉΓòÉΓòÉ
  13036.  
  13037. You are trying to reset the tabs for the E editor, but the column values of 
  13038. your desired tab settings are invalid. Possible causes of this error are that: 
  13039. (1) you have tried to set a tab past E's maximum column (255), (2) you have 
  13040. tried to set a tab in a negative column, or (3) you have not typed the tab 
  13041. settings in ascending order. Tab settings CANNOT be listed in a mixed order, 
  13042. for example:           tabs 5 10 20 15 30 25 ...  They must be written in 
  13043. ascending order. In the above example, the statement must be rewritten as 
  13044. follows:           tabs 5 10 15 20 25 30 ... 
  13045.  
  13046.  
  13047. ΓòÉΓòÉΓòÉ 13.48. ITERATE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  13048.  
  13049. An ITERATE statement has been issued outside one of the loop constructs (WHILE, 
  13050. LOOP, or DO).  Since the ITERATE statement only makes sense in combination with 
  13051. a loop, this is an error. See section Conditional and Loop Statements for the 
  13052. rules governing and syntax of the ITERATE statement. 
  13053.  
  13054.  
  13055. ΓòÉΓòÉΓòÉ 13.49. Keyset not defined. ΓòÉΓòÉΓòÉ
  13056.  
  13057. You have issued a KEYS statement to change the keyset to a predefined keyset; 
  13058. however the named keyset has not been defined in the current scope. In order to 
  13059. use a KEYS keyset_name statement, you must have issued a DEFKEYS keyset_name 
  13060. statement to define the named keyset and then issued a series of DEF statements 
  13061. to define the new function of the desired keys.  A sample keyset definition can 
  13062. be found in section Key Definitions (DEF and DEFKEYS). 
  13063.  
  13064.  
  13065. ΓòÉΓòÉΓòÉ 13.50. LEAVE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  13066.  
  13067. A LEAVE statement has been issued outside one of the loop constructs (WHILE, 
  13068. LOOP, or DO).  Since the LEAVE statement only makes sense in combination with a 
  13069. loop, this is an error.  See section on Conditional and Loop Statements for the 
  13070. rules governing and syntax of the LEAVE statement. 
  13071.  
  13072.  
  13073. ΓòÉΓòÉΓòÉ 13.51. Line too long. ΓòÉΓòÉΓòÉ
  13074.  
  13075. The number of characters in this line exceeds the maximum. The maximum line 
  13076. length is 255 characters. Please break-up the line using the technique 
  13077. discussed in section Line Continuations. 
  13078.  
  13079.  
  13080. ΓòÉΓòÉΓòÉ 13.52. More than max number of global variables. ΓòÉΓòÉΓòÉ
  13081.  
  13082. You have defined more global variables than the compiler allows. The maximum 
  13083. number of global variables is 8200.  Note Any variable preceded by the 
  13084. UNIVERSAL keyword is considered global, i.e. any procedure can access it. 
  13085.  
  13086.  
  13087. ΓòÉΓòÉΓòÉ 13.53. More than max number of local variables. ΓòÉΓòÉΓòÉ
  13088.  
  13089. Your procedure has been defined with more than the compiler's maximum number of 
  13090. allowable local variables, i.e. variables defined within the procedure.  The 
  13091. maximum number of locals is 1038. 
  13092.  
  13093.  
  13094. ΓòÉΓòÉΓòÉ 13.54. Not enough core. ΓòÉΓòÉΓòÉ
  13095.  
  13096. Your computer does not have enough core memory (primary memory not disk space) 
  13097. to compile the specified input file and write compiled code to an output file. 
  13098. Typically, 320K of memory is required; however if you have added a great amount 
  13099. of code to the e.e file, more memory may be necessary. 
  13100.  
  13101.  
  13102. ΓòÉΓòÉΓòÉ 13.55. Number out of range or expecting number. ΓòÉΓòÉΓòÉ
  13103.  
  13104. This error could occur for a few different reasons. The first possible cause of 
  13105. the error is incorrect syntax or semantics in a parse statement. If a '+' or 
  13106. '-' was encountered in the template portion of a PARSE statement, a number is 
  13107. expected to follow it. Either a number did not follow one of these operators or 
  13108. the number that did follow exceeded 255. Remember that the numbers in the 
  13109. template represent column specifications and therefore cannot exceed the 
  13110. maximum column. Please see section The Parse Statement for the exact syntax of 
  13111. the parse statement. 
  13112.  
  13113. Another possible cause of this error is that an arithmetic operator symbol was 
  13114. found in an expression, and yet all of the operands were either not numeric or 
  13115. exceeded the compiler's maximum number of 32,767. 
  13116.  
  13117.  
  13118. ΓòÉΓòÉΓòÉ 13.56. Number too large. ΓòÉΓòÉΓòÉ
  13119.  
  13120. This error occurs only when the compiler is translating ASCII codes preceded by 
  13121. the '\' operator. Values following such a '\' cannot exceed 255. See section 
  13122. String Expressions for a more detailed explanation of this use of the backslash 
  13123. character. 
  13124.  
  13125.  
  13126. ΓòÉΓòÉΓòÉ 13.57. Numeric overflow. ΓòÉΓòÉΓòÉ
  13127.  
  13128. You have attempted to perform some arithmetic function where the result has an 
  13129. exponent greater than 999999999. 
  13130.  
  13131.  
  13132. ΓòÉΓòÉΓòÉ 13.58. Out of symbol table space. ΓòÉΓòÉΓòÉ
  13133.  
  13134. The compiler allocates a certain amount of memory space for each variable. The 
  13135. space is needed to store necessary information relevant to that variable. 
  13136. There is not enough primary memory (not disk space) on your computer to allow 
  13137. any more variables to be used. 
  13138.  
  13139.  
  13140. ΓòÉΓòÉΓòÉ 13.59. Procedure not defined. ΓòÉΓòÉΓòÉ
  13141.  
  13142. You have called or made reference to a procedure which was never defined. 
  13143. Please define the procedure or delete the call to it.  Note: the compiler will 
  13144. not tell you where the call to the undefined procedure occurred or whether 
  13145. there are many such occurrences. 
  13146.  
  13147.  
  13148. ΓòÉΓòÉΓòÉ 13.60. String not terminated. ΓòÉΓòÉΓòÉ
  13149.  
  13150. The specified string was not enclosed with quote marks. The final quote was 
  13151. omitted. 
  13152.  
  13153.  
  13154. ΓòÉΓòÉΓòÉ 13.61. Too many arguments. ΓòÉΓòÉΓòÉ
  13155.  
  13156. You have defined a procedure or function with more than the compiler's maximum 
  13157. number of allowable arguments. The maximum number of arguments is 8. 
  13158.  
  13159.  
  13160. ΓòÉΓòÉΓòÉ 13.62. Unable to open input file. ΓòÉΓòÉΓòÉ
  13161.  
  13162. The compiler could not open the file which you listed in the command dialog box 
  13163. as the input file.  This is probably due to the fact that no such file exists. 
  13164. Check your spelling of the filename and make sure the file is in the current 
  13165. directory. 
  13166.  
  13167.  
  13168. ΓòÉΓòÉΓòÉ 13.63. Unable to open output file. ΓòÉΓòÉΓòÉ
  13169.  
  13170. The compiler cannot create the file you named in the command dialog box as the 
  13171. output file. This probably occurred because you gave a nonexistent path to the 
  13172. file. Check the spelling and accuracy of the pathname. (The default pathname is 
  13173. the current directory.) 
  13174.  
  13175.  
  13176. ΓòÉΓòÉΓòÉ 13.64. Unable to read input file. ΓòÉΓòÉΓòÉ
  13177.  
  13178. The compiler was unable to read from the input file you specified in the 
  13179. command dialog box. This maybe due to the fact that the file is locked or 
  13180. damaged. Please check the file. 
  13181.  
  13182.  
  13183. ΓòÉΓòÉΓòÉ 13.65. Unable to write output file. ΓòÉΓòÉΓòÉ
  13184.  
  13185. The compiler cannot write to the file you named in the command line as the 
  13186. output file.  This error could occur because the file is read-only or because 
  13187. no space is left on the disk. 
  13188.  
  13189.  
  13190. ΓòÉΓòÉΓòÉ 13.66. Variable not initialized. ΓòÉΓòÉΓòÉ
  13191.  
  13192. You have used a variable which was never initialized.  The variable has no 
  13193. value; therefore the expression containing it cannot be evaluated. 
  13194.  
  13195. Another common cause for this error is when a command has been issued within an 
  13196. E statement, but the command has not been quoted. Please read the section Using 
  13197. EPM Commands in E Statements for information on how to use commands in an E 
  13198. program. 
  13199.  
  13200.  
  13201. ΓòÉΓòÉΓòÉ 14. Ordinal Values of Functions Accessed via DOSCALLS.DLL ΓòÉΓòÉΓòÉ
  13202.  
  13203. This list shows the mapping between the DOS system function names and their 
  13204. ordinal values.  In order to access one of these system functions in OS/2, you 
  13205. must make a call to the function DYNALINK(), and include the function's ordinal 
  13206. value in the parameter list.  For more information, see the DYNALINK() entry in 
  13207. section Built-in Statements and Procedures. 
  13208.  
  13209. Function Name                   Ordinal Value
  13210. -------------                   -------------
  13211. DBGETKVAR                           109
  13212. DBGETOWNER                          117
  13213. DBMEMFREE                           116
  13214. DBMEMLOCK                           112
  13215. DBMEMREALLOC                        115
  13216. DBMEMUNLOCK                         113
  13217. DBPHYSINFO                          118
  13218. DBSEGALLOC                          114
  13219. DOSALLOCHUGE                         40
  13220. DOSALLOCSEG                          34
  13221. DOSALLOCSHRSEG                       35
  13222. DOSBEEP                              50
  13223. DOSBUFRESET                          56
  13224. DOSCALLBACK                         157
  13225. DOSCHDIR                             57
  13226. DOSCHGFILEPTR                        58
  13227. DOSCLIACCESS                         51
  13228. DOSCLOSE                             59
  13229. DOSCLOSESEM                          23
  13230. DOSCREATECSALIAS                     43
  13231. DOSCREATESEM                         24
  13232. DOSCWAIT                              2
  13233. DOSDELETE                            60
  13234. DOSDEVCONFIG                         52
  13235. DOSDEVIOCTL                          53
  13236. DOSDEVIOCTL2                         99
  13237. DOSDUPHANDLE                         61
  13238. DOSENTERCRITSEC                       3
  13239. DOSENUMATTRIBUTE                    204
  13240. DOSERROR                            120
  13241. DOSEXIT                               5
  13242. DOSEXITCRITSEC                        6
  13243. DOSEXITLIST                           7
  13244. DOSFILELOCKS                         62
  13245. DOSFINDCLOSE                         63
  13246. DOSFINDFIRST                         64
  13247. DOSFINDNEXT                          65
  13248.  
  13249. DOSFLAGPROCESS                       15
  13250. DOSFREEMODULE                        46
  13251. DOSFREESEG                           39
  13252. DOSGETCP                            130
  13253. DOSGETDATETIME                       33
  13254. DOSGETENV                            91
  13255. DOSGETHUGESHIFT                      41
  13256. DOSGETINFOSEG                         8
  13257. DOSGETMACHINEMODE                    49
  13258. DOSGETMODHANDLE                      47
  13259. DOSGETMODNAME                        48
  13260. DOSGETPID                            94
  13261. DOSGETPROCADDR                       45
  13262. DOSGETPRTY                            9
  13263. DOSGETSEG                           121
  13264. DOSGETSHRSEG                         36
  13265. DOSGETSTDA                          119
  13266. DOSGETVERSION                        92
  13267. DOSGIVESEG                           37
  13268. DOSGLOBALSEG                        132
  13269. DOSHOLDSIGNAL                        13
  13270. DOSHUGEINCR                         136
  13271. DOSHUGESHIFT                        135
  13272. DOSICANONICALIZE                    100
  13273. DOSICREATETHREAD                      1
  13274. DOSIEXECPGM                           4
  13275. DOSIRAMSEMWAKE                      125
  13276. DOSIREAD                             79
  13277. DOSISEMREQUEST                       18
  13278. DOSISEMWAIT                          21
  13279. DOSISETCP                           131
  13280. DOSISYSSEMCLEAR                      17
  13281. DOSISYSSEMSET                        19
  13282. DOSIWRITE                            87
  13283. DOSKILLPROCESS                       10
  13284. DOSLIBINIT                           96
  13285. DOSLOADMODULE                        44
  13286. DOSLOCKSEG                          122
  13287. DOSMAKEPIPE                          16
  13288. DOSMEMAVAIL                         127
  13289. DOSMKDIR                             66
  13290. DOSMOVE                              67
  13291. DOSMUXSEMWAIT                        22
  13292. DOSNEWSIZE                           68
  13293. DOSOPEN                              70
  13294. DOSOPEN2                             95
  13295. DOSOPENSEM                           25
  13296. DOSPHYSICALDISK                     129
  13297. DOSQPATHINFO                         98
  13298. DOSSETPATHINFO                      104
  13299. DOSPOKETESTDAEMON                   104
  13300. DOSPORTACCESS                        69
  13301. DOSPROFILE                          133
  13302. DOSPTRACE                            12
  13303. DOSQCURDIR                           71
  13304. DOSQCURDISK                          72
  13305. DOSQFHANDSTATE                       73
  13306. DOSQFILEINFO                         74
  13307. DOSQFILEMODE                         75
  13308. DOSQFSINFO                           76
  13309. DOSQHANDTYPE                         77
  13310. DOSQPROCSTATUS                      154
  13311. DOSQTRACEINFO                        93
  13312. DOSQVERIFY                           78
  13313. DOSREADPHYS                         103
  13314. DOSREALLOCHUGE                       42
  13315. DOSREALLOCSEG                        38
  13316. DOSRESUMETHREAD                      26
  13317. DOSRMDIR                             80
  13318. DOSSELECTDISK                        81
  13319. DOSSEMSETWAIT                        20
  13320. DOSSENDSIGNAL                       134
  13321. DOSSETCP                            153
  13322. DOSSETDATETIME                       28
  13323. DOSSETFGND                          101
  13324. DOSSETFHANDSTATE                     82
  13325. DOSSETFILEINFO                       83
  13326. DOSSETFILEMODE                       84
  13327. DOSSETFSINFO                         97
  13328. DOSSETINFOSEG                       128
  13329. DOSSETMAXFH                          85
  13330. DOSSETPRTY                           11
  13331. DOSSETSIGHANDLER                     14
  13332. DOSSETVEC                            89
  13333. DOSSETVERIFY                         86
  13334. DOSSGSWITCH                          54
  13335. DOSSGSWITCHME                        55
  13336. DOSSGSWITCHPROC                     124
  13337. DOSSICG                              95
  13338. DOSSIZESEG                          126
  13339. DOSSLEEP                             32
  13340. DOSSUSPENDTHREAD                     27
  13341. DOSSWAPTASKINIT                     102
  13342. DOSSYSTEMSERVICE                     88
  13343. DOSSYSTRACE                          90
  13344. DOSTIMERASYNC                        29
  13345. DOSTIMERSTART                        30
  13346. DOSTIMERSTOP                         31
  13347. DOSUNLOCKSEG                        123
  13348. GETADDR                             111
  13349. GETHEADERS                          108
  13350. GETSELADDR                          110
  13351. PANICWRITE                          105
  13352. STRUCHECK                           106
  13353. STRURESUPDATE                       107
  13354. UNUSEDA                              98
  13355. UNUSEDB                              99
  13356.  
  13357. The following Operating System entry points are defined in the library 
  13358. DOSCALL1. In this case, the procedures must be called by name rather than 
  13359. ordinal value. For an example of this usage, see the explanation of the 
  13360. DYNALINK() function. 
  13361.  
  13362. DOSREAD
  13363. DOSWRITE
  13364. DOSERRCLASS
  13365. DOSSEMREQUEST
  13366. DOSSEMCLEAR
  13367. DOSSEMWAIT
  13368. DOSSEMSET
  13369. DOSEXECPGM
  13370. DOSCREATETHREAD
  13371. DOSSUBSET
  13372. DOSSUBALLOC
  13373. DOSSUBFREE
  13374. DOSREADASYNC
  13375. DOSWRITEASYNC
  13376. DOSSEARCHPATH
  13377. DOSSCANENV
  13378.  
  13379.  
  13380. ΓòÉΓòÉΓòÉ 15. Advanced Compiler Features ΓòÉΓòÉΓòÉ
  13381.  
  13382. Advanced compiler features. 
  13383.  
  13384.  
  13385. ΓòÉΓòÉΓòÉ 15.1. Compile time variables ΓòÉΓòÉΓòÉ
  13386.  
  13387. Compile time variables. 
  13388.  
  13389.  
  13390. ΓòÉΓòÉΓòÉ 15.1.1. Definition ΓòÉΓòÉΓòÉ
  13391.  
  13392. E provides certain language extensions and configuration options by means of a 
  13393. single pass symbol table access facility. This means that the macro programmer 
  13394. can assign a compile time variable and later test the value of that variable. 
  13395.  
  13396.  
  13397. ΓòÉΓòÉΓòÉ 15.1.2. Advantages ΓòÉΓòÉΓòÉ
  13398.  
  13399. The usage of compile time variables can aid in the portability of the macro 
  13400. language. This means that one set of macros can be used in DOS, OS/2, and the 
  13401. Presentation Manager environments. For examples of this see the current 
  13402. E-macros. By testing the version, the compiler can know which code to include. 
  13403. This means later versions can make use of the newest features while still 
  13404. maintain compatibility with older versions of the E family of editors. 
  13405.  
  13406. The usage of compile time variables saves disk space.  The reason for this is 
  13407. that universal variables must be actually saved on the disk in the resultant 
  13408. .EX file.  Compile-time variables are saved in far memory while the translation 
  13409. process executes and are freed when the translation process ends. 
  13410.  
  13411.  
  13412. ΓòÉΓòÉΓòÉ 15.1.3. Compile-time variable assignment ΓòÉΓòÉΓòÉ
  13413.  
  13414. We allow a compile-time variable assignment by means of the define statement in 
  13415. the macro language. An example of such as assignment is the following: 
  13416.  
  13417. define compile_variable = 'this is a compile-time variable'
  13418.  
  13419. In addition, the C preprocessor #define is supported, in order to allow sharing 
  13420. *.H files between C code and E macro code. 
  13421.  
  13422. #define MB_OK         0000
  13423. #define MB_OKCANCEL   0001
  13424.  
  13425. Note:  Starting with EPM 6.03 in May, 1995, the letter L may immediately follow 
  13426.        a numeric constant on a #define statement, and will be ignored.  This is 
  13427.        to allow sharing *.H files containing definitions such as: 
  13428.  
  13429.               #define WS_VISIBLE    0x80000000L
  13430.               #define WS_DISABLED   0x40000000L
  13431.  
  13432.  
  13433. ΓòÉΓòÉΓòÉ 15.1.4. Compile-time variable and conditional compilation ΓòÉΓòÉΓòÉ
  13434.  
  13435. Compile-time variables can be used in concert with the translator's compile if 
  13436. statements to provide a powerful conditional compilation facility.  An example 
  13437. of the usage of compile if is the following: 
  13438.  
  13439. compile if compile_variable = 'this is a compile-time variable'
  13440.   sayerror 'compile_variable exists'
  13441. compile else
  13442.   sayerror 'compile_variable does not exists'
  13443. compile endif
  13444.  
  13445.  
  13446. ΓòÉΓòÉΓòÉ 15.1.5. Compile `defined' test ΓòÉΓòÉΓòÉ
  13447.  
  13448. In addition to the straightforward test of a compile-time variable value,  we 
  13449. can also test whether a variable is defined or not. This is useful in cases 
  13450. where the macro programmer does not wish to expressly assign a value to a 
  13451. compile-time variable, but simply would like to know if the variable has any 
  13452. value.  For example: 
  13453.  
  13454. compile if defined(compile_variable)
  13455.   sayerror 'compile_variable is defined'
  13456. compile else
  13457.   sayerror 'compile_variable is not defined'
  13458. compile endif
  13459.  
  13460.  
  13461. ΓòÉΓòÉΓòÉ 15.1.6. Text replacement ΓòÉΓòÉΓòÉ
  13462.  
  13463. A powerful text replacement function is part of the translator language. This 
  13464. text replacement option allows one to literally change the text upon which the 
  13465. translator is operating during the translation process. The text replacement 
  13466. option is initiated when the translator encounters a '$' (dollar sign). When 
  13467. the text replacement character is encountered the translator  places the value 
  13468. of the compile-time variable that follows the '$' into a text buffer and begins 
  13469. to use the that buffer as the input buffer to the translator. When the buffer 
  13470. is empty, we switch back to the previous translation buffer. For example: 
  13471.  
  13472. define sayinformation = 'sayerror'
  13473. $sayinformation 'this is information'
  13474.  
  13475. In the preceding example,  we have defined our own language extension. The 
  13476. example is equivalent to the standard E code of: 
  13477.  
  13478. sayerror 'this is information'
  13479.  
  13480.  
  13481. ΓòÉΓòÉΓòÉ 16. Toolbar ΓòÉΓòÉΓòÉ
  13482.  
  13483. EPM version 6 introduces a user-configurable Toolbar, using the UCMENUS package 
  13484. (which EPM uses as ETKUCMS.DLL). The built-in toolbar is defined in the macros. 
  13485. The user can configure the toolbar to execute any of the available toolbar 
  13486. actions, which are defined in the *.ex files listed in the ACTIONS.LST file, or 
  13487. any other EPM or OS/2 command by selecting either * or ExecuteProgram as the 
  13488. action to be executed.  * executes its parameter as though it were entered on 
  13489. the EPM command line, while for ExecuteProgram, the parameters are executed 
  13490. directly by the UCMENUS code as an external program. 
  13491.  
  13492. See the following sections for additional information. 
  13493.  
  13494. o Building a toolbar from the macros 
  13495.  
  13496. o The ACTIONS.LST file 
  13497.  
  13498. o Creating a toolbar actions file 
  13499.  
  13500.  
  13501. ΓòÉΓòÉΓòÉ 16.1. Building a toolbar from the macros ΓòÉΓòÉΓòÉ
  13502.  
  13503. The default toolbar is built in STDCTRL.E, in the loaddefaulttoolbar command. A 
  13504. toolbar is another type of menu, and as such is built using the buildsubmenu 
  13505. opcode. The first paramater to buildsubmenu consists of a delimiter character, 
  13506. the button text, the delimiter, the button bitmap (the name of a *.BMP file, or 
  13507. a number corresponding to a built-in resource ID), the delimiter, the command 
  13508. to be executed, the delimiter, the command's parameters (if any), the 
  13509. delimiter, and the name of the *.ex file in which the command is defined. 
  13510.  
  13511.  
  13512. ΓòÉΓòÉΓòÉ 16.2. The ACTIONS.LST file ΓòÉΓòÉΓòÉ
  13513.  
  13514. The ACTIONS.LST file contains a list of actions files. When the user selects 
  13515. Edit item from the toolbar's pop-up menu, the LOAD_ACTIONS command (defined in 
  13516. STDCTRL.E) is executed.  The first time it is executed, the ACTIONS.LST file is 
  13517. searched for (using findfile with the 'D' option) and loaded.  Each line in the 
  13518. file contains the name of an actions file. For each line, the corresponding 
  13519. action_name.ex file is linked, the action_name_actionlist command is executed 
  13520. to obtain a list of actions defined in that file, and the .ex file is unlinked. 
  13521. The resulting list of available actions is passed to the UCMENUS code, which 
  13522. uses it to fill the Function listbox on the Action page of the configuration 
  13523. dialog. 
  13524.  
  13525.  
  13526. ΓòÉΓòÉΓòÉ 16.3. Creating a toolbar actions file ΓòÉΓòÉΓòÉ
  13527.  
  13528. A toolbar actions file is simply a filename.ex file which contains a 
  13529. filename_actionlist command.  When a list of actions is generated, the 
  13530. filename_actionlist command is executed, and it adds one line for each action 
  13531. it defines to the file whose fileid is contained in the universal variable 
  13532. ActionsList_FileID.  Each line added consists of a delimiter character, the 
  13533. name of the action, the delimiter, a string to go in the Function description 
  13534. section of the Action page of the Toolbar's configuration dialog, the 
  13535. delimiter, and finally the name of the .ex file in which the action command is 
  13536. defined. 
  13537.  
  13538. An action command is a normal DEFC, but it must expect to be invoked by way of 
  13539. the toolbar.  This is because the action command is passed a parameter 
  13540. consisting of a letter, possibly followed by a space and then the parameters 
  13541. entered in the Parameters field of the Action page of the Toolbar's 
  13542. configuration dialog.  The possible values for the letter are: 
  13543.  
  13544. I   Initialized - the toolbar button has been depressed.  A prompt may be 
  13545.     given, indicating what action will be performed if this toolbar item is 
  13546.     selected, but no other action should be performed. 
  13547.  
  13548. S   Selected - the toolbar button has been selected.  The action associated 
  13549.     with this button should be performed. 
  13550.  
  13551. E   Ended - either the initialization or selection has ended.  Nothing is 
  13552.     normally done when this parameter is passed. 
  13553.  
  13554. H   The user has asked for help, by pressing F1 while the button associated 
  13555.     with this action was initialized.  Some of the supplied toolbar actions 
  13556.     invoke the OS/2 Help manager and bring up a panel in the standard EPM.HLP 
  13557.     (e.g., most of the ones in SAMPACTN.E); some provide their own help file, 
  13558.     which they dynamically add (e.g., TREE.E), and some just pop up a message 
  13559.     box containing their prompt string (e.g., JOT.E). 
  13560.  
  13561.  
  13562. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13563.  
  13564. An alternative approach might involve having a handle to an attribute record. 
  13565. In such an approach one can still refer to an attribute record by the same 
  13566. handle even if the attribute record changes location.  On the other hand, 
  13567. implementation of this approach is often inefficient because it often includes 
  13568. generation of new handles when text containing attributes is copied so that a 
  13569. handle only refers to a single attribute record.
  13570.  
  13571.  
  13572. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13573.  
  13574. Note in this diagram, the attribute records are delimited by brackets. 
  13575. Throughout this document I will only use brackets to delimit attribute records. 
  13576. To avoid confusion, I will refrain from using brackets as a textual character 
  13577. in my examples.  The use of capital letters here between brackets is only used 
  13578. in this example as a means of referring to individual attribute records.  In 
  13579. other examples in this document, I might actually put words or numbers between 
  13580. the brackets if I want to denote some characteristic of an attribute record.
  13581.  
  13582.  
  13583. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13584.  
  13585. The last character of line in the example is the "h". There is an attribute 
  13586. record located immediately to the right of that character.  Because it is at 
  13587. the end of the line there is no character to the right of it.  This is 
  13588. acceptable because there is a virtual character to the right of it.  (In the 
  13589. case of line mode, there is a virtual space, and in the case of stream mode 
  13590. there is a virtual CR/LF or questionably a soft linebreak.)  The F attribute 
  13591. record in the example is a slightly different situation.  It is similar in that 
  13592. its positional notation is derived from the assumed existence of virtual spaces 
  13593. beyond the end of line.  It differs from the previous attribute record in that 
  13594. its location is invalid in stream mode and may not be effectively supported by 
  13595. some operations.
  13596.  
  13597.  
  13598. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13599.  
  13600. The exception to this is the '/' (search) command. When this command is 
  13601. invoked, E searches for the 'L' command definition. 
  13602.  
  13603.  
  13604. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13605.  
  13606. DEFC's and DEFPROC's cannot be redefined.  CONSTants can be redefined (to the 
  13607. same value) without penalty. 
  13608.  
  13609.  
  13610. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13611.  
  13612. The ET compiler does a simple substitution for every occurrence of a constant. 
  13613. If you define a long string constant and reference it ten times, its value is 
  13614. included ten times and takes up ten times its length in the resulting EX file. 
  13615. You might prefer to make a long string value a universal variable rather than a 
  13616. constant. 
  13617.  
  13618.  
  13619. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13620.  
  13621. By "event" we mean a procedure that is automatically invoked when a certain 
  13622. condition becomes true.  Previous examples are DEFINIT (executed when you start 
  13623. the editor or a new module) and DEFEXIT (executed when you quit the editor or a 
  13624. module).  In a sense keystrokes are also events, and in the past we sometimes 
  13625. called events "pseudo-keys". 
  13626.  
  13627.  
  13628. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13629.  
  13630. Understand that the word var is only a notational convenience. Do not include 
  13631. the word literally in your program. 
  13632.  
  13633.  
  13634. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13635.  
  13636. AF_ constants:
  13637.    AF_CHAR        =   1  -- 'key' represents an ASCII value
  13638.    AF_VIRTUALKEY  =   2  -- 'key' is a VK_ constant
  13639.    AF_SCANCODE    =   4  -- 'key' represents a keyboard scan code
  13640.    AF_SHIFT       =   8  -- The Shift key must be pressed along with 'key'
  13641.    AF_CONTROL     =  16  -- The Control key must be pressed along with 'key'
  13642.    AF_ALT         =  32  -- The Alt key must be pressed along with 'key'
  13643.    AF_LONEKEY     =  64  -- 'key' is a shift key, but is used by itself
  13644.    AF_SYSCOMMAND  = 256  -- 'index' should be sent in a WM_SYSCOMMAND message
  13645.    AF_HELP        = 512  -- 'index' should be sent in a WM_HELP message
  13646.  
  13647.  
  13648. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13649.  
  13650. See the OS/2 2.x Presentation Manager Reference from the OS/2 2.x Toolkit for a 
  13651. description of the various menu styles.  Assuming that you have the toolkit 
  13652. installed on your system, you can enter the command 
  13653.  
  13654. view PMREF Menu Item Styles
  13655. to see the menu styles, and can edit \toolkt2x\c\os2h\pmwin.h to determine what 
  13656. value to specify for each style.
  13657.  
  13658.  
  13659. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13660.  
  13661. See the OS/2 2.x Presentation Manager Reference from the OS/2 2.x Toolkit for a 
  13662. description of the various menu attributes.  Assuming that you have the toolkit 
  13663. installed on your system, you can enter the command 
  13664.  
  13665. view PMREF Menu Item Attributes
  13666. to see the menu attributes, and can edit \toolkt2x\c\os2h\pmwin.h to determine 
  13667. what value to specify for each attribute.
  13668.  
  13669.  
  13670. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13671.  
  13672. As described in the OS/2 Technical Reference Manual section 2.3.8.1 entitled 
  13673. Dynamic Linking. 
  13674.  
  13675.  
  13676. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13677.  
  13678. In the 'printable_char' cases, the keyname must be quoted in an E program. For 
  13679. example, the following example redefines the '~' key on the keyboard to toggle 
  13680. the cursor between the text and the command dialog box, and redefines some of 
  13681. the alphabetic keys to produce help information:      def '~' = command_toggle 
  13682. def 'a' - 'z' = 'help' However, the rest of the keynames need not be quoted, 
  13683. e.g. KEY c_end 
  13684.  
  13685.  
  13686. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13687.  
  13688. In all constructs which require a numeric_term, a numeric value is expected. 
  13689. The following can be substituted for a number: 
  13690.  
  13691. o the name of a variable representing a numeric value, or 
  13692. o a procedure call which returns a numeric value 
  13693.  
  13694. Starting with EPM 6.03 in May, 1995, a numeric term may also be given as a 
  13695. hexadecimal number, in the format 0Xhhhh, where hhhh represents 1 to 8 
  13696. hexadecimal digits. 
  13697.  
  13698.  
  13699. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13700.  
  13701. In all constructs which require a string_expression, a string value is 
  13702. expected. The following can be substituted for a string: 
  13703.  
  13704. o the name of a variable representing a string, or 
  13705. o a procedure call which returns a string 
  13706.  
  13707.  
  13708. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13709.  
  13710. In a constant_expression, any identifiers or designators must be the names of 
  13711. constants; no variables are permitted. 
  13712.  
  13713.  
  13714. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13715.  
  13716. There may not be spaces between the identifier and the '('. 
  13717.  
  13718.  
  13719. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13720.  
  13721. A macro-defined command is any command defined using a DEFC construct in the E 
  13722. macro code, whether it is part of the distributed macros written by the E 
  13723. developers or added later by a user. For an example of such a DEFC construct, 
  13724. see section Using EPM Commands in E Statements. 
  13725.  
  13726.  
  13727. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13728.  
  13729. Note: Two double quotes inside a double-quoted string will output one double 
  13730. quote character. For example, the string: "She said, ""Oh, that's 
  13731. fascinating."" " will yield the following output: She said, "Oh, that's 
  13732. fascinating." There can be no spaces between the two double quotes. 
  13733.  
  13734.  
  13735. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13736.  
  13737. Note: Two single quotes inside a single-quoted string will output one single 
  13738. quote character. For example, the string: 'I went to Jim Kennedy''s house' 
  13739. will yield the following output: I went to Jim Kennedy's house. There can be no 
  13740. spaces between the two single quotes. 
  13741.  
  13742.  
  13743. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  13744.  
  13745. Any number to be interpreted or manipulated by the editor cannot exceed 32,767.