home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / wps / editor / epmtools / epmbk / epmtech.inf (.txt) next >
Encoding:
OS/2 Help File  |  1993-05-26  |  351.4 KB  |  12,947 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.  
  149.   if .messageline <> 14 then
  150.     .messageline=14
  151.   endif
  152.  
  153. The first reference to messageline checks the color of the message line (a 
  154. referenced field variable). If it is not equal to color 14 (yellow) then it 
  155. makes the message line color yellow (a field variable assignment). 
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 1.2. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  159.  
  160. There are built-in statements and procedures. These are internal in the E code, 
  161. and therefore cannot be located in any of the .E files. These are listed in the 
  162. Built-in Statements and Procedures section. For example: 
  163.  
  164.  
  165.   asciivalue = ASC('A')
  166.   insert 'Written by the Yorktown E group',5
  167.  
  168. The first example is of the ASC() procedure. It will return the value 65 in the 
  169. variable asciivalue. Only procedures can return values (but don't always have 
  170. to). Procedures always take parentheses even if no arguments are passed. There 
  171. cannot be any spaces between the procedure name (in my example ASC) and the 
  172. left parenthesis, or E will think it is a statement. 
  173.  
  174. Statements, however, never take parentheses and don't return values. They can, 
  175. but don't have to, take arguments. The second example is of the insert 
  176. statement, shown here with arguments. It would insert on line five the text: 
  177. Written by the Yorktown E group. 
  178.  
  179.  
  180. ΓòÉΓòÉΓòÉ 1.3. Standard Procedures ΓòÉΓòÉΓòÉ
  181.  
  182. There are also defproc procedures that have been written in E-code and 
  183. therefore exist in one of the .E files. These are listed in Descriptions of 
  184. Procedures in Standard EPM.. They always take parentheses and can return 
  185. values, just like the built-in procedures. An example is: 
  186.  
  187.  
  188.   mymaxnum = MAX(4,5,98,6)
  189.  
  190. This E code will set the variable mymaxnum to 98, the maximum number in the 
  191. argument list. Again, the left parenthesis is flush with the procedure name. 
  192.  
  193.  
  194. ΓòÉΓòÉΓòÉ 1.4. EPM Commands ΓòÉΓòÉΓòÉ
  195.  
  196. Commands, defined with the defc and written in E-code can be invoked from the 
  197. command line dialog box, and are listed in the The EPM User's Guide and the 
  198. section Commands Omitted From the User's Guide in this manual. These can also 
  199. be called from within the E language if surrounded by quotation marks. For 
  200. example: 
  201.  
  202.  
  203.   'bottom'
  204.  
  205. will move the cursor position to the bottom of the file, as if the user had 
  206. typed bottom from the command line dialog box. 
  207.  
  208.  
  209. ΓòÉΓòÉΓòÉ 1.5. Summary ΓòÉΓòÉΓòÉ
  210.  
  211. Understanding the differences between these commands, statements, and 
  212. procedures is critical when programming in the E programming language. When 
  213. looking for a specific result, remember to look in all these sections to help 
  214. find a command, statement, or procedure that may accomplish your goal. The 
  215. procedures defined with defproc and the commands defined with defc are good 
  216. sources of reference when programming in E. Examining the E-code of procedures 
  217. or commands can be helpful when trying to accomplish a goal close to an 
  218. existing procedure or command. 
  219.  
  220. Note:  E ignores case for procedure, statements, variable, and command names. 
  221. Capitalizing ASC and MAX in the examples above was done purely by whim. 
  222.  
  223. Although the discussion above may be slightly fuzzy to a novice, it should get 
  224. more clear as the manual progresses. It may help to refer back to these 
  225. distinctions as the various elements of E are described in detail. 
  226.  
  227.  
  228. ΓòÉΓòÉΓòÉ 2. Basic Tools of the E Language ΓòÉΓòÉΓòÉ
  229.  
  230. Basic tools of the E language. 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 2.1. Comparision with to the REXX Language:  Scoping ΓòÉΓòÉΓòÉ
  234.  
  235. Anyone familiar with the REXX language will notice that the E language has the 
  236. same look and feel. The string handling looks the same, and the control 
  237. structures are similar. You may well ask "Why not use REXX for the editor macro 
  238. language?" The answer is that there are some important differences, which we 
  239. will discuss. 
  240.  
  241. Unlike REXX, E makes all variables local by default.  You can specify that a 
  242. variable is to be global everywhere, i.e. available to any other procedure, not 
  243. only to the current caller, by using the universal keyword in the declaration. 
  244. A simple program will illustrate the scoping differences between REXX and E. 
  245.  
  246. REXX SAMPLE PROGRAM
  247.       /* REXX scoping example */
  248.       call starthere
  249.  
  250.       starthere: procedure
  251.          me='the old me'
  252.          call p1
  253.          say me                     /* says 'the old me' */
  254.          exit 0
  255.  
  256.       p1: procedure                 /* don't expose me here */
  257.          call p2
  258.  
  259.       p2: procedure expose me
  260.         me='the new me'             /* try to modify me down here */
  261.         return ''
  262.  
  263. E SAMPLE PROGRAM
  264.       /* E scoping example */
  265.       defmain
  266.          call starthere
  267.  
  268.       defproc starthere
  269.          universal me
  270.  
  271.          me='the old me'
  272.          call p1()
  273.          say me                     /* says 'the new me' */
  274.          exit 0
  275.  
  276.       defproc p1
  277.          call p2()
  278.  
  279.       defproc p2
  280.          universal me               /* make it really global */
  281.  
  282.          me='the new me'
  283.          return ''
  284.  
  285. For the REXX program to calculate the same results as the E program, procedure 
  286. p1 would have to expose the me variable. The REXX expose statement requires 
  287. that the symbol table be known at the time of the call. When a REXX procedure 
  288. is called, the current symbol table entries are removed except for those 
  289. entries that are exposed. This means that a symbol table must be maintained at 
  290. run time. When a variable is referenced, a lookup is performed to see if it is 
  291. already in the symbol table. If the variable is not in the symbol table a new 
  292. symbol table entry is created. 
  293.  
  294. In the E language, like MODULA-2, C and PASCAL, no symbol table is required at 
  295. run-time. The absence of variable lookup is one reason why E runs considerably 
  296. faster than REXX. However, REXX programs are more easily debugged for the same 
  297. reason. But the order of magnitude of improvement in performance was judged 
  298. critical for the programming environment. 
  299.  
  300.  
  301. ΓòÉΓòÉΓòÉ 2.2. E Variables and Identifiers ΓòÉΓòÉΓòÉ
  302.  
  303. Variable declarations are not needed except for universal variables. All other 
  304. variables are assumed to be local except for a few predefined, universal 
  305. variables to be discussed in Predefined Constants and Variables. 
  306.  
  307. Identifiers have the following syntax: 
  308.  
  309.  [a-z | A..Z]{a-z | A..Z | 0-9 | _}
  310. Identifiers are not case sensitive, and can consist of no more than 28 
  311. characters. 
  312.  
  313.  
  314. ΓòÉΓòÉΓòÉ 2.2.1. The Contents of Uninitialized Variables ΓòÉΓòÉΓòÉ
  315.  
  316. When a variable is referenced for the first time in a REXX program the variable 
  317. holds the name of itself in upper case (e.g., abc='ABC'). In an E program the 
  318. value of an uninitialized variable is undefined. This decision was made for the 
  319. following reasons: 
  320.  
  321.  1. No symbol table information is required at run time. A complete symbol 
  322.     table is needed to know when the variable is first defined at run time. 
  323.  
  324.  2. Speed. Local variables do not have to be assigned anything except what the 
  325.     user assigns to the variable. 
  326.  
  327. Some people prefer the REXX convention because it allows you to type in some 
  328. operating system commands without using quotes. For example, 
  329.  
  330.     type profile exec
  331.  
  332. But many operating system commands will still require quotation marks anyway. 
  333. Requiring quotation marks in all cases reduces confusion. 
  334.  
  335. Since uninitialized variables are truly uninitialized (random) in E, strange 
  336. behavior can occur if a programmer accidentally creates an unintended variable, 
  337. for instance, by misspellling a statement ('sayeror').  The ET compiler will 
  338. catch most uninitialized variables at compile time, and report "Variable not 
  339. initialized".  For example, the following will be caught: 
  340.  
  341.    defc foo=
  342.       insertline x   /* x was never given a value */
  343.  
  344. This feature will also catch several other previously obscure errors. Omitting 
  345. the commas between universal variable names: 
  346.  
  347.    universal a b c   /* wrong, should be   universal a,b,c  */
  348.                      /* ET reports b as not initialized     */
  349.  
  350. The omission of parentheses after a procedure call: 
  351.  
  352.    call myproc       /* ET will report myproc as not initialized */
  353.  
  354. And most misspellings that otherwise wouldn't be caught until the line was 
  355. executed: 
  356.  
  357.    sayeror 0
  358.  
  359. Limitation:  This will not catch some cases where a variable is referenced 
  360. twice, or where two variables are combined in an expression: 
  361.  
  362.    call p(a+b)   /* Won't catch uninitialized a.  Will catch b. */
  363.  
  364.    for i=i       /* These are not caught. */
  365.    x=x+1
  366.  
  367. It should be noted that this feature is a benefit of E's compilation approach. 
  368. The variable names are tokenized at compile time (unlike REXX), making it easy 
  369. to tell when a new variable is being created. 
  370.  
  371.  
  372. ΓòÉΓòÉΓòÉ 2.3. Arrays in EPM ΓòÉΓòÉΓòÉ
  373.  
  374. Arrays are handled like files in a ring. When creating an array, an array id is 
  375. returned as a "handle" for the array. This array id then can be used to get and 
  376. put items into the array. Indices do not have to be numeric but instead can be 
  377. any arbitrary string (like REXX stems). 
  378.  
  379. The following shows the format of the DO_ARRAY statement used to create, write 
  380. to, and read from an array: 
  381.  
  382. do_array 1, array_id, myarray 
  383.                                      This creates an array called MYARRAY and 
  384.                                      returns its array id in the ARRAY_ID 
  385.                                      variable. If an array called MYARRAY 
  386.                                      already exists, then its array id will be 
  387.                                      returned. 
  388. do_array 2, array_id, index, value 
  389.                                      This sets the entry INDEX in the array 
  390.                                      identified by the ARRAY_ID number to the 
  391.                                      value specified in VALUE. Both the index 
  392.                                      and value can contain arbitrary strings. 
  393. do_array 3, array_id, index, result 
  394.                                      This will look up the INDEX entry in the 
  395.                                      array ARRAY_ID and assign the result to 
  396.                                      the variable RESULT. 
  397. do_array 4, array_id, index 
  398.                                      This will delete an entry specified, by 
  399.                                      INDEX, from the array. 
  400. do_array 6, array_id, array_name 
  401.                                      Returns the array_id associated with the 
  402.                                      array name specified by array_name 
  403.  
  404. Due to the common interface, the second and fourth arguments in the DO_ARRAY 
  405. statement must be variables and not numeric or string constants or expressions. 
  406.  
  407.  
  408. ΓòÉΓòÉΓòÉ 2.4. Expressions and Operators ΓòÉΓòÉΓòÉ
  409.  
  410. Expressions and operators. 
  411.  
  412.  
  413. ΓòÉΓòÉΓòÉ 2.4.1. Operators ΓòÉΓòÉΓòÉ
  414.  
  415.                     Add expressions 
  416.  
  417.                     subtract expressions 
  418.  
  419. ==, /== 
  420.                     exactly equal, not exactly equal forces exact string 
  421.                     comparison, taking all spaces and digits as a string. 
  422.  
  423. =, <>, <=, >=, <, > 
  424.                     These operators ignore leading and trailing spaces on 
  425.                     expressions being compared. If both operands are numbers a 
  426.                     number comparison is performed; otherwise a string 
  427.                     comparison is performed. 
  428.  
  429.                                          examples
  430.                                            'hi'='hi  '  is true
  431.                                            'hi'=='hi  ' is false
  432.  
  433. not, -, + 
  434.                     Boolean not, unary minus, unary plus 
  435.  
  436. and, &, or, | 
  437.                     Boolean and, Boolean and, Boolean or, Boolean or 
  438.  
  439. || 
  440.                     concatenates two strings 
  441.  
  442. *, /, % 
  443.                     integer multiply, divide, integer divide 
  444.  
  445. // 
  446.                     modulus (remainder) operator.  22 // 5 = 2. 
  447.  
  448. Note:  The percent sign % is to be used for integer division, while the slash / 
  449. is to be used for floating-point division. 
  450.  
  451.  
  452. ΓòÉΓòÉΓòÉ 2.4.2. Operator Precedence ΓòÉΓòÉΓòÉ
  453.  
  454. From lower to higher precedence:
  455.  
  456.      1. AND, OR, NOT, &, |
  457.  
  458.      2. >, <, =, ==, /==, <>, <=, >=
  459.  
  460.      3. ||
  461.  
  462.      4. +, -
  463.  
  464.      5. *, /, %, //
  465.  
  466.  
  467. ΓòÉΓòÉΓòÉ 2.5. String Expressions ΓòÉΓòÉΓòÉ
  468.  
  469. The rules for delimiting strings are shown below: 
  470.  
  471. o Double or single quotes may be used. 
  472.  
  473. o Two single quotes inside single quotes represent the single quote character. 
  474.  
  475. o Two double quotes inside double quotes represent the double quote character. 
  476.  
  477. o Strings may not extend across line boundaries. 
  478.  
  479. o A backslash can be used to represent awkward characters, in the same style as 
  480.   the C language.  \t (without quotes) represents the tab character. On a PC 
  481.   the ASCII value of the tab character is 9, so \9 represents the same thing. 
  482.  
  483.   Other special characters are \r and \l, which denote carrage return and line 
  484.   feed, repectively. 
  485.  
  486. Examples:
  487.  
  488.   'abc'== "abc"
  489.   ''''=="'"
  490.   """"=='"'
  491.   '1'\50==12        /* 50 is ASCII value for the character '2' */
  492.   3+ '1'\50==15     /* everything is a string! */
  493.   3+ '1'||2==42      /* Concat'n has lower precedence than + */
  494.   asc(\t)==9
  495.   asc(\r)==13
  496.   \r\n==''\r\n''
  497.                      /* Note that \r\n is a single string literal,    */
  498.                      /* generically the same as a single string of    */
  499.                      /* two characters "XY".  No concatenation here. */
  500.  
  501.  
  502. ΓòÉΓòÉΓòÉ 2.5.1. Catenation (Concatenation) ΓòÉΓòÉΓòÉ
  503.  
  504. Strings can be joined by catenation using the (con)catenation operator (||). 
  505. However, the operator can be omitted in most cases. When the operator is 
  506. omitted, E will place a single blank between the catenated results IF there is 
  507. at least one space between the operands. As the following examples illustrate, 
  508. one can completely avoid using the catenation operator. Suppose: 
  509.  
  510.      v1 = 'abc'
  511.      v2 = 'xyz'
  512.      r1 = v1 v2
  513.      r2 = v1 'def'
  514.      r3 = v1'ghi'
  515.      r4 = v1      'qrs'
  516.      r5 = v1/* comment */v2
  517. then: 
  518.  
  519.      r1 == 'abc xyz'
  520.      r2 == 'abc def'
  521.      r3 == 'abcghi'
  522.      r4 == 'abc qrs'
  523.      r5 == 'abcxyz'
  524.  
  525.  
  526. ΓòÉΓòÉΓòÉ 2.6. Comments ΓòÉΓòÉΓòÉ
  527.  
  528. E allows three ways to add comments:
  529.  
  530.      1. placing a semicolon in column one;
  531.  
  532.         ; this is a comment
  533.  
  534.      2. surrounding the comment with '/*  */'; and
  535.  
  536.         /* this is a /* nested */ comment */
  537.  
  538.         /* this is a leading comment */ followed by executable code
  539.  
  540.         /* this is a
  541.         two line comment */
  542.  
  543.      3. a double-dash at the start of a line comment.
  544.  
  545.         this is executable code -- followed by a rest-of-line comment
  546.  
  547. If a semicolon appears in the first column (that's column one, without 
  548. preceding spaces) the rest of the line is ignored.  This style is often handy 
  549. for quick commenting-out of existing source code. A comment in a REXX-style /* 
  550. */ enclosure does not cause the remainder of the line (if any) to be ignored. 
  551. These comments can be nested. A double-dash ("--") causes the remainder of the 
  552. line to be ignored. This is an easier way to type one-line comments, but does 
  553. not allow multi-line comments or nesting. 
  554.  
  555.  
  556. ΓòÉΓòÉΓòÉ 2.7. Line Continuations ΓòÉΓòÉΓòÉ
  557.  
  558. This section was added to explain when statements can be continued across 
  559. lines.  In theory this information was already in the manual - the syntax 
  560. listing in E Language Syntax shows that a semicolon (which the compiler 
  561. considers to be the same as a new line) is often acceptable in mid-statement. 
  562. But this will provide better illustrations. 
  563.  
  564. E does not require an explicit statement continuation character as REXX does. 
  565. It automatically continues to the next line when it "knows" it needs more 
  566. information, such as after an operator in the middle of an expression.  This 
  567. differs from the REXX treatment.  REXX allows line continuations in more cases, 
  568. but EPM does not require the explicit comma. In REXX you could do this: 
  569.  
  570.    x = a ,
  571.         b               /* REXX result is   x = a b   */
  572. which concatenates the two strings a and b (implied concatenation). You can 
  573. achieve a similar (but not identical) effect by supplying an explicit operator 
  574. to make E aware that there must be more: 
  575.  
  576.    x = a ||   /* explicit concatenation operator */
  577.       b                 /* gives x = a||b, no intervening space */
  578.  
  579. A new line is allowed in all the following cases: 
  580.  
  581.  1. After an operator in an expression: 
  582.  
  583.            x = 1 +
  584.                    2
  585.  
  586.  2. After a comma in an expression list passed to a procedure: 
  587.  
  588.            call myproc( 'foobar' ,
  589.                         'axolotl' )
  590.  
  591.  3. After a comma in declarations of procedure parameters, constants or 
  592.     universal variables: 
  593.  
  594.            defproc myproc( a ,
  595.                            b  )
  596.  
  597.            const
  598.               x = 1,
  599.               y = 2
  600.  
  601.            universal a
  602.                      ,
  603.                      b
  604.  
  605.  4. After a comma in a DEF with a series of keynames: 
  606.  
  607.            def a_a, a_b, a_c,
  608.                a_d, a_e
  609.  
  610.  5. Between if and then: 
  611.  
  612.            if a=1
  613.               then b=a
  614.               else c=a
  615.            endif
  616.  
  617.  6. And after commas between parameters of several statements - getcommand, 
  618.     setcommand, getfileid, getline, replaceline, insertline, deleteline, and 
  619.     getmark: 
  620.  
  621.            replaceline 'this is a long new line'    ,
  622.                        linenumber ,
  623.                        fileid
  624.  
  625. As mentioned above, the semicolon can be used to separate statements on the 
  626. same line. For example: 
  627.  
  628.   x= 5+3; y= 9-7
  629.  
  630. will work and place the value of 8 in x and 5 in y Without a semicolon E 
  631. expects only one statement per line. For example: 
  632.  
  633.   x= 5+3  y= 9-7
  634.  
  635. will cause a compilation error of "Variable not initialized" on the y (it 
  636. attempts to concatenate 3 and y). 
  637.  
  638.  
  639. ΓòÉΓòÉΓòÉ 2.8. Fileid Structure ΓòÉΓòÉΓòÉ
  640.  
  641. The E editor must store information on each file in its rings. Therefore each 
  642. file is assigned a unique fileid, which acts as a handle for the file. The 
  643. fileid is actually a structure composed of many fields, such as .FILENAME, 
  644. .LINE, .DRAGCOLOR. Each field stores a value which identifies an attribute of 
  645. the file. By manipulating the values of these fields, macros can get and set 
  646. information about the files loaded, for example the modify status or the 
  647. contents of the message line. Because macros need the fileid to set the fileid 
  648. fields, E provides a GETFILEID statement to obtain the fileid. 
  649.  
  650. To access the structure of a file other than the active one, the GETFILEID 
  651. statement is provided to get an ID or "handle" on a file. 
  652.  
  653. GETFILEID  var fileid [,filename] 
  654.                     If filename is given, a search is performed for it in the 
  655.                     EPM rings. A match is considered to be found if the name 
  656.                     portion (without drive and path) of a filespec in the ring 
  657.                     matches filename. This could be ambiguous if two files of 
  658.                     the same name (from different directories) are in the ring; 
  659.                     if this is a concern, specify the full filespec, with path, 
  660.                     to force an exact match. 
  661.  
  662.                     This feature can also be used to find a temporary file with 
  663.                     a unique name, such as '.ALL' or '.DIR'. 
  664.  
  665.                     If a match is found, then the fileid will be a valid 
  666.                     integer handle for that file, where fileid >= 0. Otherwise 
  667.                     fileid='', a null string. 
  668.  
  669.                     If the filename is not given, then fileid will be a valid 
  670.                     handle for the current file, where fileid>=0. 
  671.  
  672. Examples:
  673.  
  674.  GETFILEID fileid               /* Set variable fileid to    */
  675.                                 /* correspond to active file */
  676.  
  677.  GETFILEID myid,'AUTOEXEC.BAT'  /* Set variable myid to             */
  678.                                 /* correspond to file AUTOEXEC.BAT. */
  679.                                 /* If AUTOEXEC.BAT is not already   */
  680.                                 /* loaded then myid will be null.   */
  681.  
  682. To assign values to the fileid fields: 
  683.  
  684. fileid.field = expression 
  685.                     fileid must be an integer handle corresponding to a valid 
  686.                     file. field must be one of the field names listed below. 
  687.                     For example, to set the current line of the active file to 
  688.                     one: 
  689.  
  690.     getfileid fileid    /* get the fileid of the active file */
  691.     fileid.line=1       /* set the current line to one */
  692.  
  693. The alternative syntax is: 
  694.  
  695. .field = expression 
  696.                     Since no fileid is specified, the current file is assumed. 
  697.  
  698.    .line=1     /* Make line 1 the current line of the */
  699.                /* current file.  Note that there is   */
  700.                /* no need to get a fileid to set a    */
  701.                /* field of the current (active) file. */
  702.  
  703. You can blank out any of the EPM information lines off with the following code: 
  704.  
  705.  
  706.     .messageline = ''   /* erases the message line */
  707.     .statusline = ''    /* erases the status line  */
  708.  
  709. A list of all the fileid fields and their meaning is presented here. In the 
  710. following list, remember that x refers to the horizontal axis and y refers to 
  711. the vertical axis. 
  712.  
  713.  
  714. ΓòÉΓòÉΓòÉ 2.8.1. Field Variables Listed ΓòÉΓòÉΓòÉ
  715.  
  716. The following is a list of the field (dot) variables and what information they 
  717. contain: 
  718.  
  719. Field Variable                Description 
  720. AUTOSAVE                      number of changes (0 to 65535) between autosaves; 
  721.                               this counts the true number of changes, not just 
  722.                               number of lines entered.  Changes within a single 
  723.                               line are counted as one modification when you 
  724.                               leave the line. 
  725. COL                           current column position, 1 to 255. 
  726. CURSORX                       cursor's x position relative to window origin. 
  727. CURSORY                       cursor's y position relative to window origin. 
  728. DRAGCOLOR                     is the color of the highlighted area within a 
  729.                               drag area. 
  730. DRAGSTYLE                     determines the type of mark done when a mouse 
  731.                               drag is used to mark text. Valid values are: 
  732.  
  733.    0 = don't show drag 
  734.    1 = show character mark 
  735.    2 = show block mark 
  736.    3 = show line mark 
  737. DRAGTHRESHHOLDX               determines how far (in pels) the mouse must be 
  738.                               pulled in the x direction with a button down held 
  739.                               before EPM recognizes the mouse activity as drag. 
  740.                               The default value is zero, which uses the PM 
  741.                               system value of SV_CXDBLCLK. -- Warning: 
  742.                               DragThreshholdX is not a true file variable 
  743.                               because any value assigned to it will apply to 
  744.                               ALL files in the ring. -- 
  745. DRAGTHRESHHOLDY               determines how far (in pels) the mouse must be 
  746.                               pulled in the y direction with a button down held 
  747.                               before EPM recognizes the mouse activity as drag. 
  748.                               The default value is zero, which uses the PM 
  749.                               system value of SV_CYDBLCLK. -- Warning: 
  750.                               DragThreshholdY is not a true file variable 
  751.                               because any value assigned to it will apply to 
  752.                               ALL files in the ring. -- 
  753. EAAREA                        pointer to OS/2 1.2 extended attribute area. 
  754. FILENAME                      name of current file. 
  755. FONTHEIGHT                    contains the current font height in pixels. 
  756. FONTWIDTH                     contains the current font height in pixels. 
  757. KEYSET                        the name of the keyset bound to the file, a 
  758.                               string like "EDIT_KEYS". 
  759. LAST                          the total number of lines in the current file. 
  760. LEVELOFATTRIBUTESUPPORT       A bit field indicating the level of attribute 
  761.                               support desired.  The bits are: 
  762.  
  763.    1   Display color attributes. 
  764.    2   Don't skip over attributes when moving the cursor. 
  765.    4   Display font attributes. 
  766.    8   Save attributes in an Extended Attribute when saving the file. 
  767.    16  Used by the macros to indicate that the Compiler menu was added (part of 
  768.        the Workframe support). 
  769.  
  770.                               Note:  Displaying mixed fonts can slow down 
  771.                                      screen refresh considerably.
  772.  
  773.  
  774. LINE                          the line number of the cursor's position, ranging 
  775.                               from 0 to LAST. 
  776. LOCKHANDLE                    is a Boolean (0 or 1) variable determining 
  777.                               whether the current file is locked against other 
  778.                               user's access in a LAN situation. 
  779. MARGINS                       the margin settings for the file, a string like 
  780.                               "1 79 1". 
  781. MARKCOLOR                     contains the color for marked text. 
  782. MESSAGECOLOR                  contains the message display color. 
  783. MESSAGELINE                   contains the contents of the message line. This 
  784.                               variable can be assigned a string to force a 
  785.                               message onto the message line or read to 
  786.                               determine the contents of the current message 
  787.                               line. 
  788. MODIFY                        0 or 1, showing whether the text has been 
  789.                               modified. 
  790. MOUSEX                        the column of the mouse location. This variable 
  791.                               is only valid when processing a mouse message. 
  792. MOUSEY                        the row of the mouse location. This variable is 
  793.                               only valid when processing a mouse message. 
  794. STATUSCOLOR                   contains the color of the status line. 
  795. STATUSLINE                    contains the template for the status line. For 
  796.                               more information about the contents of this 
  797.                               variable see The EPM User's Guide. 
  798. TABS                          the tab settings for the file, a string like "1 4 
  799.                               7 10" of up to 32 values. The tabs settings is 
  800.                               not a single global setting, but is remembered 
  801.                               for each file. 
  802. TEXTCOLOR                     shows the current textcolor setting. 
  803. TITLETEXT                     contains text to be displayed in the title bar 
  804.                               when this file is the current file. By default, 
  805.                               this field is empty, in which case the .filename 
  806.                               field is used. 
  807. USERSTRING                    this is a temporary storage string for the E 
  808.                               programmer to use for file specific information. 
  809. VISIBLE                       contains a one if the file is displayable (ie. 
  810.                               not hidden) and a zero if the file is a hidden 
  811.                               file. 
  812. WINDOWHEIGHT                  contains the height of the current window. 
  813. WINDOWWIDTH                   contains the width of the current window. 
  814. WINDOWX                       gap between the right edge of the client windows 
  815.                               presentation space and the right edge of the 
  816.                               client window. 
  817. WINDOWY                       gap between the bottom end of the client windows 
  818.                               presentation space and the bottom end of the 
  819.                               client window. 
  820.  
  821. Some fields with numeric values also follow certain constraints about their 
  822. maximum and minimum values.  Some fields are dependent upon other fields.  The 
  823. following chart shows these dependencies and some of the fields' ranges of 
  824. values. 
  825.  
  826. Field name                Max value                          Min value
  827. ----------                ---------                          ---------
  828.  .AUTOSAVE                 65535                                  0
  829.  .COL                      255                                    1
  830.  .CURSORX                  .windowwidth                           1
  831.  .CURSORY                  .windowheight                          1
  832.  .FILENAME                 a string like 'C:\TESTFILE.DOC'
  833.  .KEYSET                   a string like 'EDIT_KEYS'
  834.  .LINE                     .last                                  0
  835.  .MARGINS                  a string like '1 254 1'
  836.  .MARKCOLOR                255                                    0
  837.  .MESSAGECOLOR             255                                    0
  838.  .MODIFY                   65535                                  0
  839.  .STATUSCOLOR              255                                    0
  840.  .TABS                     a string like '1 4 7 10' or '3'
  841.  
  842.  
  843. ΓòÉΓòÉΓòÉ 2.9. Attribute Pairs ΓòÉΓòÉΓòÉ
  844.  
  845. EPM provides one with the ability to associate information with positions and 
  846. regions of a file without modifying the content of the file.  This capability 
  847. is called attribute support and can be used to provide features like embedded 
  848. objects, hidden text, bookmarks, hypertext links, and structured text editing. 
  849.  
  850. In most editors files/buffers are treated as streams of characters.  EPM 
  851. differs from most editors in that a file/buffer is treated (for display) as a 
  852. stream of characters and attribute records.  Attribute support simply provides 
  853. an interface for managing files/buffers that contain attribute records. 
  854.  
  855. Attribute records themselves are essentially invisible, but because they can be 
  856. used to pass information to the rendering, live parsing, and formatting 
  857. components of the editor, a user of the editor can often ascertain the 
  858. existence and location of some attribute records based on the effect these 
  859. attribute records have on the rendering of the file/buffer. 
  860.  
  861. In order to manage attribute records, it is useful to have a notation system 
  862. for referencing individual attribute records within a file/buffer.  In EPM the 
  863. notation system is positional-- that is, one points to location of the 
  864. attribute record when one wants to reference it. 
  865.  
  866. In an ordinary text editor one can refer to any position in a file/buffer by 
  867. specifying a line number and column number.  This approach is not adequate for 
  868. an editor like EPM that has the dual goal of supporting attributes record 
  869. management and yet minimizing the impact of attribute support on 
  870. applications/macros that are not attribute-aware.  In order to best achieve 
  871. both goals, EPM has replaced the common line/column coordinate system with a 
  872. line/column/atoffset based coordinate system.  In this system each character of 
  873. a line occupies a unique column, but individual attribute records are denoted 
  874. by their attribute offset relative to the next character in the buffer/file. 
  875. The characters themselves always have an atoffset value of zero, so the 
  876. atoffset value is often omitted when referring to characters.  An attribute 
  877. record located immediately to the left of a character is said to be located at 
  878. the same column as that character but at an atoffset of -1.  An attribute 
  879. record immediately to the left of that is said to be at atoffset -2.  The 
  880. following diagram illustrates the notation for various characters and 
  881. attributes on a line: 
  882.  
  883.     abcd[A]efg[B][C][D]h[E]  [F]
  884.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöé
  885.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöö col 11 atoffset -1
  886.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöö column 9  atoffset -1
  887.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöö column 8  (atoffset 0)
  888.     Γöé  Γöé Γöé Γöé   Γöé     Γöö column 8  atoffset -1
  889.     Γöé  Γöé Γöé Γöé   Γöö column 8  atoffset -3
  890.     Γöé  Γöé Γöé Γöö column 5  (atoffset 0)
  891.     Γöé  Γöé Γöö column 5  atoffset -1
  892.     Γöé  Γöö column 4  (atoffset 0)
  893.     Γöö column 1  (atoffset 0)
  894.  
  895. Note:  The text in the example will simply appear as a sequence characters from 
  896.        "a" to "h" because attribute records are invisible.  An exception to 
  897.        this might be if the attributes effect the formatting, parsing, or 
  898.        rendering of the text.
  899.  
  900. As you can see in this first example, each of the characters resides at a 
  901. unique column number and has an implicit atoffset of zero.  You can also see 
  902. all attribute records reside at negative atoffsets and that it is possible for 
  903. more than one attribute record to reside between any two adjacent characters. 
  904. In this example, three attribute records reside between the "g" in column 7 and 
  905. the "h" in column 8. 
  906.  
  907. It should be noted that negative column numbers and positive at offset values 
  908. are invalid.  In previous versions of EPM it was possible to have positive 
  909. atoffsets.  This has been changed because it complicates the implementation 
  910. without providing a satisfactory solution to any problem.  It also be noted 
  911. that overly negative atoffset values have undefined semantics that may vary 
  912. depending on the operation requested.  Most operations will flag an error when 
  913. overly negative values are specified.  ((Footnote:  It is recognized by the 
  914. developers of EPM that people tend to deal with positive numbers better than 
  915. with negative. For this reason, we'd like to change the notation to be positive 
  916. and to represent the position of attributes relative to the character to the 
  917. left. Unfortunately, we are unlikely to find the time to make this change.)) 
  918.  
  919. When working with attributes records it is also important to have a notation 
  920. for the spaces between characters and attribute records.  The convention is 
  921. that each interstitial is reference by the same coordinate as the character or 
  922. attribute to its right.  In the first example, the position on the left side of 
  923. the "c" character is referred to column 3 atoffset 0. Similarly the 
  924. interstitial between the C and D attribute records is referred to as column 8 
  925. atoffset -1. 
  926.  
  927. In addition to positional information, attribute records also contain class, 
  928. value, and range information. 
  929.  
  930. Each attribute record has a class field that is used to categorize the 
  931. attribute record based on its purpose.  For example, one might be a member of a 
  932. bookmark class or sgml tag class.  Certain predetermined classes are supported 
  933. by the editor:  AC_FONT, AC_COLOR, AC_HSPACE.  Internal support for additional 
  934. classes will be added later, and applications can create and support additional 
  935. classes.  This is done by registering a class.  The editor provides C and E 
  936. macro API's for this. 
  937.  
  938. In addition to a class field, each attribute record has a four byte "value" 
  939. field whose interpretation is based on the class field of the attribute record. 
  940. For example, the value field of an SGML class attribute record might be a 
  941. pointer to meta information about the SGML element enclosed by the attribute 
  942. record.  The interpretation of the value fields of the internally supported 
  943. attribute classes are: 
  944.  
  945. AC_FONT   The value fields of AC_FONT attribute records is interpreted as a 
  946.           font ID. (See pregister_font for further info about font ID's.) 
  947.  
  948. AC_HSPACE This attribute records are always interpreted has having point range 
  949.           and their value field is interpreted as the amount of horizontal 
  950.           white space that should be added at this point in the file when 
  951.           rendered. 
  952.  
  953. AC_COLOR  The value fields of AC_COLOR attribute records is interpreted in the 
  954.           same fashion that the attribute byte of CGA monitors was interpreted. 
  955.           That is, the high nibble is the background color and the low nibble 
  956.           is the foreground color. In the future this class may be broken down 
  957.           into a foreground color class and a background color class so that 
  958.           support can be added for more than 16 colors. 
  959.  
  960. In the current implementation the class field is only one byte long.  In 
  961. addition, the classes below 64 are reserved for internal use.  This leaves only 
  962. 192 classes for application use.  This is a relatively small domain, so it 
  963. suggested that applications try to use as few classes as reasonable.  For 
  964. example, if one were to implement a SGML tag set where each tag type was a 
  965. class, one could easily consume most of the available classes.  In a situation 
  966. like this it is suggested that the application just register a single SGML tag 
  967. class and make the value field a pointer to a record that describes among other 
  968. things, the type of SGML tag being represented by the attribute record. 
  969.  
  970. Each attribute record has a range field.  The range field indicates over what 
  971. domain the attribute record rules.  That is, if the attribute record indicates 
  972. that text should be colored red, the range value indicates what text should be 
  973. colored red.  There are currently four types of range values supported in EPM: 
  974. point, set, push, and pop. 
  975.  
  976. The "point" range is simply used to remember a location.  Attributes with this 
  977. range might be used as book marks for example.  Attribute records with such a 
  978. range effect no text, they just mark a location.  For example if one put a 
  979. color attribute record with a point range into the document, no text would 
  980. change color. 
  981.  
  982. The "set" range simply indicates that it's attribute record rules over all the 
  983. text that follows until another set attribute record of the same class is 
  984. encountered.  Attribute records of this class can easily be used to simulate 
  985. character oriented attribute support much like that seen in most word 
  986. processors. 
  987.  
  988. The "push" range simply indicates that it's attribute record rules over the the 
  989. text that follows until suspended with another push attribute record of the 
  990. same class or until a matching "pop" attribute record is encountered. 
  991.  
  992. The "pop" range indicates that the text that follows should be ruled by the 
  993. attribute record (of the same class) that was suspended by "push" attribute 
  994. record that currently rules the text to the left of this pop attribute record. 
  995. Together the push and the pop attribute records are ideally suited implement a 
  996. structured text system or to do GML and SGML like text tagging. 
  997.  
  998. The above definitions of push, pop, and set attribute records are a bit 
  999. ambiguous on what is done if a file contains both push/pop and set attribute 
  1000. records of the same class.  In actuality the behavior is undefined.  In the 
  1001. current implementation, push and set are actually the same value so the editor 
  1002. can not distinguish between them.  In the future this may change in order to 
  1003. enable some optimizations.  Therefore one should stick to the AR_PUSH, AR_POP, 
  1004. AR_SET, and AR_POINT constant definitions provided in ATTR.E and ATTRIB.H, and 
  1005. one should not mix push/pop attributes with set attributes of the same class. 
  1006. It is anticipated that when one uses several modules/utilties at the same time, 
  1007. each utility might choose to use a different set a ranges for a given attribute 
  1008. class.  No solution to this problem has been adequately worked out at this 
  1009. point, but we don't expect this to be a major problem. 
  1010.  
  1011. Potential solutions might be to register each as being either push/pop or set 
  1012. and point. 
  1013.  
  1014.  
  1015. ΓòÉΓòÉΓòÉ 3. Definition Primitives ΓòÉΓòÉΓòÉ
  1016.  
  1017. The E language has a rich collection of primitives. These primitives are the 
  1018. building blocks of E programs since all E statements must occur within a 
  1019. definition construct. Definition primitives define procedures, commands, keys 
  1020. and initializations. Some definition primitives may be considered procedures. 
  1021. When distinguishing between these DEF procedures, one must consider three 
  1022. factors: how many of each type of definition may coexist in one program, when 
  1023. they are executed and what parameters they can be passed. The definition 
  1024. primitives are : 
  1025.  
  1026. o DEFINIT 
  1027.  
  1028.   These procedures may be multiply defined. All DEFINIT procedures are executed 
  1029.   first upon initialization of the EPM editor, one after another in the order 
  1030.   in which they were encountered during compilation.  (That's what we mean by 
  1031.   "may be multiply defined" - you can have several DEFINIT procedures and they 
  1032.   will be executed in sequence as if they were concatenated.) They take no 
  1033.   arguments and are typically used to initialize universal variables. 
  1034.  
  1035. o DEFEXIT 
  1036.  
  1037.   The converse of DEFINIT.  E executes all DEFEXIT procedures last, just before 
  1038.   it returns to the operating system.  DEFEXIT procedures are also called 
  1039.   during unlinking. Like DEFINITs, these procedures may be multiply defined and 
  1040.   take no arguments. 
  1041.  
  1042. o DEFMAIN 
  1043.  
  1044.   This procedure may be defined only once. DEFMAIN is executed after the 
  1045.   DEFINIT procedures are executed. This procedure is typically used to take 
  1046.   control of the editor's command dialog box arguments and options before the 
  1047.   editor. This can be particularly handy when you want the edit command to take 
  1048.   your own arguments or funky file names like "h:profile exec a". The 
  1049.   parameters that followed the epm command at the OS/2 prompt can be retrieved 
  1050.   by ARG(1), ARG(2), ARG(3), etc. function calls for as many arguments as are 
  1051.   passed. The number of arguments can be determined with the ARG() function. 
  1052.   This type of retrieval will be discussed in the next section. 
  1053.  
  1054. o DEFPROC 
  1055.  
  1056.   This kind of procedure is called by other procedures. It has a much more 
  1057.   sophisticated parameter passing capability to make the programming of other 
  1058.   procedures easier. Its capabilities include call by reference, call by value 
  1059.   and the ability to receive a variable number of arguments. 
  1060.  
  1061. o DEFC 
  1062.  
  1063.   This procedure allows the user to define new commands or redefine internal 
  1064.   editor commands as well as external commands. The command dialog box 
  1065.   arguments may be retrieved by an ARG(1) function call. 
  1066.  
  1067. o DEF 
  1068.  
  1069.   This defines the operation of a key.  It takes no arguments. 
  1070.  
  1071. o DEFKEYS 
  1072.  
  1073.   This is not a procedure and will be talked about in the key definitions 
  1074.   section of this document. This primitive allows KEY procedures to be grouped 
  1075.   into a keyset. 
  1076.  
  1077. o SET 
  1078.  
  1079.   This is not a procedure and will be talked about in the SET definitions 
  1080.   section of this document. This primitive is used for setting some of the 
  1081.   default configurations of the E editor. 
  1082.  
  1083. o CONST 
  1084.  
  1085.   This is not a procedure and will be talked about in the CONST section of this 
  1086.   document. This primitive is used for defining constants used by the E 
  1087.   translator. Constants do not change during execution of the E procs. 
  1088.  
  1089. o DEFMODIFY 
  1090.  
  1091.   DEFMODIFY, DEFLOAD and DEFSELECT are three "events". They are described more 
  1092.   fully later in this section.  DEFMODIFY is automatically triggered when the 
  1093.   file's number of modifications crosses certain threshold values. 
  1094.  
  1095. o DEFLOAD 
  1096.  
  1097.   DEFLOAD is invoked whenever a new file is created in the ring. 
  1098.  
  1099. o DEFSELECT 
  1100.  
  1101.   This event is automatically triggered whenever you switch files. 
  1102.  
  1103. The procedure definition primitives DEFINIT, DEFMAIN, DEFPROC, DEF and DEFC 
  1104. have no explicit termination keyword. Each definition is ended by the beginning 
  1105. of another DEFxxx. The rest of this chapter will explain each definition 
  1106. primitive in more detail. 
  1107.  
  1108.  
  1109. ΓòÉΓòÉΓòÉ 3.1. Parameter Retrieval using ARG(1) ΓòÉΓòÉΓòÉ
  1110.  
  1111. A DEFC or DEFMAIN receives only one argument/parameter: the command string. The 
  1112. command string consists of what was last typed at the command dialog box. The 
  1113. string may contain several words separated by spaces. In the case of DEFC, its 
  1114. sole argument will consist of all the characters typed at the E command dialog 
  1115. box after the name of the command. This argument is not declared as a parameter 
  1116. in the DEFC declaration. The DEFC construct does not allow for any parameter 
  1117. declarations. Instead, the argument can be retrieved via a function call, 
  1118. ARG(1). An example of this usage is: 
  1119.  
  1120.  
  1121.   defc test
  1122.     sayerror "arg(1) is " arg(1)
  1123.  
  1124. The user activates this command by typing test on the E command dialog box. 
  1125. This would result in the following being printed on the message area: arg(1) is 
  1126. . If the user added a parameter when calling test, for example test stuff, then 
  1127. the following string would be printed: arg(1) is stuff. 
  1128.  
  1129. In DEFMAIN, as with a DEFC, the only way to access the argument is to use an 
  1130. ARG(1) function call. DEFMAIN's argument/command string will consist of 
  1131. everything the user typed after the epm command at the OS/2 prompt. For 
  1132. example, assume that the following lines are added to the file MYMAIN.E: 
  1133.  
  1134.  
  1135.   defmain
  1136.     sayerror "arg(1) is " arg(1)
  1137.  
  1138. If the user invokes the editor with the command epm `list *.e', DEFMAIN will 
  1139. print arg(1) is  'list *.e' in the message area. 
  1140.  
  1141. A DEFPROC can receive multiple arguments separated by commas from the primitive 
  1142. that calls it. In a DEFPROC, ARG(1) is only the first parameter. An example of 
  1143. this usage is: 
  1144.  
  1145. defc test2
  1146.    call test2('actual param 1', 'actual param 2')
  1147.  
  1148. defproc test2(param1_decl, param2_decl)
  1149.    sayerror "arg(1) is " arg(1)
  1150. If the user types test2 at the command dialog box, the procedure will print 
  1151. arg(1) is actual param 1. 
  1152.  
  1153. For the exact syntax of the ARG() procedure, please refer to section Built-in 
  1154. Statements and Procedures. 
  1155.  
  1156.  
  1157. ΓòÉΓòÉΓòÉ 3.2. DEFINIT ΓòÉΓòÉΓòÉ
  1158.  
  1159. The DEFINIT keyword allows the initialization of variables for use by other E 
  1160. procedures. There is no limit to the number of DEFINIT definitions in an E 
  1161. source file. The order of execution of the DEFINIT definitions is the same as 
  1162. their compilation order. All DEFINIT definitions are executed before the 
  1163. DEFMAIN definition is executed. The general syntax is: 
  1164.  
  1165.   DEFINIT
  1166.   {UNIVERSAL variable  {,variable} }
  1167.   {statement}
  1168.  
  1169.  
  1170. ΓòÉΓòÉΓòÉ 3.3. DEFEXIT ΓòÉΓòÉΓòÉ
  1171.  
  1172. The DEFEXIT keyword allows for statements to be executed only when leaving the 
  1173. editor or unlinking a module. This is useful for any tasks the user wishes to 
  1174. perform once per session after any and all changes are made to a file. For 
  1175. example, this allows the user to keep files or communication channels open 
  1176. throughout the editing session for speed, and only close then when the user 
  1177. really exits from E. 
  1178.  
  1179. The syntax is the same as that of DEFINIT: 
  1180.  
  1181.   DEFEXIT
  1182.   {UNIVERSAL variable  {,variable} }
  1183.   {statement}
  1184.  
  1185.  
  1186. ΓòÉΓòÉΓòÉ 3.4. DEFMAIN ΓòÉΓòÉΓòÉ
  1187.  
  1188. The DEFMAIN construct allows the user to take control of the command line 
  1189. arguments, i.e. those arguments and options that the user specifies when 
  1190. invoking the editor at the OS/2 prompt. The command line arguments may be 
  1191. retrieved by an ARG(1) function call. The following example comes from the E 
  1192. editor's DEFMAIN in file MAIN.E: 
  1193.  
  1194. defmain
  1195.     os2cmdline = 'e 'arg(1)
  1196.  
  1197. The DEFMAIN definition is not required, and if present, it is executed after 
  1198. all DEFINIT definitions. To avoid an undefined state of the editor, a blank 
  1199. file is inserted in the top ring of the editor before DEFMAIN is executed. The 
  1200. general syntax is: 
  1201.  
  1202.   DEFMAIN
  1203.   {UNIVERSAL variable  {,variable} }
  1204.   statement  {statement}
  1205.  
  1206.  
  1207. ΓòÉΓòÉΓòÉ 3.5. Procedure Definitions (DEFPROC) ΓòÉΓòÉΓòÉ
  1208.  
  1209. The DEFPROC primitive is used to define new procedures (functions). The general 
  1210. syntax is: (See E language syntax for precise description). 
  1211.  
  1212.   DEFPROC  name [( [ [VAR] p1]  {, [VAR] p2})] [=]
  1213.      {UNIVERSAL variable  {,variable} }
  1214.      statement  {statement}
  1215.      [RETURN [expression] ].
  1216.  
  1217.    where name, p's and v's are valid E identifiers.
  1218.  
  1219. Procedures can return a string of 255 characters or less. If no string is 
  1220. returned, or if a simple RETURN statement with no value is issued, a null 
  1221. string is automatically returned when the procedure definition ends. 
  1222.  
  1223. The maximum number of DEFPROC arguments is 8. If parameters are specified (like 
  1224. p1 and p2 above) then the function is assumed to require a minimum of that many 
  1225. arguments. For example, if you've defined defproc myproc(x,y,z) but call it 
  1226. elsewhere with call myproc(a,b), you'll get an error when the call occurs (at 
  1227. run-time) "Procedure needs more arguments". But you can pass MORE than the 
  1228. minimum number of arguments. That is, call myproc(a,b,c,d) will work.  The 
  1229. number of arguments can be retrieved inside the procedure using arg(). You saw 
  1230. earlier how arg(1) retrieved the first parameter. Similarly, arg(2) retrieves 
  1231. the second parameter and arg(3) retrieves the third, etc. In the above example, 
  1232. the parameters c and d can be retrieved using the calls arg(3) and arg(4), 
  1233. respectively. For an illustration of this technique, see the file SORTE.E. 
  1234.  
  1235. If the keyword VAR prefaces a parameter name in the called procedure's 
  1236. parameter list, then the variable that the caller passes in the corresponding 
  1237. position may be changed (call by reference). If the caller passes a parameter 
  1238. in this position that is not a variable, the E interpreter will detect the 
  1239. error at run time and halt. 
  1240.  
  1241. In example 3, call by reference is demonstrated. If the user types test at the 
  1242. command dialog box, the defc test will call the defproc myproc() which will 
  1243. print: a and b are 1  2. After the procedure returns, defc test will print : a 
  1244. and b are 3  2. Variable b was permanently changed by the assignment in 
  1245. procedure myproc() because it had the var prefix. Variable a's value was 
  1246. unchanged once procedure myproc() returned. If defc test had made the following 
  1247. call: call myproc(a, 5*6), an invalid call by reference message would appear at 
  1248. run time. 
  1249.  
  1250.  
  1251. ΓòÉΓòÉΓòÉ 3.5.1. Example 1: ΓòÉΓòÉΓòÉ
  1252.  
  1253.      defproc  myproc               /* Define a new procedure */
  1254.        return  arg()               /* Return number of arguments */
  1255.                                    /* passed to procedure.*/
  1256.  
  1257.      def a_l                       /* Define the key Alt-L */
  1258.        call myproc()               /* Throw away 0 returned by myproc */
  1259.        Nofargs=myproc('a','b')     /* Sets Nofargs to 2 */
  1260.  
  1261.  
  1262. ΓòÉΓòÉΓòÉ 3.5.2. Example 2: ΓòÉΓòÉΓòÉ
  1263.  
  1264.      defproc  myproc               /* Define a new procedure */
  1265.        return  arg(1)              /* Return first argument  */
  1266.                                    /* passed to procedure.*/
  1267.  
  1268.      def a_l                       /* Define the key Alt-L */
  1269.        call myproc()               /* Throw away '' returned by myproc */
  1270.        Firstarg=myproc('a','b')    /* Sets Firstarg to 'a' */
  1271.        Firstarg=myproc()           /* Sets Firstarg to ''  */
  1272.  
  1273.  
  1274. ΓòÉΓòÉΓòÉ 3.5.3. Example 3: ΓòÉΓòÉΓòÉ
  1275.  
  1276.      definit
  1277.        universal  always_around    /* Define a global variable */
  1278.  
  1279.        always_around=0             /* set global variable to 0*/
  1280.  
  1281.  
  1282.      defc test
  1283.        a = 3
  1284.        b = 5
  1285.        call myproc(a, b)
  1286.        sayerror "a and b are " a b
  1287.  
  1288.      defproc  myproc(a,var b)      /* Define a new procedure */
  1289.        universal  always_around
  1290.  
  1291.        always_around=1             /* set global variable to 1*/
  1292.        a=1                         /* Change local parameter */
  1293.        b=2                         /* Change callers variable */
  1294.        i=10                        /* Set local variable */
  1295.        sayerror "a and b are " a b
  1296.  
  1297.  
  1298. ΓòÉΓòÉΓòÉ 3.6. Command Definitions (DEFC) ΓòÉΓòÉΓòÉ
  1299.  
  1300. The DEFC construct is used to define new commands. When a command is issued, E 
  1301. will search for the first word of the command as follows: 
  1302.  
  1303.  
  1304. ΓòÉΓòÉΓòÉ 3.6.1. Command search order: ΓòÉΓòÉΓòÉ
  1305.  
  1306.  1. Look for a DEFC command (i.e. one defined in a .E file) 
  1307.  2. Look for an internal editor command (e.g. MARGINS or EDIT) 
  1308.  3. Search the directories in the PATH environment variable for any executable 
  1309.     file, as follows: 
  1310.  
  1311.     a. a .EXE, .CMD, .EX file in current directory 
  1312.     b. a .EXE, .CMD, .EX file in the PATH or EPMPATH directories 
  1313.     c. a .EXE, .CMD, .EX file in the same directory as EPM.EXE. 
  1314.  
  1315. Because of the search order, user-defined commands with the same name as 
  1316. built-in commands can override internal editor commands. The XCOM command may 
  1317. be used to force execution of an internal editor command in the case of 
  1318. duplicates. 
  1319.  
  1320.  
  1321. ΓòÉΓòÉΓòÉ 3.6.2. Example: ΓòÉΓòÉΓòÉ
  1322.  
  1323.   defc   edit=              /* Redefine the edit command. */
  1324.     'xcom edit 'arg(1)      /* Pass command through to the editor  */
  1325. The general syntax is (See E language syntax for precise description): 
  1326.  
  1327.   DEFC  name {,name}  [=]
  1328.      {UNIVERSAL variable  {,variable} }
  1329.      statement  {statement}
  1330.      [RETURN [expression] ].
  1331.  
  1332.     where name is a valid E identifier.
  1333.  
  1334.  
  1335. ΓòÉΓòÉΓòÉ 3.7. Key Definitions (DEF and DEFKEYS) ΓòÉΓòÉΓòÉ
  1336.  
  1337. A keyset is a named collection of keys.  Typically, this collection defines a 
  1338. particular mode of editing. For example, you might want the keyboard to behave 
  1339. one way in a drawing mode and another way in an editing mode. Therefore, each 
  1340. of these modes would warrant its own keyset. You can have many keysets defined, 
  1341. but only one can be used at any time. 
  1342.  
  1343. The DEFKEYS keyword names the keyset. The KEYS statement activates a keyset. 
  1344. The DEF keyword defines a key or pseudo-key that belongs to the current keyset. 
  1345.  
  1346. Note:  Keys may be redefined.  If you create a DEF and the same DEF already 
  1347. exists in an earlier place in the compilation, the compiler will not issue an 
  1348. error.  It will forget the previous definition.  The penalty is that the 
  1349. previous code is not removed (difficult to do in a fast one-pass compiler), so 
  1350. a little memory will be wasted in the E.EX file. For a list of definable keys, 
  1351. see E-Definable Keys. 
  1352.  
  1353. DEF key_name|ch [-ch] {, key_name|ch [-ch]}[=] 
  1354.                     Define key. ch represents any printable character. A 
  1355.                     line-break (newline) is allowed after the comma, which can 
  1356.                     help readability if you're defining many keynames at once. 
  1357.  
  1358.                                         Example:
  1359.                                         /* Define 27 different keys to do same function,
  1360.                                                                                  pagedown. */
  1361.                                         def 'a'-'z', a_t = pagedown
  1362.  
  1363.                                         def '#' = 'add' /* define single key for add command */
  1364.  
  1365. DEFKEYS  name  [NEW | BASE | OVERLAY | CLEAR] 
  1366.                     Define keyset.  If the OVERLAY or no option is specified, 
  1367.                     then the last set of key definitions is copied onto the 
  1368.                     named set of keys.  The named keyset thus starts out with 
  1369.                     the same keys as the last one.  The NEW (or equivalent 
  1370.                     BASE) option starts a keyset with only the alphabetic, 
  1371.                     numeric and control characters. The CLEAR option starts an 
  1372.                     empty keyset. Please refer to section Keysets for more 
  1373.                     information on the BASE, OVERLAY and CLEAR options. 
  1374.  
  1375. A sample keyset named test_keys is defined below. This example shows the 
  1376. redefinition of the Enter and Space keys: 
  1377.  
  1378.                    defkeys test_keys
  1379.  
  1380.                    def ' '=
  1381.                       universal expand_on
  1382.                       if expand_on then
  1383.                          if  e_first_expansion()=0 then
  1384.                             keyin ' '
  1385.                          endif
  1386.                       else
  1387.                          keyin ' '
  1388.                       endif
  1389.  
  1390.                    def enter=
  1391.                       universal expand_on
  1392.  
  1393.                       if insertstate() then
  1394.                          insert
  1395.                       else
  1396.                          call maybe_autosave()
  1397.                          if expand_on then
  1398.                             if e_second_expansion()=0 then
  1399.                                call einsert_line()
  1400.                             endif
  1401.                          else
  1402.                             call einsert_line()
  1403.                          endif
  1404.                       endif
  1405.  
  1406.  
  1407. ΓòÉΓòÉΓòÉ 3.8. SET Definitions ΓòÉΓòÉΓòÉ
  1408.  
  1409. The E editor has a set of configuration options which may be reconfigured by a 
  1410. SET definition. SET definitions are executed before the DEFINIT procedure 
  1411. definitions are executed.  For examples of these configuration options, refer 
  1412. to The EPM User's Guide. 
  1413.  
  1414. It can be seen that there isn't much need for the SET definition primitive 
  1415. since most editor options can be set in DEFINIT and DEFMAIN. (We hope to do 
  1416. away with them in the future, in favor of straightforward commands like 'tabs' 
  1417. and 'margins'.) 
  1418.  
  1419. Most users will care to change only insert_state. 
  1420.  
  1421.  
  1422. ΓòÉΓòÉΓòÉ 3.9. Constants ΓòÉΓòÉΓòÉ
  1423.  
  1424. The CONST keyword allows a user to define constants that the E translator 
  1425. remembers during the translation of the E procs. ET substitutes the value 
  1426. whenever it sees the constant name. Constants serve no purpose at run-time. 
  1427.  
  1428. Constants may be redefined to the same value without causing an error or loss 
  1429. of memory space.  This is useful if you wish to develop a package for 
  1430. distribution, since you can define the constants you need without worrying 
  1431. about conflict with other files installed by the user.  The syntax for defining 
  1432. constants is: 
  1433.  
  1434.    CONST
  1435.       c1 = exp1 [,]
  1436.       c2 = exp2 [,]
  1437.       ...
  1438.  
  1439.  example
  1440.     CONST
  1441.        a=3
  1442.        b=a * 2
  1443.  
  1444.  
  1445. ΓòÉΓòÉΓòÉ 3.10. DEFMODIFY ΓòÉΓòÉΓòÉ
  1446.  
  1447. The DEFMODIFY event is executed when a file's number of modifications: 
  1448.  
  1449. o goes from zero to nonzero (the first modification - we might want to change 
  1450.   the screen color); 
  1451. o goes from nonzero to zero (after a save - we might want to change the screen 
  1452.   color back again); 
  1453. o goes from less than .autosave to greater than or equal to .autosave (so we 
  1454.   can autosave). 
  1455.  
  1456. See the file MODIFY.E for more details. 
  1457.  
  1458.  
  1459. ΓòÉΓòÉΓòÉ 3.11. DEFLOAD ΓòÉΓòÉΓòÉ
  1460.  
  1461. DEFLOAD is invoked whenever a new file is created in the ring, whether loaded 
  1462. from disk or created by 'edit /n' or 'edit /c'. 
  1463.  
  1464. It is invoked at the end of all processing, the last thing before returning 
  1465. control to the user, so as not to be fooled by the file moving around in the 
  1466. ring or being renamed. If a file is loaded from disk and renamed, DEFLOAD gets 
  1467. the right filename. 
  1468.  
  1469. After all new files are defload-processed, the expected current file is 
  1470. restored.  Thus the command 'e one two' loads both files, invokes defload on 
  1471. 'one', then on 'two', and finally re-activates 'one'; the user is left looking 
  1472. at the same file as in the old days.  This is done internally so the defload 
  1473. procs don't have to worry about restoring fileids.  Understand this example: 
  1474.  
  1475.    defc rcedit
  1476.       'edit 'arg(1)
  1477.       if rc=sayerror('New file') then
  1478.          sayerror "It's a new file"
  1479.       endif
  1480.  
  1481.    defload  -- this defload procedure need not be close to the defc.
  1482.       sayerror "DEFLOAD for ".filename
  1483.  
  1484. When you type 'rcedit nosuch', the file nosuch (which doesn't exist on disk) is 
  1485. created in the ring.  DEFLOAD is not triggered until after all other procs are 
  1486. done, so RCEDIT runs to completion with the proper RC value.  You'll see 'It's 
  1487. a new file' and then 'DEFLOAD for nosuch'. For another example of a DEFLOAD 
  1488. definition statement see sample menu addition. 
  1489.  
  1490. It's not guaranteed that the files will be defload-processed in the same order 
  1491. as they're loaded.  They're processed in fileid order.  So 'two' might have 
  1492. been processed before 'one' if fileids are reused. 
  1493.  
  1494. The DEFLOAD event is also triggered whenever the name of the file changes. 
  1495. Typically a DEFLOAD will do things like set tabs and margins based on the 
  1496. filetype, so a name change is treated the same as a new load. 
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ 3.12. DEFSELECT ΓòÉΓòÉΓòÉ
  1500.  
  1501. This event is automatically triggered whenever you switch files.  To be exact, 
  1502. it is invoked after all other command processing is done, if the then-current 
  1503. file is different from the current file before the command.  Thus if a command 
  1504. switches to a temporary file but switches back to the original file before 
  1505. ending, this event will not be triggered. 
  1506.  
  1507. This replaces the clumsy previous method, a procedure select_edit_keys() which 
  1508. had to be explicitly called at the end of any action that might have switched 
  1509. files. 
  1510.  
  1511. But there's not much work to be done in this event because most of the things 
  1512. that used to be done in select_edit_keys() are now done only once at file-load 
  1513. time, in the DEFLOAD event.  The keyset, tabs and margins stick with the file 
  1514. from then on.  In the standard macros nothing is done in the DEFSELECT. 
  1515.  
  1516. Note:  The order of events at start-up is:  definit, defmain, defload, 
  1517. defmodify and defselect.  The defmodify event would not normally occur at 
  1518. start-up, unless your defmain modified the newly-loaded file. 
  1519.  
  1520. These three events can be multiply defined.  You can have multiple procedures 
  1521. under the same name scattered throughout your macro set, and they'll be run in 
  1522. succession.  (As DEFINIT procedures have been scattered around the E files in 
  1523. the past.)  This helps keep the macros modular - if you're writing an editor 
  1524. application that needs to get control whenever a new file is loaded (the old 
  1525. BOOKMARK application comes to mind), you can write a DEFLOAD within your module 
  1526. without having to alter the base E files. 
  1527.  
  1528.  
  1529. ΓòÉΓòÉΓòÉ 4. Statements ΓòÉΓòÉΓòÉ
  1530.  
  1531. Procedures, commands and key definitions are composed of statements. Valid 
  1532. statements in the E language are: 
  1533.  
  1534. Construct:                          Example: 
  1535.  
  1536. assignment statements 
  1537.                                     temp = 36 
  1538.  
  1539. built-in statements 
  1540.                                     insertline "Written by the Yorktown E 
  1541.                                     group", 2 
  1542.  
  1543. conditional statements 
  1544.                                     to be discussed in section Conditional and 
  1545.                                     Loop Statements 
  1546.  
  1547. parse statements 
  1548.                                     to be discussed in section The Parse 
  1549.                                     Statement 
  1550.  
  1551. compiler directive statements 
  1552.                                     to be discussed in section Compiler 
  1553.                                     Directive Statements 
  1554.  
  1555. procedure calls 
  1556.                                     testproc(arg1, arg2) 
  1557.  
  1558. commands 
  1559.                                     to be discussed in section Using EPM 
  1560.                                     Commands in E Statements 
  1561.  
  1562.  
  1563. ΓòÉΓòÉΓòÉ 4.1. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  1564.  
  1565. In the following syntactic description the same symbolic conventions are used 
  1566. as in The EPM User's Guide section "E Commands". In addition, the word var 
  1567. followed by an argument means that the argument must be a variable, i.e. a 
  1568. number, string or expression is not acceptable. 
  1569.  
  1570. Most of the following statements can be optionally spelled with underscores 
  1571. between the words. Please refer to E Language Syntax for more information. 
  1572.  
  1573. Those commands followed by parentheses are procedures; those not followed by 
  1574. parentheses are statements. Each can be followed by arguments. Only procedures 
  1575. can return values. 
  1576.  
  1577.  
  1578. ΓòÉΓòÉΓòÉ 4.1.1. ABBREV(information, info [, length] ) ΓòÉΓòÉΓòÉ
  1579.  
  1580. Choose: 
  1581.  
  1582. o Syntax 
  1583. o Definition 
  1584. o Example 
  1585. o E Language Syntax 
  1586.  
  1587.  
  1588. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1589.  
  1590. ABBREV(information, info [, length]) 
  1591.  
  1592.  
  1593. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1594.  
  1595. ABBREV returns 1 if info is equal to the leading characters of information and 
  1596. the length of info is not less than length. ABBREV returns 0 if neither of 
  1597. these conditions is met. 
  1598.  
  1599. If specified, length must be a nonnegative whole number. The default for length 
  1600. is the number of characters in info. 
  1601.  
  1602.  
  1603. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1604.  
  1605. Here are some examples: 
  1606.  
  1607.  ABBREV('Print','Pri')      ->    1
  1608.  ABBREV('PRINT','Pri')      ->    0
  1609.  ABBREV('PRINT','PRI',4)    ->    0
  1610.  ABBREV('PRINT','PRY')      ->    0
  1611.  ABBREV('PRINT','')         ->    1
  1612.  ABBREV('PRINT','',1)       ->    0
  1613.  
  1614. Note:  A null string will always match if a length of 0 (or the default) is 
  1615.        used. This allows a default keyword to be selected automatically if 
  1616.        desired. For example:
  1617.  
  1618. option = entrybox('Enter option:')
  1619.         /* keyword1 is to be the default */
  1620. if abbrev('keyword1',option) then ...
  1621. elseif abbrev('keyword2',option) then ...
  1622.   ...
  1623. endif
  1624.  
  1625.  
  1626. ΓòÉΓòÉΓòÉ 4.1.2. ACTIVATEACCELTABLE var fileid ΓòÉΓòÉΓòÉ
  1627.  
  1628. Choose: 
  1629.  
  1630. o Syntax 
  1631. o Definition 
  1632. o E Language Syntax 
  1633.  
  1634.  
  1635. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1636.  
  1637. ACTIVATEACCELTABLE  table_name 
  1638.  
  1639.  
  1640. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1641.  
  1642. Makes the named accelerator table the active one. 
  1643.  
  1644. See also: 
  1645.  
  1646. o Building Accelerator Tables from the Macro Language 
  1647. o BUILDACCELTABLE 
  1648. o DELETEACCEL 
  1649. o QUERYACCELSTRING 
  1650.  
  1651.  
  1652. ΓòÉΓòÉΓòÉ 4.1.3. ACTIVATEFILE var fileid ΓòÉΓòÉΓòÉ
  1653.  
  1654. Choose: 
  1655.  
  1656. o Syntax 
  1657. o Definition 
  1658. o Example 
  1659. o E Language Syntax 
  1660.  
  1661.  
  1662. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1663.  
  1664. ACTIVATEFILE  fileid 
  1665.  
  1666.  
  1667. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1668.  
  1669. Makes the file identified by the variable fileid the current file. 
  1670.  
  1671. Fileid must be a simple variable (as indicated by the word var)  containing a 
  1672. valid file id number.  If you give an expression, the compiler will stop and 
  1673. complain, "Expression not assignment compatible." 
  1674.  
  1675.  
  1676. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1677.  
  1678.       Correct usage:
  1679.       ACTIVATEFILE myfileid
  1680.  
  1681.       The following expressions will not work:
  1682.       ACTIVATEFILE  fileid' '
  1683.       ACTIVATEFILE ARG(1)
  1684.  
  1685.  
  1686. ΓòÉΓòÉΓòÉ 4.1.4. ADDRESS(variable) ΓòÉΓòÉΓòÉ
  1687.  
  1688. Choose: 
  1689.  
  1690. o Syntax 
  1691. o Definition 
  1692. o Definition 
  1693. o E Language Syntax 
  1694.  
  1695.  
  1696. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1697.  
  1698. ADDRESS( variable ) 
  1699.  
  1700.  
  1701. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1702.  
  1703. Returns the address of a variable. Intended for use in dynalink calls, the 
  1704. format of the address depends on the version of EPM being used. 
  1705.  
  1706.  
  1707. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1708.  
  1709. In 16-bit versions (EPM 5.xx), 
  1710.  
  1711.   ADDRESS(varname) == SELECTOR(varname) || OFFSET(varname)
  1712.  
  1713. In 32-bit versions (EPM 6.xx), 
  1714.  
  1715.   ADDRESS(varname) ==  OFFSET(varname) || SELECTOR(varname)
  1716.  
  1717.  
  1718. ΓòÉΓòÉΓòÉ 4.1.5. ADJUSTBLOCK ΓòÉΓòÉΓòÉ
  1719.  
  1720. Choose: 
  1721.  
  1722. o Syntax 
  1723. o Definition 
  1724. o E Language Syntax 
  1725.  
  1726.  
  1727. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1728.  
  1729. ADJUSTBLOCK | ADJUST_BLOCK 
  1730.  
  1731.  
  1732. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1733.  
  1734. Overlays marked block at cursor, like the standard key definition Alt-A.  The 
  1735. source block is filled with spaces. 
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ 4.1.6. ADJUSTMARK ΓòÉΓòÉΓòÉ
  1739.  
  1740. Choose: 
  1741.  
  1742. o Syntax 
  1743. o Definition 
  1744. o E Language Syntax 
  1745.  
  1746.  
  1747. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1748.  
  1749. ADJUSTMARK 
  1750.  
  1751.  
  1752. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1753.  
  1754. Moves marked text to the location of the cursor by overlaying. The old location 
  1755. is filled with blanks. 
  1756.  
  1757.  
  1758. ΓòÉΓòÉΓòÉ 4.1.7. ARG([numeric_expression]) ΓòÉΓòÉΓòÉ
  1759.  
  1760. Choose: 
  1761.  
  1762. o Syntax 
  1763. o Definition 
  1764. o Example 
  1765. o E Language Syntax 
  1766.  
  1767.  
  1768. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1769.  
  1770. ARG([numeric_expression]) 
  1771.  
  1772.  
  1773. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1774.  
  1775. May be used only in a DEFMAIN, DEFC or DEFPROC. In the case of a DEFPROC, if 
  1776. numeric_expression is not given, the number of arguments passed to the macro is 
  1777. returned.  Otherwise the expression is evaluated to a number and the 
  1778. corresponding argument is returned. If there are fewer arguments than specified 
  1779. by the expression, a null string is returned. 
  1780.  
  1781.  
  1782. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1783.  
  1784. For example: 
  1785.  
  1786.   numofargs = arg()
  1787.   argfour = arg(4)
  1788.  
  1789. In the first example, the number of arguments that were passed is returned in 
  1790. the variable numofargs. In the second example the four argument is returned in 
  1791. the variable argfour. 
  1792.  
  1793.  
  1794. ΓòÉΓòÉΓòÉ 4.1.8. ASC(character) ΓòÉΓòÉΓòÉ
  1795.  
  1796. Choose: 
  1797.  
  1798. o Syntax 
  1799. o Definition 
  1800. o Example 
  1801. o E Language Syntax 
  1802.  
  1803.  
  1804. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1805.  
  1806. ASC('character') 
  1807.  
  1808.  
  1809. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1810.  
  1811. Returns the ASCII decimal value of the character expression. 
  1812.  
  1813.  
  1814. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1815.  
  1816. For example: 
  1817.  
  1818.   ASC('A') = 65
  1819.  
  1820.  
  1821. ΓòÉΓòÉΓòÉ 4.1.9. ATOI(numeric_expression) ΓòÉΓòÉΓòÉ
  1822.  
  1823. Choose: 
  1824.  
  1825. o Syntax 
  1826. o Definition 
  1827. o Example 
  1828. o E Language Syntax 
  1829.  
  1830.  
  1831. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1832.  
  1833. ATOI('numeric_expression') 
  1834.  
  1835.  
  1836. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1837.  
  1838. Converts the E language representation of a number (as a string) to the C 
  1839. language representation of an integer (data type int). Since many functions 
  1840. that are available through the function DYNALINK() require input to be in 
  1841. binary numbers as opposed to ASCII strings, we provide functions to convert 
  1842. ASCII strings into binary numbers. For an example of this usage see the 
  1843. DYNALINK() entry in this section. 
  1844.  
  1845.  
  1846. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1847.  
  1848. The following shows the high-level strings and the equivalent machine 
  1849. representation: 
  1850.  
  1851. string     machine representation  (hexadecimal digits)
  1852. '40'           34 30    /* '4' is 0x34 & '0' is 0x30 */
  1853.  
  1854. atoi('40')     28 00    /* 28 00 is 40 decimal       */
  1855.                         /* since byte swapping       */
  1856.                         /* exists in the Intel       */
  1857.                         /* architecture              */
  1858.                         /* In reality the word       */
  1859.                         /* would be 0x0028           */
  1860.  
  1861.  
  1862. ΓòÉΓòÉΓòÉ 4.1.10. ATOL(numeric_expression) ΓòÉΓòÉΓòÉ
  1863.  
  1864. Choose: 
  1865.  
  1866. o Syntax 
  1867. o Definition 
  1868. o E Language Syntax 
  1869.  
  1870.  
  1871. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1872.  
  1873. ATOL('numeric_expression') 
  1874.  
  1875.  
  1876. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1877.  
  1878. Converts the E language representation of a number (as a string) to the C 
  1879. language representation of a long integer (data type long). For use with C 
  1880. functions that require numeric parameters, for example function calls via 
  1881. DYNALINK(). 
  1882.  
  1883.  
  1884. ΓòÉΓòÉΓòÉ 4.1.11. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var fileid] ΓòÉΓòÉΓòÉ
  1885.  
  1886. Choose: 
  1887.  
  1888. o Syntax 
  1889. o Definition 
  1890. o Example 
  1891. o E Language Syntax 
  1892.  
  1893.  
  1894. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  1895.  
  1896. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var 
  1897. fileid] 
  1898.  
  1899.  
  1900. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  1901.  
  1902. subop is one of the following: 
  1903.  
  1904. const
  1905.    FIND_NEXT_ATTR_SUBOP =  1
  1906.    FIND_PREV_ATTR_SUBOP =  2
  1907.    FIND_MATCH_ATTR_SUBOP = 3
  1908.    DELETE_ATTR_SUBOP =    16
  1909.  
  1910. The use of the remaining parameters varies with the operation to be performed. 
  1911.  
  1912. FIND_NEXT_ATTR_SUBOP This action finds the next occurance (not including the 
  1913.           specified location) of an attribute record of the specified class. 
  1914.  
  1915.    class   On input, this specifies the attribute class of the attribute 
  1916.            records of interest.  A value of ANY_CLASS (zero) indicates that the 
  1917.            position of the next attribute record of any class should be 
  1918.            returned. On output, the class of the found attribute.  A class of 
  1919.            zero indicates that no attribute record was found. 
  1920.    offset  On input, the location (non-inclusive) where the search is to begin. 
  1921.            On output, the location of the found attribute record.  If none was 
  1922.            found, then the parameter will not be modified. 
  1923.    column  On input, the location where the search is to begin. On output, the 
  1924.            location of the found attribute record.  If none was found, then the 
  1925.            parameter will not be modified. 
  1926.    line    On input, the location where the search is to begin. On output, the 
  1927.            location of the found attribute record.  If none was found, then the 
  1928.            parameter will not be modified. 
  1929.    fileid  The fileid of the file where the search is to occur.  The default is 
  1930.            the current file. 
  1931.  
  1932. FIND_PREV_ATTR_SUBOP This action is just like the FIND_NEXT_ATTR_SUBOP except 
  1933.           that it finds the previous occurance of an attribute record of the 
  1934.           specified class rather than the next occurance. 
  1935.  
  1936. FIND_MATCH_ATTR_SUBOP This action finds the (push/pop model) attribute record 
  1937.           that matches the specified attribute record. For example, if a push 
  1938.           attribute record was specified, the location of the corresponding pop 
  1939.           attribute record is returned. 
  1940.  
  1941.    class   Unused parameter 
  1942.    offset  On input, the location (non-inclusive) where the search for the 
  1943.            match is to begin.  An attribute record must exist at this location 
  1944.            or an error code will be flagged. On output, the location of the 
  1945.            found attribute record.  If none was found, then the parameter will 
  1946.            not be modified. 
  1947.    column  On input, the location where the search is to begin. On output, the 
  1948.            location of the found attribute record.  If none was found, then the 
  1949.            parameter will not be modified. 
  1950.    line    On input, the location where the search is to begin. On output, the 
  1951.            location of the found attribute record.  If none was found, then the 
  1952.            parameter will not be modified. 
  1953.    fileid  The fileid of the file where the search is to occur.  The default is 
  1954.            the current file. 
  1955.  
  1956. DELETE_ATTR_SUBOP Deletes the attribute record at the specified location.  If 
  1957.           attribute records exists at the specified character position having 
  1958.           an offset of the same sign as the specified attribute record but of 
  1959.           larger magnitude, then those attribute records will be shifted in 
  1960.           (their offset will be incremented or decremented) to fill in the 
  1961.           vacated location. 
  1962.  
  1963.    class   On input, this  is unused On output, the class of the deleted 
  1964.            attribute record.  Zero if no attribute record exists at the 
  1965.            specified location. 
  1966.    offset  The location of the attribute record to be deleted. 
  1967.    column  The location of the attribute record to be deleted. 
  1968.    line    The location of the attribute record to be deleted. 
  1969.    fileid  The fileid of the file where the specified attribute record is to be 
  1970.            found.  The default is the current file. 
  1971.  
  1972. See Attribute Pairs for additional information on attributes. 
  1973.  
  1974.  
  1975. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  1976.  
  1977. class = 1         -- 1 = COLOR_CLASS
  1978. offst1 = -255
  1979. col = .col
  1980. line = .line
  1981. getfileid fileid
  1982. attribute_action 1, class, offst1, col, line, fileid -- 1=FIND NEXT ATTR
  1983. if class & col = .col & line = .line  then  -- Found one on this character.
  1984.    offst2 = offst1
  1985.    attribute_action 3, class, offst2, col, line, fileid -- 3=FIND MATCH ATTR
  1986.    if class then      -- Found a match; delete them both.
  1987.       attribute_action 16, class, offst1, .col, .line, fileid -- 16=DELETE ATTR
  1988.       attribute_action 16, class, offst2, col, line, fileid -- 16=DELETE ATTR
  1989.    endif
  1990. endif
  1991.  
  1992. This code checks for a color attribute on the current character.  If found, it 
  1993. checks for the matching attribute.  If both a Push and Pop exist, both are 
  1994. deleted. 
  1995.  
  1996.  
  1997. ΓòÉΓòÉΓòÉ 4.1.12. BACKTAB ΓòÉΓòÉΓòÉ
  1998.  
  1999. Choose: 
  2000.  
  2001. o Syntax 
  2002. o Definition 
  2003. o E Language Syntax 
  2004.  
  2005.  
  2006. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2007.  
  2008. BACKTAB 
  2009.  
  2010.  
  2011. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2012.  
  2013. Moves cursor to previous tab stop.  Like the standard Shift-Tab. 
  2014.  
  2015.  
  2016. ΓòÉΓòÉΓòÉ 4.1.13. BACKTABWORD ΓòÉΓòÉΓòÉ
  2017.  
  2018. Choose: 
  2019.  
  2020. o Syntax 
  2021. o Definition 
  2022. o E Language Syntax 
  2023.  
  2024.  
  2025. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2026.  
  2027. BACKTABWORD | BACKTAB_WORD 
  2028.  
  2029.  
  2030. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2031.  
  2032. Positions cursor on first character of previous word, like the standard 
  2033. Ctrl-Left. If there are no more previous words the cursor is positioned at 
  2034. beginning of line. 
  2035.  
  2036.  
  2037. ΓòÉΓòÉΓòÉ 4.1.14. BACKWARD ΓòÉΓòÉΓòÉ
  2038.  
  2039. Choose: 
  2040.  
  2041. o Syntax 
  2042. o Definition 
  2043. o E Language Syntax 
  2044.  
  2045.  
  2046. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2047.  
  2048. BACKWARD 
  2049.  
  2050.  
  2051. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2052.  
  2053. Same as page_up. 
  2054.  
  2055.  
  2056. ΓòÉΓòÉΓòÉ 4.1.15. BEEP([pitch [, duration] ]) ΓòÉΓòÉΓòÉ
  2057.  
  2058. Choose: 
  2059.  
  2060. o Syntax 
  2061. o Definition 
  2062. o Example 
  2063. o E Language Syntax 
  2064.  
  2065.  
  2066. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2067.  
  2068. BEEP( [ pitch [, duration] ] ) 
  2069.  
  2070.  
  2071. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2072.  
  2073. Sounds a beep defined by pitch (in Hertz) and duration (in milliseconds).  The 
  2074. default pitch is 900 and the defualt duration is 500. 
  2075.  
  2076.  
  2077. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2078.  
  2079.     BEEP(850,1000)
  2080.  
  2081. This example will produce a beep with a frequency of 850 Hertz for a duration 
  2082. of 1 second. 
  2083.  
  2084.  
  2085. ΓòÉΓòÉΓòÉ 4.1.16. BEGINLINE ΓòÉΓòÉΓòÉ
  2086.  
  2087. Choose: 
  2088.  
  2089. o Syntax 
  2090. o Definition 
  2091. o E Language Syntax 
  2092.  
  2093.  
  2094. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2095.  
  2096. BEGINLINE | BEGIN_LINE 
  2097.  
  2098.  
  2099. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2100.  
  2101. Moves cursor to beginning of current line, like the standard Home key. 
  2102.  
  2103.  
  2104. ΓòÉΓòÉΓòÉ 4.1.17. BOTTOM, BOT ΓòÉΓòÉΓòÉ
  2105.  
  2106. Choose: 
  2107.  
  2108. o Syntax 
  2109. o Definition 
  2110. o E Language Syntax 
  2111.  
  2112.  
  2113. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2114.  
  2115. BOTTOM | BOT 
  2116.  
  2117.  
  2118. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2119.  
  2120. Moves cursor to last line of file, like the standard Ctrl-End. 
  2121.  
  2122.  
  2123. ΓòÉΓòÉΓòÉ 4.1.18. BROWSE( 0 | 1 ) ΓòÉΓòÉΓòÉ
  2124.  
  2125. Choose: 
  2126.  
  2127. o Syntax 
  2128. o Definition 
  2129. o E Language Syntax 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2133.  
  2134. BROWSE([0 | 1]) 
  2135.  
  2136.  
  2137. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2138.  
  2139. Turns browse mode on for the current file. Browse mode is a read-only mode. 0 
  2140. turns the browse mode off; 1 turns it on.  If no argument is given BROWSE 
  2141. returns the current mode. 
  2142.  
  2143.  
  2144. ΓòÉΓòÉΓòÉ 4.1.19. BUFFER( subfunction_number, parameters... ) ΓòÉΓòÉΓòÉ
  2145.  
  2146. Choose: 
  2147.  
  2148. o Syntax 
  2149. o Definition 
  2150. o E Language Syntax 
  2151.  
  2152.  
  2153. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2154.  
  2155. BUFFER() 
  2156.  
  2157.  
  2158. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2159.  
  2160. Is for developers of advanced applications who want to share text with external 
  2161. processes.  It allows an E application to create a shared memory buffer of a 
  2162. specified name and copy text to it, so that other processes can open the buffer 
  2163. and read the text from E. (For those interested in OS/2 internals, the buffer 
  2164. creation calls DosAllocShrSeg().) 
  2165.  
  2166. The buffer function provides several subfunctions:  create a new buffer; open 
  2167. an existing buffer; free a buffer; get and put text; query the allocated and 
  2168. used size of a buffer.  You specify the subfunction you want with the first 
  2169. argument, one of: CREATEBUF, OPENBUF, FREEBUF, GETBUF, PUTBUF, MAXSIZEBUF, or 
  2170. USEDSIZEBUF. (These are only numeric constants from 0 to 6, as defined in 
  2171. STDCONST.E.)  The meaning of the remaining arguments to buffer() depends on the 
  2172. subfunction, as shown in the seven cases below. 
  2173.  
  2174. The maximum buffer size is 65535 bytes.  E uses the first 32 bytes of the 
  2175. buffer for status information: 
  2176.  
  2177.    2 bytes:  bufsize available for text,
  2178.                    without the header
  2179.    2 bytes:  amount of buffer filled, <= bufsize
  2180.    2 bytes:  format (explained below)
  2181.    2 bytes:  number of lines if known
  2182.                    (E fills this in on a PUT)
  2183.   26 bytes:  reserved for anything
  2184.                    the application might want.
  2185. Thus the maximum space available for text is 65535-32 = 65503 bytes. 
  2186.  
  2187. bufhndl = buffer( CREATEBUF, name [,size [,private]])
  2188.  
  2189. CREATEBUF allocates a shared memory segment of name "\SHAREMEM\name". The 
  2190. prefix "\SHAREMEM\" is automatic and shouldn't be supplied. The size 
  2191. specification is optional.  If it's zero or omitted, it defaults to the maximum 
  2192. size of 65503. 
  2193.  
  2194. A last optional argument, private, can be supplied with a nonzero value if you 
  2195. do not want want the buffer to be shared by other processes.  You might wish to 
  2196. create a memory buffer for use by your application only, in which case you 
  2197. should specify private to avoid using one of the limited number of OS/2 shared 
  2198. buffers.  (Technically, a private buffer is created with DosAllocSeg() rather 
  2199. than DosAllocShrSeg().) 
  2200.  
  2201. The return value from CREATEBUF is a handle or ID, to be used by the other 
  2202. subfunctions.  (Actually the handle is the buffer segment selector, in string 
  2203. form like that returned by seg(), ready for use by peek and poke.)  A return 
  2204. value of 0 means an error; RC will contain the error code given by OS/2. 
  2205.  
  2206. bufhndl = buffer( OPENBUF, name)
  2207.  
  2208. OPENBUF shares a buffer created by another process.  Again, bufhndl is 
  2209. returned; zero means a system error is returned in RC.  It is expected that the 
  2210. other process has put the format and size into the first 2 words of the buffer, 
  2211. and starts the data at offset 32. 
  2212.  
  2213. success = buffer( FREEBUF, bufhndl)
  2214.  
  2215. FREEBUF frees the buffer.  It's not required if you're exiting from E, but 
  2216. recommended.  The return value is zero if an error occurred, for consistency; 
  2217. zero means an error for all these subfunctions. 
  2218.  
  2219. noflines= buffer( GETBUF, bufhndl)
  2220.  
  2221. GETBUF loads all of a buffer into the current file at the current location, in 
  2222. the same manner as a GET command.  You have no control over the number of 
  2223. lines; normally you'll do the GETBUF into a new empty file.  The return value 
  2224. is the number of lines transferred. A zero value along with a zero RC means the 
  2225. buffer was empty. (Note:  RC is automatically zeroed at the start of any 
  2226. buffer() function.) 
  2227.  
  2228. noflines= buffer( PUTBUF, bufhndl, startline
  2229.           [,endline [,format]])
  2230.  
  2231. PUTBUF copies the current file's text from startline through endline. If 
  2232. endline is omitted, or specified as zero or a huge value, as many whole lines 
  2233. are copied as will fit, stopping at the end of file of course. The return value 
  2234. is the number of lines transferred. 
  2235.  
  2236. size    = buffer( MAXSIZEBUF, bufhndl)
  2237.  
  2238. MAXSIZEBUF returns the buffer capacity, in case some other process created it 
  2239. and you don't know its size.  (This subfunction gives the same value as 
  2240. peek(bufhndl,0,2).) 
  2241.  
  2242. size    = buffer( USEDSIZEBUF, bufhndl)
  2243.  
  2244. USEDSIZEBUF returns the size of data in the buffer. (This gives the same value 
  2245. as peek(bufhndl,2,2).) 
  2246.  
  2247. The format word in the header determines how the lines are formatted. It's a 
  2248. bit string so you can mix and match options: 
  2249.  
  2250. APPENDCR     1   append ASCII 13 after each line
  2251. APPENDLF     2   append ASCII 10 after the CR if any
  2252. APPENDNULL   4   append ASCII  0 after the CR-LF if any
  2253. TABCOMPRESS  8   tab-compress the line
  2254. STRIPSPACES 16   remove trailing spaces as usual in a save
  2255. FINALNULL   32   append a null at end of the buffer
  2256. The default format if unspecified is 19, for CR-LF and remove trailing spaces. 
  2257.  
  2258. Note:  The format is ignored on a GET.  E handles whatever characters it finds, 
  2259. in the same manner as loading a disk file.  CR-LF's are dropped, tabs are 
  2260. expanded. 
  2261.  
  2262. Note 2:  if an external process fills a buffer, it should make sure that the 
  2263. last line is properly terminated with the appropriate end-of-line.  E will 
  2264. double-check for this to protect against overrunning the end of the buffer.  E 
  2265. will deposit an end-of-line if needed and restore whatever character was there, 
  2266. but this might not be what the other process expected. 
  2267.  
  2268. For sample usages, see the file BUFF.E. 
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ 4.1.20. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  2272.  
  2273. Choose: 
  2274.  
  2275. o Syntax 
  2276. o Definition 
  2277. o E Language Syntax 
  2278.  
  2279.  
  2280. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2281.  
  2282. BUILDACCELTABLE table_name, command, accel_flags, key, index 
  2283.  
  2284.  
  2285. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2286.  
  2287. Adds an entry to an accelerator table. 'tablename' is the name of the 
  2288. accelerator table being built (and is later passed as a parameter to the 
  2289. activateacceltable statement), 'command' is the command to be executed when the 
  2290. accelerator key is pressed, accel_flags is the sum of some AF_ constants from 
  2291. STDCONST.E, 'key' is as ASCII value for AF_CHAR, a VK_ constant for 
  2292. AF_VIRTUALKEY, etc., and 'index' is a unique index number for that table.  You 
  2293. can reuse an index value to replace an entry in the accelerator table. 
  2294.  
  2295. Note:  Index values must be unique in both the current accelerator table and 
  2296. the current action bar. 
  2297.  
  2298. Some of the VK_ constants are defined in STDCONST.E; the full set can be found 
  2299. in PMWIN.H in the OS/2 toolkit. 
  2300.  
  2301. See also: 
  2302.  
  2303. o Building Accelerator Tables from the Macro Language 
  2304. o ACTIVATEACCELTABLE 
  2305. o DELETEACCEL 
  2306. o QUERYACCELSTRING 
  2307.  
  2308.  
  2309. ΓòÉΓòÉΓòÉ 4.1.21. BUILDMENUITEM ΓòÉΓòÉΓòÉ
  2310.  
  2311. Choose: 
  2312.  
  2313. o Syntax 
  2314. o Definition 
  2315. o E Language Syntax 
  2316.  
  2317.  
  2318. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2319.  
  2320. BUILDMENUITEM 
  2321.  
  2322.  
  2323. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2324.  
  2325. Is used to build entries on the action bar menu. See Building Menus from the 
  2326. Macro Language for more information on the BUILDMENUITEM statement. 
  2327.  
  2328.  
  2329. ΓòÉΓòÉΓòÉ 4.1.22. BUILDSUBMENU ΓòÉΓòÉΓòÉ
  2330.  
  2331. Choose: 
  2332.  
  2333. o Syntax 
  2334. o Definition 
  2335. o E Language Syntax 
  2336.  
  2337.  
  2338. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2339.  
  2340. BUILDSUBMENU 
  2341.  
  2342.  
  2343. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2344.  
  2345. Is used to build sub menu entries on the action bar menu. 
  2346.  
  2347.  
  2348. ΓòÉΓòÉΓòÉ 4.1.23. CALL  procedurename() ΓòÉΓòÉΓòÉ
  2349.  
  2350. Choose: 
  2351.  
  2352. o Syntax 
  2353. o Definition 
  2354. o E Language Syntax 
  2355.  
  2356.  
  2357. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2358.  
  2359. CALL  procedurename 
  2360.  
  2361.  
  2362. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2363.  
  2364. Throws away the result of the procedure call. You could substitute any 
  2365. expression for procedurename, e.g. call 2*2, but typically it will be a 
  2366. procedure call such as "call machine()". 
  2367.  
  2368. Throwing away the result of a procedure call is often necessary because 
  2369. otherwise the result is executed.  If a procedure returns 0, the valid command 
  2370. '0' is executed which takes the cursor to the "Top of File" header (line 0). 
  2371.  
  2372. Generally is always advisable to use the call statement unless the returned 
  2373. value is used in some manner. 
  2374.  
  2375.  
  2376. ΓòÉΓòÉΓòÉ 4.1.24. CENTER(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2377.  
  2378. Choose: 
  2379.  
  2380. o Syntax 
  2381. o Definition 
  2382. o Example 
  2383. o E Language Syntax 
  2384.  
  2385.  
  2386. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2387.  
  2388. CENTER( string, length [, pad] ) 
  2389.  
  2390.  
  2391. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2392.  
  2393. Returns a string of length length with string centered in it, with pad 
  2394. characters added as necessary to make up length. The default pad character is a 
  2395. space. If the string is longer than length, it will be truncated at both ends 
  2396. to fit. If an odd number of characters are truncated or added, the right hand 
  2397. end loses or gains one more character than the left hand end. 
  2398.  
  2399.  
  2400. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2401.  
  2402. Here are some examples: 
  2403.  
  2404.  CENTER(abc,7)               ->    '  ABC  '
  2405.  CENTER(abc,8,'-')           ->    '--ABC---'
  2406.  CENTRE('The blue sky',8)    ->    'e blue s'
  2407.  CENTRE('The blue sky',7)    ->    'e blue '
  2408.  
  2409.  
  2410. ΓòÉΓòÉΓòÉ 4.1.25. CENTRE(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2411.  
  2412. Choose: 
  2413.  
  2414. o Syntax 
  2415. o Definition 
  2416. o Example 
  2417. o E Language Syntax 
  2418.  
  2419.  
  2420. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2421.  
  2422. CENTRE( string, length [, pad] ) 
  2423.  
  2424.  
  2425. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2426.  
  2427. (same as CENTER) 
  2428.  
  2429.  
  2430. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2431.  
  2432. (same as CENTER) 
  2433.  
  2434.  
  2435. ΓòÉΓòÉΓòÉ 4.1.26. CHR(numeric_expression) ΓòÉΓòÉΓòÉ
  2436.  
  2437. Choose: 
  2438.  
  2439. o Syntax 
  2440. o Definition 
  2441. o Example 
  2442. o E Language Syntax 
  2443.  
  2444.  
  2445. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2446.  
  2447. CHR( value ) 
  2448.  
  2449.  
  2450. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2451.  
  2452. Is the inverse of ASC(), CHR() returns the character corresponding to the ASCII 
  2453. value. 
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2457.  
  2458. For example, 
  2459.  
  2460. CHR( ASC('A') ) = 'A'
  2461. CHR(65)='A'
  2462.  
  2463.  
  2464. ΓòÉΓòÉΓòÉ 4.1.27. CIRCLEIT ΓòÉΓòÉΓòÉ
  2465.  
  2466. Choose: 
  2467.  
  2468. o Syntax 
  2469. o Definition 
  2470. o E Language Syntax 
  2471.  
  2472.  
  2473. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2474.  
  2475. CIRCLEIT style, line, col1, col2, attribute 
  2476.  
  2477.  
  2478. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2479.  
  2480. Draws a circle on the screen for highlighting a section of text. The circle 
  2481. goes away when the screen is refreshed.  'line' is the line number of the file 
  2482. to be highlighted, and col1 and col2 are the first and last columns.  There are 
  2483. two styles of circle.  1 = a perfect circle or oval; 2 = a rougher version with 
  2484. the ends crossing rather than meeting.  The highlighting is added by XORing 
  2485. onto the screen, so the color displayed is a function of the screen background 
  2486. color and can not be directly controlled.  ('Attribute' is currently unused.) 
  2487. The two styles use different XOR masks. 
  2488.  
  2489.  
  2490. ΓòÉΓòÉΓòÉ 4.1.28. COMPARE(string1, string2 [, pad] ) ΓòÉΓòÉΓòÉ
  2491.  
  2492. Choose: 
  2493.  
  2494. o Syntax 
  2495. o Definition 
  2496. o Example 
  2497. o E Language Syntax 
  2498.  
  2499.  
  2500. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2501.  
  2502. COMPARE( string1, string2 [, pad] ) 
  2503.  
  2504.  
  2505. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2506.  
  2507. Returns 0 if the strings, string1 and string2, are identical. If they are not, 
  2508. the returned number is non-zero and is the position of the first character that 
  2509. does not match. The shorter string is padded on the right with pad if 
  2510. necessary. The default pad character is a space. 
  2511.  
  2512.  
  2513. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2514.  
  2515. Here are some examples: 
  2516.  
  2517.  COMPARE('abc','abc')         ->    0
  2518.  COMPARE('abc','ak')          ->    2
  2519.  COMPARE('ab ','ab')          ->    0
  2520.  COMPARE('ab ','ab',' ')      ->    0
  2521.  COMPARE('ab ','ab','x')      ->    3
  2522.  COMPARE('ab-- ','ab','-')    ->    5
  2523.  
  2524.  
  2525. ΓòÉΓòÉΓòÉ 4.1.29. COPIES(string, n) ΓòÉΓòÉΓòÉ
  2526.  
  2527. Choose: 
  2528.  
  2529. o Syntax 
  2530. o Definition 
  2531. o Example 
  2532. o E Language Syntax 
  2533.  
  2534.  
  2535. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2536.  
  2537. COPIES( string, n ) 
  2538.  
  2539.  
  2540. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2541.  
  2542. Returns n concatenated copies of string. n must be positive or 0. 
  2543.  
  2544.  
  2545. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2546.  
  2547. Examples: 
  2548.  
  2549.     COPIES('abc',3)      ->    'abcabcabc'
  2550.     COPIES('abc',0)      ->    ''
  2551.  
  2552.  
  2553. ΓòÉΓòÉΓòÉ 4.1.30. COPYMARK ΓòÉΓòÉΓòÉ
  2554.  
  2555. Choose: 
  2556.  
  2557. o Syntax 
  2558. o Definition 
  2559. o E Language Syntax 
  2560.  
  2561.  
  2562. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2563.  
  2564. COPYMARK | COPY_MARK 
  2565.  
  2566.  
  2567. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2568.  
  2569. Copies marked text to cursor position, like standard Alt-C. 
  2570.  
  2571.  
  2572. ΓòÉΓòÉΓòÉ 4.1.31. COUNT(string1, string2) ΓòÉΓòÉΓòÉ
  2573.  
  2574. Choose: 
  2575.  
  2576. o Syntax 
  2577. o Definition 
  2578. o Definition 
  2579. o E Language Syntax 
  2580.  
  2581.  
  2582. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2583.  
  2584. COUNT( string1, string2 ) 
  2585.  
  2586.  
  2587. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2588.  
  2589. Returns the number of occurrances of string1 that appear in string2. 
  2590.  
  2591. Note:  This procedure is only available in EPM 5.60 or above.
  2592.  
  2593.  
  2594. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2595.  
  2596.  COUNT('abc','abcdef')     == 1
  2597.  COUNT('abc','abcabc')     == 2
  2598.  COUNT('abc','abxc')       == 0
  2599.  COUNT('xx ','xxx')        == 2
  2600.  
  2601.  
  2602. ΓòÉΓòÉΓòÉ 4.1.32. CURSOR_DIMENSIONS ΓòÉΓòÉΓòÉ
  2603.  
  2604. Choose: 
  2605.  
  2606. o Syntax 
  2607. o Definition 
  2608. o E Language Syntax 
  2609.  
  2610.  
  2611. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2612.  
  2613. CURSOR_DIMENSIONS cursorw, cursorh 
  2614.  
  2615.  
  2616. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2617.  
  2618. Queries or sets the cursor dimensions. 'cursorw' and 'cursorh' must be 
  2619. variables. If their values are question marks, they will be changed to reflect 
  2620. the current dimensions. If their values are numbers, this will set the size of 
  2621. the text cursor. A positive number represents that number of pixels; a negative 
  2622. number represents a proportional value of the size of the current character. 
  2623. The absolute value of that number is used as the number of 128ths of the height 
  2624. or width of the current character that the cursor should be drawn. 
  2625.  
  2626.  
  2627. ΓòÉΓòÉΓòÉ 4.1.33. C2X(string) ΓòÉΓòÉΓòÉ
  2628.  
  2629. Choose: 
  2630.  
  2631. o Syntax 
  2632. o Definition 
  2633. o Definition 
  2634. o E Language Syntax 
  2635.  
  2636.  
  2637. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2638.  
  2639. C2X( string ) 
  2640.  
  2641.  
  2642. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2643.  
  2644. Returns a printable hexadecimal representation of the binary string string. 
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2648.  
  2649.  C2X('abc123')       == '616263313233'
  2650.  C2X( \15' '\240 )   == '0f20f0'
  2651.  C2X( atoi(255) )    == 'ff00'
  2652.  
  2653.  
  2654. ΓòÉΓòÉΓòÉ 4.1.34. DELETE ΓòÉΓòÉΓòÉ
  2655.  
  2656. Choose: 
  2657.  
  2658. o Syntax 
  2659. o Definition 
  2660. o E Language Syntax 
  2661.  
  2662.  
  2663. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2664.  
  2665. DELETE 
  2666.  
  2667.  
  2668. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2669.  
  2670. Deletes the line the cursor is located on. Note that the statement DELETELINE 
  2671. allows parameters, but DELETE does not. 
  2672.  
  2673. Note:  Previously, DELETE_LINE was a synonym for DELETE. This was dropped 
  2674.        because it was felt that it was too confusing to have two statements, 
  2675.        DELETE_LINE and DELETELINE, with different behaviors.
  2676.  
  2677.  
  2678. ΓòÉΓòÉΓòÉ 4.1.35. DELETEACCEL ΓòÉΓòÉΓòÉ
  2679.  
  2680. Choose: 
  2681.  
  2682. o Syntax 
  2683. o Definition 
  2684. o E Language Syntax 
  2685.  
  2686.  
  2687. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2688.  
  2689. DELETEACCEL tablename 
  2690.  
  2691.  
  2692. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2693.  
  2694. Deletes the named accelerator table. 
  2695.  
  2696. See also: 
  2697.  
  2698. o Building Accelerator Tables from the Macro Language 
  2699. o ACTIVATEACCELTABLE 
  2700. o BUILDACCELTABLE 
  2701. o QUERYACCELSTRING 
  2702.  
  2703.  
  2704. ΓòÉΓòÉΓòÉ 4.1.36. DELETECHAR ΓòÉΓòÉΓòÉ
  2705.  
  2706. Choose: 
  2707.  
  2708. o Syntax 
  2709. o Definition 
  2710. o E Language Syntax 
  2711.  
  2712.  
  2713. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2714.  
  2715. DELETECHAR | DELETE_CHAR 
  2716.  
  2717.  
  2718. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2719.  
  2720. Deletes character under cursor, like standard Del. 
  2721.  
  2722.  
  2723. ΓòÉΓòÉΓòÉ 4.1.37. DELETELINE  [line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  2724.  
  2725. Choose: 
  2726.  
  2727. o Syntax 
  2728. o Definition 
  2729. o E Language Syntax 
  2730.  
  2731.  
  2732. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2733.  
  2734. DELETELINE  line_number [, {;}  fileid] 
  2735.  
  2736.  
  2737. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2738.  
  2739. Deletes a specified line from a specified file. Defaulted values for omitted 
  2740. parameters are line_number = current line, and fileid = current file. 
  2741.  
  2742. This is NOT the same as DELETE_LINE: see the clarification above, under DELETE. 
  2743.  
  2744.  
  2745. ΓòÉΓòÉΓòÉ 4.1.38. DELETEMARK ΓòÉΓòÉΓòÉ
  2746.  
  2747. Choose: 
  2748.  
  2749. o Syntax 
  2750. o Definition 
  2751. o E Language Syntax 
  2752.  
  2753.  
  2754. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2755.  
  2756. DELETEMARK | DELETE_MARK 
  2757.  
  2758.  
  2759. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2760.  
  2761. Deletes marked text, like standard Alt-D. 
  2762.  
  2763.  
  2764. ΓòÉΓòÉΓòÉ 4.1.39. DELETEMENU ΓòÉΓòÉΓòÉ
  2765.  
  2766. Choose: 
  2767.  
  2768. o Syntax 
  2769. o Definition 
  2770. o E Language Syntax 
  2771.  
  2772.  
  2773. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2774.  
  2775. DELETEMENU (stmt) 
  2776.  
  2777.  
  2778. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2779.  
  2780. Deletes a menu option or submenu option from the action bar. For more 
  2781. information on DELETEMENU see Building Menus from the Macro Language. 
  2782.  
  2783.  
  2784. ΓòÉΓòÉΓòÉ 4.1.40. DELSTR(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2785.  
  2786. Choose: 
  2787.  
  2788. o Syntax 
  2789. o Definition 
  2790. o Example 
  2791. o E Language Syntax 
  2792.  
  2793.  
  2794. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2795.  
  2796. DELSTR( string, n [, length] ) 
  2797.  
  2798.  
  2799. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2800.  
  2801. Deletes the substring of string that begins at the nth character, and is of 
  2802. length length, and returns the result. If length is not specified, the rest of 
  2803. string is deleted. If n is greater than the length of string, the string is 
  2804. returned unchanged. n must be positive. 
  2805.  
  2806.  
  2807. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2808.  
  2809. Here are some examples: 
  2810.  
  2811.  DELSTR('abcd',3)       ->    'ab'
  2812.  DELSTR('abcde',3,2)    ->    'abe'
  2813.  DELSTR('abcde',6)      ->    'abcde'
  2814.  
  2815.  
  2816. ΓòÉΓòÉΓòÉ 4.1.41. DELWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  2817.  
  2818. Choose: 
  2819.  
  2820. o Syntax 
  2821. o Definition 
  2822. o Example 
  2823. o E Language Syntax 
  2824.  
  2825.  
  2826. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2827.  
  2828. DELWORD( string, n [,  length] ) 
  2829.  
  2830.  
  2831. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2832.  
  2833. Deletes the substring of string that begins at the nth word, and is of length 
  2834. length blank-delimited words, and returns the result. If length is not 
  2835. specified, the rest of string is deleted. n must be positive. If n is greater 
  2836. than the number of words in string, the string is returned unchanged. The 
  2837. string deleted includes any blanks following the final word involved. 
  2838.  
  2839.  
  2840. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2841.  
  2842. Here are some examples: 
  2843.  
  2844.  DELWORD('Now is the  time',2,2)  ->  'Now time'
  2845.  DELWORD('Now is the time ',3)    ->  'Now is '
  2846.  DELWORD('Now is the  time',5)    ->  'Now is the  time'
  2847.  
  2848.  
  2849. ΓòÉΓòÉΓòÉ 4.1.42. DIRECTORY([path]) ΓòÉΓòÉΓòÉ
  2850.  
  2851. Choose: 
  2852.  
  2853. o Syntax 
  2854. o Definition 
  2855. o Example 
  2856. o E Language Syntax 
  2857.  
  2858.  
  2859. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2860.  
  2861. DIRECTORY( [string_expression] ) 
  2862.  
  2863.  
  2864. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2865.  
  2866. Returns current directory. If path parameter is given, the current drive and 
  2867. path are changed accordingly. 
  2868.  
  2869. Note:  The drive and path are changed before the current directory is returned. 
  2870.  
  2871.  
  2872. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2873.  
  2874. This provides a way of verifying that a user-supplied path is valid. 
  2875.  
  2876. current_dir = directory()                                -- Save current
  2877. if upcase(directory(user_dir)) <> upcase(user_dir) then  -- Try user's
  2878.    sayerror 'Directory 'user_dir' is invalid.'           -- Warn
  2879. endif
  2880. call directory(current_dir)                              -- Restore
  2881.  
  2882.  
  2883. ΓòÉΓòÉΓòÉ 4.1.43. DISPLAY  '-4' | '-2' | '-1' | '1' | '2' | '4' ΓòÉΓòÉΓòÉ
  2884.  
  2885. Choose: 
  2886.  
  2887. o Syntax 
  2888. o Definition 
  2889. o Example 
  2890. o E Language Syntax 
  2891.  
  2892.  
  2893. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2894.  
  2895. DISPLAY -4|-2|-1|1|2|4 
  2896.  
  2897.  
  2898. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2899.  
  2900. Allows screen updates to be turned off (-1) or on (1); non-critical messages to 
  2901. be turned off (-2) or on (2); and errors to be forced to the message box (-4) 
  2902. or to the default messageline (4). 
  2903.  
  2904. These numbers can be combined. (DISPLAY -3 would turn off the screen updates 
  2905. and the error messages.) 
  2906.  
  2907. DISPLAY -1 prevents the screen from begin updated until a DISPLAY 1 statement 
  2908. is issued. This can eliminate files being flashed on the screen briefly while 
  2909. an application loads and manipulates files. 
  2910.  
  2911. When a DISPLAY 4 is in effect, all messages (unless explicitly sent to a dialog 
  2912. box) will be sent to: 
  2913.  
  2914.  1. first to the message line, unless toggled off; 
  2915.  2. next to the status line, unless toggled off; 
  2916.  3. or else overwrites the first line of text temporarily. 
  2917.  
  2918.  
  2919. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  2920.  
  2921. An sample usage of DISPLAY is: 
  2922.  
  2923.   display -3            -- turn off display updates
  2924.   getfileid startfid    --      and error messages
  2925.   'xcom e profile.xxx'  -- load the profile
  2926.   getfileid profile_fid --      won't show on screen
  2927.   .visible = 0          -- make a hidden file
  2928.   'xcom 1 /define'      -- if not found, no error message
  2929.   activatefile startfid -- activate the file
  2930.   display 3             -- turn updates & messages on
  2931.  
  2932. In this example the user would see no screen flashing or "Not found" error 
  2933. message. 
  2934.  
  2935.  
  2936. ΓòÉΓòÉΓòÉ 4.1.44. DO ΓòÉΓòÉΓòÉ
  2937.  
  2938. Choose: 
  2939.  
  2940. o Syntax 
  2941. o Definition 
  2942. o E Language Syntax 
  2943.  
  2944.  
  2945. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2946.  
  2947. Is described in the section Conditional and Loop Statements. 
  2948.  
  2949.  
  2950. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2951.  
  2952. Is described in the section Conditional and Loop Statements. 
  2953.  
  2954.  
  2955. ΓòÉΓòÉΓòÉ 4.1.45. DO_ARRAY ΓòÉΓòÉΓòÉ
  2956.  
  2957. Choose: 
  2958.  
  2959. o Syntax 
  2960. o Definition 
  2961. o E Language Syntax 
  2962.  
  2963.  
  2964. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  2965.  
  2966. DO_ARRAY 
  2967.  
  2968.  
  2969. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  2970.  
  2971. Handles arrays in E. The DO_ARRAY statement can create an array, add to the 
  2972. array, and lookup information from the array. The syntax for these functions 
  2973. is: 
  2974.  
  2975. do_array 1, array_id, arrayname 
  2976.                                    creates an array of arrayname and returns 
  2977.                                    the array_id in the variable array_id. 
  2978. do_array 2, array_id, index, value 
  2979.                                    adds the value to the array under the index 
  2980.                                    in the array denoted by array_id. 
  2981. do_array 3, array_id, index, result 
  2982.                                    looks up the contents of the index entry of 
  2983.                                    the array specified by array_id and places 
  2984.                                    the value into result. 
  2985. do_array 4, array_id, index 
  2986.                                    This will delete an entry specified, by 
  2987.                                    INDEX, from the array. 
  2988. do_array 6, array_id, array_name 
  2989.                                    Returns the array_id associated with the 
  2990.                                    array name specified by array_name 
  2991.  
  2992. See Arrays in EPM for more information on arrays and the DO_ARRAY statement. 
  2993.  
  2994.  
  2995. ΓòÉΓòÉΓòÉ 4.1.46. DO_OVERLAYWINDOWS ΓòÉΓòÉΓòÉ
  2996.  
  2997. Choose: 
  2998.  
  2999. o Syntax 
  3000. o Definition 
  3001. o E Language Syntax 
  3002.  
  3003.  
  3004. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3005.  
  3006. DO_OVERLAYWINDOWS 
  3007.  
  3008.  
  3009. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3010.  
  3011. Provides various functions for the manipulation of graphics within a document. 
  3012. Further information on graphics within EPM and the E Toolkit will be made 
  3013. available. 
  3014.  
  3015.  
  3016. ΓòÉΓòÉΓòÉ 4.1.47. DOWN ΓòÉΓòÉΓòÉ
  3017.  
  3018. Choose: 
  3019.  
  3020. o Syntax 
  3021. o Definition 
  3022. o E Language Syntax 
  3023.  
  3024.  
  3025. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3026.  
  3027. DOWN 
  3028.  
  3029.  
  3030. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3031.  
  3032. Moves the cursor down 1 line, like the standard Down key. 
  3033.  
  3034.  
  3035. ΓòÉΓòÉΓòÉ 4.1.48. DYNAFREE(library_name) ΓòÉΓòÉΓòÉ
  3036.  
  3037. Choose: 
  3038.  
  3039. o Syntax 
  3040. o Definition 
  3041. o E Language Syntax 
  3042.  
  3043.  
  3044. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3045.  
  3046. DYNAFREE( number ) 
  3047.  
  3048.  
  3049. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3050.  
  3051. Releases a dynalink library that has been previously called using the dynalink 
  3052. statment. Also see the DYNALINK and DYNALINKC statements for more information. 
  3053.  
  3054.  
  3055. ΓòÉΓòÉΓòÉ 4.1.49. DYNALINK(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3056.  
  3057. Choose: 
  3058.  
  3059. o Syntax 
  3060. o Definition 
  3061. o Example 
  3062. o E Language Syntax 
  3063.  
  3064.  
  3065. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3066.  
  3067. DYNALINK( library_name, function_name, parameter_stack [, 
  3068. number_of_return_words ]) 
  3069.  
  3070.  
  3071. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3072.  
  3073. Provides an interface between an E language program and external functions 
  3074. stored in a dynamic link library. The operating system functions are 
  3075. implemented via dynamic linking, and therefore DYNALINK() provides you with the 
  3076. full power of the operating system calls such as DosDelete, DosQFileMode, 
  3077. DosDevIOCtl, and video input/output calls such as VioWrtTty, VioWrtCharStrAtt, 
  3078. and much more. DYNALINK() allows you to call any dynamic link library that 
  3079. exists (files with a .DLL extension). Since application writers can develop 
  3080. general purpose dynamic link libraries, E programs can call functions written 
  3081. in other languages. For example, let us say that the "C" library functions are 
  3082. available via a dynamic link library, then we may call the library functions 
  3083. from an E program; or suppose that a spell checking dynamic link library 
  3084. exists, DYNALINK() allows you to use the spell checking. 
  3085.  
  3086. This procedure is the protect-mode equivalent of the INT86X() function of E3. 
  3087. For more information on the system functions or dynamic link libraries, please 
  3088. refer to The OS/2 Technical Reference. 
  3089.  
  3090. In order to make a system call, you must provide the following parameters to 
  3091. dynalink(): 
  3092.  
  3093. library_name             the name of the dynalink library (e.g. file 
  3094.                          library_name.DLL) which contains the function you wish 
  3095.                          to call. 
  3096.  
  3097. function_name             this is a string containing the function name in most 
  3098.                          cases. However if you are making calls to some DOS 
  3099.                          functions (DOS functions being those whose names begin 
  3100.                          with 'Dos') that are contained within the DOSCALLS.DLL 
  3101.                          library, the function name is actually the ordinal 
  3102.                          value of the DOS function, preceded by a '#'. These 
  3103.                          numbers can be found in Ordinal Values of Functions 
  3104.                          Accessed via DOSCALLS.DLL. 
  3105.  
  3106. parameter_stack          a string consisting of all of the parameters expected 
  3107.                          by the function, concatenated together into one 
  3108.                          string. Those parameters that the function requires to 
  3109.                          be pushed on the parameter stack first should appear 
  3110.                          first when concatenating. Parameter information is 
  3111.                          dependent upon the function to be called, and can be 
  3112.                          found in The OS/2 Technical Reference. 
  3113.  
  3114. number_of_return_words   an optional parameter that allows one to set the size 
  3115.                          of the return code variable that the system should 
  3116.                          expect to receive from the dynamic link function. This 
  3117.                          parameter is provided for those dynalink library 
  3118.                          functions whose return code is a long int rather than 
  3119.                          simply an int. If the user simply uses DYNALINK() for 
  3120.                          system calls to DOS and OS/2 functions, this parameter 
  3121.                          need never be specified. The default value is 1. 
  3122.  
  3123.  
  3124. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3125.  
  3126. The numeric parameters passed by the E program must be converted from string 
  3127. form to the proper C data type via E functions like ATOI(), ATOL(), SELECTOR(), 
  3128. and OFFSET(), as shown below: 
  3129.  
  3130. defc hello =
  3131. string = 'hello'
  3132. result = dynalink( 'VIOCALLS',       /* library name   */
  3133.                    'VIOWRTTTY',      /* function name  */
  3134.                    selector(string) ||    /* address of */
  3135.                    offset(string) ||      /*   string   */
  3136.                    atoi(length(string)) ||/* length     */
  3137.                    atoi(0) )         /* vio handle     */
  3138.  
  3139. defc curdir2 =
  3140. /* create empty strings for DosQCurDir() to fill */
  3141. string = atoi(80) || substr('',1,80)
  3142. stringlen_b = substr('',1,2)
  3143. result = dynalink( 'DOSCALLS',  /* library name */
  3144.                    '#71',       /* ordinal of DosQCurDir */
  3145.                    atoi(0) ||          /* drive number    */
  3146.                    selector(string) || /* address of      */
  3147.                    offset(string) ||   /*  DirPath buffer */
  3148.                    selector(stringlen_b) || /* address of */
  3149.                    offset(stringlen_b) )   /* buf length */
  3150. stringlen = itoa(stringlen_b,10);
  3151. sayerror 'The current directory is "' ||
  3152.          substr(string,1,stringlen) || '".'
  3153.  
  3154. defc beep =
  3155. result = dynalink( 'DOSCALLS',  /* library name          */
  3156.                    '#50',       /* ordinal of Dos Beep() */
  3157.                    atoi(3000) ||  /* frequency of beep    */
  3158.                    atoi(1000) )  /* duration of beep     */
  3159.  
  3160. defc clear_semaphore =
  3161. result = dynalink( 'DOSCALL1',    /* library name     */
  3162.                    'DOSSEMCLEAR', /* function name    */
  3163.                    atol(handle) ) /* semaphore handle */
  3164.  
  3165.  
  3166. ΓòÉΓòÉΓòÉ 4.1.50. DYNALINKC(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3167.  
  3168. Choose: 
  3169.  
  3170. o Syntax 
  3171. o Definition 
  3172. o E Language Syntax 
  3173.  
  3174.  
  3175. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3176.  
  3177. DYNALINKC( library_name, function_name, parameter_stack [, 
  3178. number_of_return_words ]) 
  3179.  
  3180.  
  3181. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3182.  
  3183. Is used to load and pass information to a dynalink library. It is like the 
  3184. DYNALINK() procedure except that it passes its parameters using the C language 
  3185. parameter passing convention rather than the Pascal convention. See the file 
  3186. DYNATEST.E for examples of the use of DYNALINKC(). Also see DYNAFREE() for 
  3187. information about releasing a dynalink library and DYNALINK() for information 
  3188. about calling a dynalink library procedure using standard Pascal parameter 
  3189. passing conventions. 
  3190.  
  3191.  
  3192. ΓòÉΓòÉΓòÉ 4.1.51. DYNALINK32(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  3193.  
  3194. Choose: 
  3195.  
  3196. o Syntax 
  3197. o Definition 
  3198. o E Language Syntax 
  3199.  
  3200.  
  3201. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3202.  
  3203. DYNALINK32( library_name, function_name, parameter_stack [, 
  3204. number_of_return_words ]) 
  3205.  
  3206.  
  3207. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3208.  
  3209. Is used to load and pass information to a dynalink library. It is like the 
  3210. DYNALINKC() procedure except that it is used for calling 32-bit DLLs. 
  3211.  
  3212. Note:  This procedure is only available in EPM 5.60 or above.
  3213.  
  3214.  
  3215. ΓòÉΓòÉΓòÉ 4.1.52. ECHO( 'on'|'off' ) ΓòÉΓòÉΓòÉ
  3216.  
  3217. Choose: 
  3218.  
  3219. o Syntax 
  3220. o Definition 
  3221. o E Language Syntax 
  3222.  
  3223.  
  3224. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3225.  
  3226. ECHO( [ON | OFF] ) 
  3227.  
  3228.  
  3229. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3230.  
  3231. Displays the command about to be executed. This is useful for debugging E code. 
  3232.  
  3233.  
  3234. ΓòÉΓòÉΓòÉ 4.1.53. ENDLINE ΓòÉΓòÉΓòÉ
  3235.  
  3236. Choose: 
  3237.  
  3238. o Syntax 
  3239. o Definition 
  3240. o E Language Syntax 
  3241.  
  3242.  
  3243. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3244.  
  3245. ENDLINE | END_LINE 
  3246.  
  3247.  
  3248. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3249.  
  3250. Positions the cursor at end of current line, like standard End. 
  3251.  
  3252.  
  3253. ΓòÉΓòÉΓòÉ 4.1.54. ERASEENDLINE ΓòÉΓòÉΓòÉ
  3254.  
  3255. Choose: 
  3256.  
  3257. o Syntax 
  3258. o Definition 
  3259. o E Language Syntax 
  3260.  
  3261.  
  3262. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3263.  
  3264. ERASEENDLINE | ERASE_END_LINE 
  3265.  
  3266.  
  3267. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3268.  
  3269. Erases the rest of current line starting at cursor position, like standard 
  3270. Ctrl-E. 
  3271.  
  3272.  
  3273. ΓòÉΓòÉΓòÉ 4.1.55. EXECUTE ΓòÉΓòÉΓòÉ
  3274.  
  3275. Choose: 
  3276.  
  3277. o Syntax 
  3278. o Definition 
  3279. o E Language Syntax 
  3280.  
  3281.  
  3282. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3283.  
  3284. EXECUTE 
  3285.  
  3286.  
  3287. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3288.  
  3289. Executes the contents of the command dialog box. 
  3290.  
  3291.  
  3292. ΓòÉΓòÉΓòÉ 4.1.56. EXECUTEKEY key ΓòÉΓòÉΓòÉ
  3293.  
  3294. Choose: 
  3295.  
  3296. o Syntax 
  3297. o Definition 
  3298. o E Language Syntax 
  3299.  
  3300.  
  3301. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3302.  
  3303. EXECUTEKEY keyname | identifier 
  3304.  
  3305.  
  3306. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3307.  
  3308. Interprets key as if typed by user; key may be any valid expression. This is 
  3309. very similar to the KEY statement, except that KEY can take only a literal key 
  3310. name as in KEY A_L.  EXECUTEKEY can take a variable, as in k=page_down; 
  3311. executekey k.  In fact the KEY statement is superfluous, since EXECUTEKEY can 
  3312. be given a literal key name. 
  3313.  
  3314.  
  3315. ΓòÉΓòÉΓòÉ 4.1.57. EXIT ΓòÉΓòÉΓòÉ
  3316.  
  3317. Choose: 
  3318.  
  3319. o Syntax 
  3320. o Definition 
  3321. o E Language Syntax 
  3322.  
  3323.  
  3324. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3325.  
  3326. EXIT [return_code] 
  3327.  
  3328.  
  3329. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3330.  
  3331. Exits the current E macro and all calling macros. This is useful to halt a 
  3332. macro execution if a fatal error is generated. See the RETURN statement to exit 
  3333. only the current macro. 
  3334.  
  3335. A return code can be given as an argument. 
  3336.  
  3337.  
  3338. ΓòÉΓòÉΓòÉ 4.1.58. FILESINRING( [number] ) ΓòÉΓòÉΓòÉ
  3339.  
  3340. Choose: 
  3341.  
  3342. o Syntax 
  3343. o Definition 
  3344. o E Language Syntax 
  3345.  
  3346.  
  3347. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3348.  
  3349. FILESINRING( [ number ] ) 
  3350.  
  3351.  
  3352. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3353.  
  3354. Returns the number of files in the ring. If number is 0 or missing, the number 
  3355. of normal files in the ring is returned. If number is 1 the total number of 
  3356. files is returned, including hidden files and arrays. If number is 2 the 
  3357. maximum number of files currently allocated is returned. This corresponds to 
  3358. the size of an internal structure, and in the current release will always be a 
  3359. power of 2. An attempt to load more than this number of files will result in a 
  3360. new structure being allocated, with room for twice as many files. 
  3361.  
  3362.  
  3363. ΓòÉΓòÉΓòÉ 4.1.59. FILESIZE() ΓòÉΓòÉΓòÉ
  3364.  
  3365. Choose: 
  3366.  
  3367. o Syntax 
  3368. o Definition 
  3369. o E Language Syntax 
  3370.  
  3371.  
  3372. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3373.  
  3374. FILESIZE() 
  3375.  
  3376.  
  3377. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3378.  
  3379. Returns sum of the lengths of each line in the file. 
  3380.  
  3381.  
  3382. ΓòÉΓòÉΓòÉ 4.1.60. FILLMARK [character] ΓòÉΓòÉΓòÉ
  3383.  
  3384. Choose: 
  3385.  
  3386. o Syntax 
  3387. o Definition 
  3388. o E Language Syntax 
  3389.  
  3390.  
  3391. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3392.  
  3393. FILLMARK [ 'character' ] | FILL_MARK [ 'character' ] 
  3394.  
  3395.  
  3396. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3397.  
  3398. If a character is given, fills the marked area with character. If no character 
  3399. is specified, the user is asked to type a character for the fill.  Like the 
  3400. standard Alt-F. 
  3401.  
  3402.  
  3403. ΓòÉΓòÉΓòÉ 4.1.61. FINDFILE  destfilename, filename [,environment_path_variable, ('P'|'D') ] ΓòÉΓòÉΓòÉ
  3404.  
  3405. Choose: 
  3406.  
  3407. o Syntax 
  3408. o Definition 
  3409. o Example 
  3410. o E Language Syntax 
  3411.  
  3412.  
  3413. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3414.  
  3415. FINDFILE filename , destfilename [, environment_path_variable, (P|D)] 
  3416.  
  3417.  
  3418. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3419.  
  3420. Searches for filename in the current directory and returns its entire pathname 
  3421. in destfilename. 
  3422.  
  3423. Note:  This statement depends upon the program FILEFIND.EXE, which is available 
  3424. on the PCTOOLS disk. You must download this into a directory which is in your 
  3425. PATH environment variable (or the same directory as the E files) before this 
  3426. statement will work properly. 
  3427.  
  3428. The 'P' option specifies program searching. It forces a search for a file with 
  3429. the extension .EXE or .CMD in each directory named in the 
  3430. environment_path_variable.  If environment_path_variable is "PATH", the effect 
  3431. is the same as a normal OS/2 program search.  Some variable other than path can 
  3432. be specified, for example "EPMPATH", and that string will be looked up in the 
  3433. environment.  (The area where OS/2 keeps strings SET by the user.) 
  3434.  
  3435. The 'P' option also checks whether the filename is an internal OS/2 command. 
  3436. If so, destfilename is set up for invocation of the command processor, with 
  3437. "COMMAND.COM /C" at the start. 
  3438.  
  3439. If the 'D' option is used, the third parameter (environment_path_variable) is 
  3440. ignored (although at least a null string must be passed in anyway). The 'D' 
  3441. option will cause filename to be searched for in the following directories: 
  3442.  
  3443.  1. the current directory, and then 
  3444.  
  3445.  2. the directories listed in the EPMPATH environment variable (if it is 
  3446.     defined), and then 
  3447.  
  3448.  3. the directories in the DPATH environment variable, and then 
  3449.  
  3450.  4. the same directory as the file EPM.EXE. 
  3451.  
  3452. An example of usage is: 
  3453.  
  3454. findfile complete_filespec, 'e3help.hlp', '', 'D'
  3455.  
  3456.  
  3457. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3458.  
  3459. Examples: 
  3460.  
  3461.    findfile cmdline,'dir','','P'
  3462.       If rc is zero (no error) then cmdline could
  3463.       be 'C:\COMMAND.COM /C dir'
  3464.  
  3465.    findfile cmdline,'subdir','PATH','P'
  3466.       If rc is zero then cmdline could
  3467.       be 'C:\UTIL\subdir.com'
  3468.  
  3469.  
  3470. ΓòÉΓòÉΓòÉ 4.1.62. FOR ΓòÉΓòÉΓòÉ
  3471.  
  3472. Choose: 
  3473.  
  3474. o Syntax 
  3475. o Definition 
  3476. o E Language Syntax 
  3477.  
  3478.  
  3479. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3480.  
  3481. Is described in section Conditional and Loop Statements. 
  3482.  
  3483.  
  3484. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3485.  
  3486. Is described in section Conditional and Loop Statements. 
  3487.  
  3488.  
  3489. ΓòÉΓòÉΓòÉ 4.1.63. GETFILEID ΓòÉΓòÉΓòÉ
  3490.  
  3491. Choose: 
  3492.  
  3493. o Syntax 
  3494. o Definition 
  3495. o E Language Syntax 
  3496.  
  3497.  
  3498. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3499.  
  3500. GETFILEID  identifier [ ',' {';'} string_expression] 
  3501.  
  3502.  
  3503. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3504.  
  3505. Is described in the section Fileid Structure. 
  3506.  
  3507.  
  3508. ΓòÉΓòÉΓòÉ 4.1.64. GETKEYSTATE( virtual_key_code ) ΓòÉΓòÉΓòÉ
  3509.  
  3510. Choose: 
  3511.  
  3512. o Syntax 
  3513. o Definition 
  3514. o E Language Syntax 
  3515.  
  3516.  
  3517. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3518.  
  3519. GETKEYSTATE(number ) 
  3520.  
  3521.  
  3522. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3523.  
  3524. Is used to test the shift state of the shift keys. This statement replaces E's 
  3525. previous statements of: GETSHIFTSTATE and SETSHIFTSTATE. The syntax for EPM's 
  3526. GETKEYSTATE is: 
  3527.  
  3528.   keystate = getshiftstate( virtual_key_code)
  3529.  
  3530. where the virtual_key_code is one of the VK codes from PMWIN.H. For 
  3531. convenience, the returned test states of VK codes (like PositiveOdd and 
  3532. NegativeEven) have been converted to single values as follows: 
  3533.  
  3534.   KS_DOWN       1  (NegativeEven; key is down)
  3535.   KS_DOWNTOGGLE 2  (NEgativeOdd; key is down + toggled)
  3536.   KS_UP         3  (PositiveEven; key is up)
  3537.   KS_UPTOGGLE   4  (PostiveOdd; key is up + toggled)
  3538.  
  3539.  
  3540. ΓòÉΓòÉΓòÉ 4.1.65. GETLINE  var line [, line_number  [, var fileid] ] ΓòÉΓòÉΓòÉ
  3541.  
  3542. Choose: 
  3543.  
  3544. o Syntax 
  3545. o Definition 
  3546. o Example 
  3547. o E Language Syntax 
  3548.  
  3549.  
  3550. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3551.  
  3552. GETLINE   line [, {;} line_number [ , {;} fileid] ] 
  3553.  
  3554.  
  3555. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3556.  
  3557. Gets a specified line from a specified file into the variable line. Defaulted 
  3558. values for omitted parameters are line_number = current line, and fileid = 
  3559. current file. 
  3560.  
  3561.  
  3562. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3563.  
  3564. For example: 
  3565.  
  3566. GETLINE line
  3567. /* line = current line of current file */
  3568.  
  3569. GETLINE  line, 7
  3570. /* line = line 7 of current file */
  3571.  
  3572. GETLINE  line, 3, ThatFile
  3573. /* line = line 3 of file whose fileid
  3574.      is in variable ThatFile */
  3575. The statement: 
  3576.  
  3577. GETLINE line, 0
  3578. results in the variable line being set to null. 
  3579.  
  3580.  
  3581. ΓòÉΓòÉΓòÉ 4.1.66. GETMARK var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3582.  
  3583. Choose: 
  3584.  
  3585. o Syntax 
  3586. o Definition 
  3587. o Example 
  3588. o E Language Syntax 
  3589.  
  3590.  
  3591. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3592.  
  3593. GETMARK first_line [, {;} last_line [, {;} first_col [, {;} last_col [ , {;} 
  3594. mark_fileid ] ] ] 
  3595.  
  3596.  
  3597. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3598.  
  3599. Returns the current mark coordinates and fileid. If no mark exists, the values 
  3600. returned are meaningless; use the function MARKTYPE() to precheck whether a 
  3601. mark exists. 
  3602.  
  3603.  
  3604. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3605.  
  3606. IF MARKTYPE()<>'' THEN /* text marked? */
  3607.    /* Get active mark coordinates and fileid */
  3608.    GETMARK  first_line, last_line,first_col,
  3609.             last_col, mark_fileid
  3610. ENDIF
  3611.  
  3612.  
  3613. ΓòÉΓòÉΓòÉ 4.1.67. GETMARKG var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  3614.  
  3615. Choose: 
  3616.  
  3617. o Syntax 
  3618. o Definition 
  3619. o E Language Syntax 
  3620.  
  3621.  
  3622. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3623.  
  3624. GETMARKG  first_line [, {;} last_line [, {;} first_col [, {;} last_col [, {;} 
  3625. mark_fileid ] ] ] 
  3626.  
  3627.  
  3628. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3629.  
  3630. Like GETMARK in that it returns the current mark coordinates and fileid, but 
  3631. unlike GETMARK, the last_col parameter of GEMARKG represents the right edge of 
  3632. the mark as opposed to the last column in the mark. 
  3633.  
  3634.  
  3635. ΓòÉΓòÉΓòÉ 4.1.68. GETPMINFO (function ) ΓòÉΓòÉΓòÉ
  3636.  
  3637. Choose: 
  3638.  
  3639. o Syntax 
  3640. o Definition 
  3641. o E Language Syntax 
  3642.  
  3643.  
  3644. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3645.  
  3646. GETPMINFO( parameter ) 
  3647.  
  3648.  
  3649. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3650.  
  3651. The following are constants values that are to be used as parameters to the 
  3652. getpminfo internal function: 
  3653.  
  3654.   HAB             0      EDITORMSGAREA       8
  3655.   OWNERCLIENT     1      EDITORVSCROLL       9
  3656.   OWNERFRAME      2      EDITORHSCROLL      10
  3657.   PARENTCLIENT    3      EDITORINTERPRETER  11
  3658.   PARENTFRAME     4      EDITVIOPS          12
  3659.   EDITCLIENT      5      EDITTITLEBAR       13
  3660.   EDITFRAME       6      EDITCURSOR         14
  3661.   EDITSTATUSAREA  7
  3662.  
  3663. Depending on the parameter passed, certain PM information will be returned. See 
  3664. the OS/2 Reference Manual for more information on the meanings of these 
  3665. constants and the meaning of the information returned. 
  3666.  
  3667. Also the the file STDCTRL.E for sample usage of the GETPMINFO command. 
  3668.  
  3669.  
  3670. ΓòÉΓòÉΓòÉ 4.1.69. GETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  3671.  
  3672. Choose: 
  3673.  
  3674. o Syntax 
  3675. o Definition 
  3676. o E Language Syntax 
  3677.  
  3678.  
  3679. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3680.  
  3681. GETSEARCH identifier 
  3682.  
  3683.  
  3684. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3685.  
  3686. Saves last search command in string variable search_cmd. See the SETSEARCH 
  3687. command for retrieving such a command, and examples of usage. 
  3688.  
  3689.  
  3690. ΓòÉΓòÉΓòÉ 4.1.70. HEX( character ) ΓòÉΓòÉΓòÉ
  3691.  
  3692. Choose: 
  3693.  
  3694. o Syntax 
  3695. o Definition 
  3696. o Example 
  3697. o E Language Syntax 
  3698.  
  3699.  
  3700. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3701.  
  3702. HEX( 'character' ) 
  3703.  
  3704.  
  3705. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3706.  
  3707. Returns the hexadecimal value associated with the ASCII representation of 
  3708. character. 
  3709.  
  3710.  
  3711. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3712.  
  3713. HEX('A') = 41
  3714.  
  3715.  
  3716. ΓòÉΓòÉΓòÉ 4.1.71. IF - THEN - ELSE ΓòÉΓòÉΓòÉ
  3717.  
  3718. Choose: 
  3719.  
  3720. o Syntax 
  3721. o Definition 
  3722. o E Language Syntax 
  3723.  
  3724.  
  3725. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3726.  
  3727. Is described in Conditional and Loop Statements. 
  3728.  
  3729.  
  3730. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3731.  
  3732. Is described in Conditional and Loop Statements. 
  3733.  
  3734.  
  3735. ΓòÉΓòÉΓòÉ 4.1.72. INCLUDE ΓòÉΓòÉΓòÉ
  3736.  
  3737. Choose: 
  3738.  
  3739. o Syntax 
  3740. o Definition 
  3741. o E Language Syntax 
  3742.  
  3743.  
  3744. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3745.  
  3746. Is described in section Compiler Directive Statements and in The EPM User's 
  3747. Guide. 
  3748.  
  3749.  
  3750. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3751.  
  3752. Is described in section Compiler Directive Statements and in The EPM User's 
  3753. Guide. 
  3754.  
  3755.  
  3756. ΓòÉΓòÉΓòÉ 4.1.73. INSERT ΓòÉΓòÉΓòÉ
  3757.  
  3758. Choose: 
  3759.  
  3760. o Syntax 
  3761. o Definition 
  3762. o E Language Syntax 
  3763.  
  3764.  
  3765. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3766.  
  3767. INSERT 
  3768.  
  3769.  
  3770. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3771.  
  3772. Inserts a new line after the current line and position cursor in same column of 
  3773. new line as the first non-empty column of the previous line. 
  3774.  
  3775. Note:  Previously, INSERT_LINE was a synonym for INSERT. This was dropped 
  3776.        because it was felt that it was too confusing to have two statements, 
  3777.        INSERT_LINE and INSERTLINE, with different behaviors.
  3778.  
  3779.  
  3780. ΓòÉΓòÉΓòÉ 4.1.74. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] ΓòÉΓòÉΓòÉ
  3781.  
  3782. Choose: 
  3783.  
  3784. o Syntax 
  3785. o Definition 
  3786. o Example 
  3787. o E Language Syntax 
  3788.  
  3789.  
  3790. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3791.  
  3792. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] 
  3793.  
  3794.  
  3795. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3796.  
  3797. This statement (non destructively) inserts an attribute record at the specified 
  3798. location. 
  3799.  
  3800. Class   The class of the attribute record to be inserted. 
  3801.  
  3802. Value   The value field of the attribute record to be inserted. 
  3803.  
  3804. IsPush  The support field of the attribute to insert. 
  3805.  
  3806. Offset  The offset of the position being queried.  Offsets must be negative, 
  3807.         and indicate a position before the specified character location. 
  3808.  
  3809.                  ...[ar-2][ar-1][char]...
  3810.         If a negative offset is specified that is less (more negative) than the 
  3811.         smallest offset of an attribute record at the specified column, then 
  3812.         the new attribute record is placed at an offset that is one less than 
  3813.         the smallest offset. 
  3814.  
  3815.         If an attribute record already exists at the specified offset, then the 
  3816.         old attribute record (and any attribute records at an offset of larger 
  3817.         magnitude) is shifted to an offset of greater magnitude to vacate the 
  3818.         specified offset for the new attribute record. 
  3819.  
  3820. Column  The column number where the new attribute record should be placed.  If 
  3821.         this parameter is omitted, the current column of the cursor is assumed. 
  3822.  
  3823. Line    The line number where the new attribute record should be placed.  If 
  3824.         this parameter is omitted, the current line number of the cursor is 
  3825.         assumed. 
  3826.  
  3827. Fileid  The fileid of the file where the new attribute record should be placed. 
  3828.         If this parameter is omitted, the active file is assumed. 
  3829.  
  3830. See Attribute Pairs for additional information on attributes. 
  3831.  
  3832.  
  3833. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3834.  
  3835.    class = 1  -- COLOR_CLASS
  3836.    val = Red + WhiteB  -- Red on a white background
  3837.    insert_attribute class, val, 1, -1, 1
  3838.    insert_attribute class, val, 0, -1, length(textline(.line))+1
  3839.    if not (.levelofattributesupport // 2) then  -- Turn on mixed color support
  3840.       .levelofattributesupport = .levelofattributesupport + 1
  3841.    endif
  3842.  
  3843. This will color the current line red.  Note that the pop attribute is put at 
  3844. the end of the line + 1, since it attaches to the left side of a character, and 
  3845. we want the last character to be colored as well. 
  3846.  
  3847.  
  3848. ΓòÉΓòÉΓòÉ 4.1.75. INSERTLINE new_line [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  3849.  
  3850. Choose: 
  3851.  
  3852. o Syntax 
  3853. o Definition 
  3854. o Example 
  3855. o E Language Syntax 
  3856.  
  3857.  
  3858. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3859.  
  3860. INSERTLINE  new_line [,{;} line_number [, {;} fileid] ] 
  3861.  
  3862.  
  3863. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3864.  
  3865. Inserts contents of variable new_line just before the designated line of a 
  3866. specified file. Defaulted values for omitted parameters are line_number = 
  3867. current line, and fileid = current file. Without arguments INSERTLINE is 
  3868. identical to the INSERT statement. 
  3869.  
  3870.  
  3871. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3872.  
  3873. INSERTLINE line
  3874. /* inserts line before current line of current file */
  3875.  
  3876. INSERTLINE  line, 7
  3877. /* inserts line before line 7 of current file */
  3878.  
  3879. INSERTLINE  line, 3, ThatFile
  3880. /* inserts line before line 3 of file whose fileid
  3881.      is in variable ThatFile */
  3882.  
  3883.  
  3884. ΓòÉΓòÉΓòÉ 4.1.76. INSERTSTATE() ΓòÉΓòÉΓòÉ
  3885.  
  3886. Choose: 
  3887.  
  3888. o Syntax 
  3889. o Definition 
  3890. o E Language Syntax 
  3891.  
  3892.  
  3893. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3894.  
  3895. INSERTSTATE() 
  3896.  
  3897.  
  3898. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3899.  
  3900. Returns the insert state of EPM. A 1 means insert mode is active; 0 means 
  3901. overwrite mode is active. 
  3902.  
  3903.  
  3904. ΓòÉΓòÉΓòÉ 4.1.77. INSERTSTR(new, target [, n [, length [, pad ]]]) ΓòÉΓòÉΓòÉ
  3905.  
  3906. Choose: 
  3907.  
  3908. o Syntax 
  3909. o Definition 
  3910. o E Language Syntax 
  3911.  
  3912.  
  3913. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3914.  
  3915. INSERTSTR( new , target   [,  n [,  length   [,  pad]]] ) 
  3916.  
  3917.  
  3918. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3919.  
  3920. Inserts the string new, padded to length length, into the string target after 
  3921. the nth character. length and n must be non-negative. If n is greater than the 
  3922. length of the target string, padding is added there also. The default pad 
  3923. character is a blank. The default value for n is 0, which means insert before 
  3924. the beginning of the string. 
  3925.  
  3926.  
  3927. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3928.  
  3929. Here are some examples: 
  3930.  
  3931.  INSERTSTR(' ','abcdef',3)         ->    'abc def'
  3932.  INSERTSTR('123','abc',5,6)        ->    'abc  123   '
  3933.  INSERTSTR('123','abc',5,6,'+')    ->    'abc++123+++'
  3934.  INSERTSTR('123','abc')            ->    '123abc'
  3935.  INSERTSTR('123','abc',,5,'-')     ->    '123--abc'
  3936.  
  3937.  
  3938. ΓòÉΓòÉΓòÉ 4.1.78. INSERTTOGGLE ΓòÉΓòÉΓòÉ
  3939.  
  3940. Choose: 
  3941.  
  3942. o Syntax 
  3943. o Definition 
  3944. o E Language Syntax 
  3945.  
  3946.  
  3947. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3948.  
  3949. INSERTTOGGLE | INSERT_TOGGLE 
  3950.  
  3951.  
  3952. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3953.  
  3954. Toggles cursor from insert mode to replace mode and vice versa.  Like pressing 
  3955. the standard Ins key. 
  3956.  
  3957.  
  3958. ΓòÉΓòÉΓòÉ 4.1.79. ISADEFC ΓòÉΓòÉΓòÉ
  3959.  
  3960. Choose: 
  3961.  
  3962. o Syntax 
  3963. o Definition 
  3964. o Example 
  3965. o E Language Syntax 
  3966.  
  3967.  
  3968. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3969.  
  3970. ISADEFC ( expression ) 
  3971.  
  3972.  
  3973. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  3974.  
  3975. Boolean function that tells whether or not a macro-defined command with the 
  3976. given name exists. 
  3977.  
  3978.  
  3979. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  3980.  
  3981. if isadefc('mysave') then
  3982.    'mysave' arg(1)
  3983. endif
  3984.  
  3985.  
  3986. ΓòÉΓòÉΓòÉ 4.1.80. ISADEFPROC ΓòÉΓòÉΓòÉ
  3987.  
  3988. Choose: 
  3989.  
  3990. o Syntax 
  3991. o Definition 
  3992. o Example 
  3993. o E Language Syntax 
  3994.  
  3995.  
  3996. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  3997.  
  3998. ISADEFPROC ( expression ) 
  3999.  
  4000.  
  4001. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4002.  
  4003. Boolean function that tells whether or not a macro-defined procedure with the 
  4004. given name exists. 
  4005.  
  4006.  
  4007. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4008.  
  4009. if ISADEFPROC('myfunction') then
  4010.    call myfunction('Exiting')
  4011. endif
  4012.  
  4013.  
  4014. ΓòÉΓòÉΓòÉ 4.1.81. ISADIRTYLINE ΓòÉΓòÉΓòÉ
  4015.  
  4016. Choose: 
  4017.  
  4018. o Syntax 
  4019. o Definition 
  4020. o E Language Syntax 
  4021.  
  4022.  
  4023. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4024.  
  4025. ISADIRTYLINE() 
  4026.  
  4027.  
  4028. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4029.  
  4030. Boolean function that tells whether or not the current line has been modified 
  4031. but not yet "checked in".  This corresponds to whether or not the undo opcode 
  4032. will change the line; the function was added in order to enable the Undo menu 
  4033. item to be greyed if not applicable. 
  4034.  
  4035.  
  4036. ΓòÉΓòÉΓòÉ 4.1.82. ITERATE ΓòÉΓòÉΓòÉ
  4037.  
  4038. Choose: 
  4039.  
  4040. o Syntax 
  4041. o Definition 
  4042. o E Language Syntax 
  4043.  
  4044.  
  4045. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4046.  
  4047. Is described in section Conditional and Loop Statements. 
  4048.  
  4049.  
  4050. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4051.  
  4052. Is described in section Conditional and Loop Statements. 
  4053.  
  4054.  
  4055. ΓòÉΓòÉΓòÉ 4.1.83. ITOA(variable, radix) ΓòÉΓòÉΓòÉ
  4056.  
  4057. Choose: 
  4058.  
  4059. o Syntax 
  4060. o Definition 
  4061. o E Language Syntax 
  4062.  
  4063.  
  4064. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4065.  
  4066. ITOA( variable,  radix ) 
  4067.  
  4068.  
  4069. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4070.  
  4071. Converts a two byte binary representation of an integer stored in variable to a 
  4072. string representation of the integer, so that the E language can understand it. 
  4073. radix specifies the base of the number (i.e. base 10 = decimal; base 16 = 
  4074. hexadecimal) to be converted to a string representation. This function is often 
  4075. used to convert integers returned by dynalink library functions from binary 
  4076. representation to ASCII string representation. See DYNALINK() for an example of 
  4077. the use of ITOA(). 
  4078.  
  4079.  
  4080. ΓòÉΓòÉΓòÉ 4.1.84. JOIN ΓòÉΓòÉΓòÉ
  4081.  
  4082. Choose: 
  4083.  
  4084. o Syntax 
  4085. o Definition 
  4086. o E Language Syntax 
  4087.  
  4088.  
  4089. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4090.  
  4091. JOIN 
  4092.  
  4093.  
  4094. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4095.  
  4096. Joins the next line with current line, with an intervening space. Like the 
  4097. standard a_J key combination. 
  4098.  
  4099.  
  4100. ΓòÉΓòÉΓòÉ 4.1.85. KEYIN expression ΓòÉΓòÉΓòÉ
  4101.  
  4102. Choose: 
  4103.  
  4104. o Syntax 
  4105. o Definition 
  4106. o Example 
  4107. o E Language Syntax 
  4108.  
  4109.  
  4110. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4111.  
  4112. KEYIN expression 
  4113.  
  4114.  
  4115. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4116.  
  4117. Types expression at current cursor position as if typed from the keyboard 
  4118. without translation or execution. expression is most often a quoted command, 
  4119. although it can also be a numeric expression. 
  4120.  
  4121.  
  4122. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4123.  
  4124. For example, one could enter the current date: 
  4125.  
  4126. parse value getdate(1) with today';' .  /* Discard MonthNum. */
  4127. keyin 'Today is' today'.'
  4128. One could also type graphics characters in the text by placing the cursor at 
  4129. the desired location and issuing the statement: 
  4130.  
  4131. keyin \24
  4132.  
  4133.  
  4134. ΓòÉΓòÉΓòÉ 4.1.86. KEYS name ΓòÉΓòÉΓòÉ
  4135.  
  4136. Choose: 
  4137.  
  4138. o Syntax 
  4139. o Definition 
  4140. o Example 
  4141. o E Language Syntax 
  4142.  
  4143.  
  4144. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4145.  
  4146. KEYS name 
  4147.  
  4148.  
  4149. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4150.  
  4151. Changes to the keyset name. The keyset is created by the DEFKEYS statement Key 
  4152. Definitions (DEF and DEFKEYS).  The KEYS statement can be used in conjunction 
  4153. with DEFLOAD DEFLOAD. 
  4154.  
  4155.  
  4156. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4157.  
  4158. The following example changes to a keyset that enhances keys such that the C 
  4159. programming language syntax could be recognized: 
  4160.  
  4161. defload
  4162.   ext=filetype(name)  -- get file extention
  4163.   if ext='C' then     -- test file is a c file
  4164.  
  4165.      keys c_keys      -- change to new keyset
  4166.  
  4167.   endif
  4168.  
  4169.  
  4170. ΓòÉΓòÉΓòÉ 4.1.87. LASTERROR() ΓòÉΓòÉΓòÉ
  4171.  
  4172. Choose: 
  4173.  
  4174. o Syntax 
  4175. o Definition 
  4176. o Example 
  4177. o E Language Syntax 
  4178.  
  4179.  
  4180. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4181.  
  4182. LASTERROR() 
  4183.  
  4184.  
  4185. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4186.  
  4187. Returns the last error code. The example illustrates its usage. 
  4188.  
  4189.  
  4190. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4191.  
  4192. 'tabs 0'
  4193. 'ma 75 1'
  4194. if lasterror() = -271 then
  4195.     sayerror "margin setting error"
  4196. elseif lasterror() = -272 then
  4197.     sayerror "tabs setting error"
  4198. else
  4199.     sayerror "no error"
  4200. endif
  4201.  
  4202. In the above example, an error would occur while trying to set both tabs and 
  4203. margins. LASTERROR() would return -271, and margin setting error would be 
  4204. printed. Assume the following two lines were substituted for the first two 
  4205. lines of the above example: 
  4206.  
  4207. 'tabs 0'
  4208. 'margins 1 75'
  4209. The result of LASTERROR() would be -272, and tabs setting error would be 
  4210. printed. In this way, you can retain the error code returned by a command even 
  4211. after a second command completes successfully. 
  4212.  
  4213.  
  4214. ΓòÉΓòÉΓòÉ 4.1.88. LASTKEY([key_number]) ΓòÉΓòÉΓòÉ
  4215.  
  4216. Choose: 
  4217.  
  4218. o Syntax 
  4219. o Definition 
  4220. o Example 
  4221. o E Language Syntax 
  4222.  
  4223.  
  4224. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4225.  
  4226. LASTKEY( [0 | 1 | 2 | 3] ) 
  4227.  
  4228.  
  4229. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4230.  
  4231. Returns the user's last keystroke, whether typed manually or executed by a 
  4232. KEYIN or EXECUTEKEY statement.  The only values that are valid for the 
  4233. parameter key_number are 0 to3.  The LASTKEY(0) call has the same effect as a 
  4234. LASTKEY() call, which has the same behavior as it always has, namely, to return 
  4235. the most recent keystroke.  This procedure call is not useful for checking for 
  4236. prefix keys.  (See the example.) LASTKEY(1) returns the next-to-last keystroke. 
  4237. LASTKEY(2) returns an 8-byte string representing the last WM_CHAR message 
  4238. received (see the example), and LASTKEY(3) returns the next-to-last WM_CHAR. 
  4239.  
  4240. Note:  The WM_CHAR data can be used to check scan codes and differentiate 
  4241.        between the numeric keypad and other keys (for example).  If a character 
  4242.        is being processed from a KEYIN or EXECUTEKEY statement, then the 
  4243.        WM_CHAR data will consist of 8 bytes of ASCII zeros. 
  4244.  
  4245.  
  4246. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4247.  
  4248. You might expect that the following example would check for the two-key 
  4249. sequence Esc followed by F5: 
  4250.  
  4251.    def f6=
  4252.       if lastkey()=esc then
  4253.          /* do the new code for Esc-F6 */
  4254.       else
  4255.          /* do the normal F5 (in this case the draw command) */
  4256.          'draw'
  4257.       endif
  4258. However, this is not the case. This definition is executed only if F5 is 
  4259. pressed, and once F5 has been pressed, it becomes the value of LASTKEY(). 
  4260. Therefore the if condition in the example never holds true. 
  4261.  
  4262. The procedure could be useful in the following case: 
  4263.  
  4264. def f5, a_f5, esc =
  4265.     if lastkey() = f5 then
  4266.         /* do something for F5 case */
  4267.     elseif lastkey() = a_f5 then
  4268.         /* do something for A_F5 case */
  4269.     else
  4270.         /* do something for Esc case */
  4271.     endif
  4272.     /* do something for all of the keys */
  4273. In this case, one DEF is defined for multiple keys. By using the LASTKEY() 
  4274. procedure, you can determine which of these keys was pressed. 
  4275.  
  4276. The procedure call LASTKEY(1) returns the key before last, and will handle the 
  4277. problem discussed in the first example.  By substituting LASTKEY(1) calls for 
  4278. the LASTKEY() calls in the first example, this piece of code will work as 
  4279. expected: trapping the Esc followed by F5 key sequence. 
  4280.  
  4281. Example of WM_CHAR usage: 
  4282.  
  4283. def left = -- Note:  the following are all binary:
  4284.    parse value lastkey(2) with flags 3 repeat 4 scancode 5 charcode 7 vk_code 9
  4285.    left
  4286.    if scancode = \75 then  -- x'4b'; keyboard-specific
  4287.       sayerror 'Pad left'
  4288.    else
  4289.       sayerror 'Cursor key left'
  4290.    endif
  4291.  
  4292.  
  4293. ΓòÉΓòÉΓòÉ 4.1.89. LASTPOS (needle, haystack [,startpos]) ΓòÉΓòÉΓòÉ
  4294.  
  4295. Choose: 
  4296.  
  4297. o Syntax 
  4298. o Definition 
  4299. o Example 
  4300. o E Language Syntax 
  4301.  
  4302.  
  4303. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4304.  
  4305. LASTPOS( needle,  haystack   [, start] ) 
  4306.  
  4307.  
  4308. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4309.  
  4310. searches for needle in haystack from startpos to beginning of string. If 
  4311. startpos is not present, the search begins from the end of string. If needle is 
  4312. not found, zero is returned. needle and haystack must be strings. 
  4313.  
  4314.  
  4315. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4316.  
  4317.    LASTPOS(' ','abc def ghi')   ==8
  4318.    LASTPOS(' ','abcdefghi')     ==0
  4319.    LASTPOS(' ','abc def ghi',7) ==4
  4320.  
  4321.  
  4322. ΓòÉΓòÉΓòÉ 4.1.90. LASTWORD(string) ΓòÉΓòÉΓòÉ
  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. LASTWORD( string ) 
  4335.  
  4336.  
  4337. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4338.  
  4339. returns the last space-delimited word in string. 
  4340.  
  4341. Note:  This procedure is only available in EPM 5.60 or above.
  4342.  
  4343.  
  4344. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4345.  
  4346.    LASTWORD(string) == WORD(string, WORDS(string))
  4347.  
  4348.  
  4349. ΓòÉΓòÉΓòÉ 4.1.91. LEAVE ΓòÉΓòÉΓòÉ
  4350.  
  4351. Choose: 
  4352.  
  4353. o Syntax 
  4354. o Definition 
  4355. o E Language Syntax 
  4356.  
  4357.  
  4358. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4359.  
  4360. Is described in section Conditional and Loop Statements. 
  4361.  
  4362.  
  4363. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4364.  
  4365. Is described in section Conditional and Loop Statements. 
  4366.  
  4367.  
  4368. ΓòÉΓòÉΓòÉ 4.1.92. LEFT ΓòÉΓòÉΓòÉ
  4369.  
  4370. Choose: 
  4371.  
  4372. o Syntax 
  4373. o Definition 
  4374. o E Language Syntax 
  4375.  
  4376.  
  4377. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4378.  
  4379. LEFT 
  4380.  
  4381.  
  4382. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4383.  
  4384. Moves cursor 1 character to the left, like the standard Left. 
  4385.  
  4386.  
  4387. ΓòÉΓòÉΓòÉ 4.1.93. LEFTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  4388.  
  4389. Choose: 
  4390.  
  4391. o Syntax 
  4392. o Definition 
  4393. o Example 
  4394. o E Language Syntax 
  4395.  
  4396.  
  4397. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4398.  
  4399. LEFTSTR( string,  length   [, pad] ) 
  4400.  
  4401.  
  4402. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4403.  
  4404. Returns a string of length length containing the left-most length characters of 
  4405. string. That is, padded with pad characters (or truncated) on the right as 
  4406. needed. The default pad character is a blank. length must be non-negative. 
  4407. Exactly equivalent to SUBSTR(string,1,length[,pad]). 
  4408.  
  4409.  
  4410. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4411.  
  4412. Here are some examples: 
  4413.  
  4414.  LEFTSTR('abc d',8)        ->    'abc d   '
  4415.  LEFTSTR('abc d',8,'.')    ->    'abc d...'
  4416.  LEFTSTR('abc  def',7)     ->    'abc  de'
  4417.  
  4418.  
  4419. ΓòÉΓòÉΓòÉ 4.1.94. LENGTH(expression) ΓòÉΓòÉΓòÉ
  4420.  
  4421. Choose: 
  4422.  
  4423. o Syntax 
  4424. o Definition 
  4425. o Example 
  4426. o E Language Syntax 
  4427.  
  4428.  
  4429. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4430.  
  4431. LENGTH( expression ) 
  4432.  
  4433.  
  4434. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4435.  
  4436. Returns length of expression. 
  4437.  
  4438.  
  4439. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4440.  
  4441. Here are some examples: 
  4442.  
  4443.  LENGTH('abcdefgh')    ->    8
  4444.  LENGTH('abc defg')    ->    8
  4445.  LENGTH('')            ->    0
  4446.  
  4447.  
  4448. ΓòÉΓòÉΓòÉ 4.1.95. LEXAM( functionname ) ΓòÉΓòÉΓòÉ
  4449.  
  4450. Choose: 
  4451.  
  4452. o Syntax 
  4453. o Definition 
  4454. o E Language Syntax 
  4455.  
  4456.  
  4457. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4458.  
  4459. LEXAM( numeric_expression ) 
  4460.  
  4461.  
  4462. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4463.  
  4464. Provides spell checking and synonym support for the EPM. 
  4465.  
  4466. The LEXAM opcode allows word verification and word/dictionary lookup. The LEXAM 
  4467. opcode can take on the following syntax: 
  4468.  
  4469.     lexam('Initialize')
  4470.     lexam('Terminate')
  4471.     lexam('PIckup Dictionary',dictionary_name)
  4472.     lexam('DRop Dictionary',dictionary_name)
  4473.     lexam('SEt Addenda Language Type',addenda_type)
  4474.     lexam('Add to Transient Addenda',addenda_name)
  4475.     lexam('Read from Transient Addenda',addenda_name)
  4476.     lexam('Verification',word)
  4477.     lexam('SPelling Aid',word)
  4478.     lexam('Hyphenation',word)
  4479.     lexam('DEhyphenation',word)
  4480.     lexam('SYnonym',word)
  4481.     lexam('GRAMmar Aid',word)
  4482.     lexam('GRADe level',word)
  4483.     lexam('PArt-of-speech',word)
  4484.  
  4485.  
  4486. ΓòÉΓòÉΓòÉ 4.1.96. LINK ΓòÉΓòÉΓòÉ
  4487.  
  4488. Choose: 
  4489.  
  4490. o Syntax 
  4491. o Definition 
  4492. o E Language Syntax 
  4493.  
  4494.  
  4495. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4496.  
  4497. LINK string_expression 
  4498.  
  4499.  
  4500. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4501.  
  4502. Is described in section Linkable External Modules. 
  4503.  
  4504.  
  4505. ΓòÉΓòÉΓòÉ 4.1.97. LINKED ΓòÉΓòÉΓòÉ
  4506.  
  4507. Choose: 
  4508.  
  4509. o Syntax 
  4510. o Definition 
  4511. o Example 
  4512. o E Language Syntax 
  4513.  
  4514.  
  4515. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4516.  
  4517. LINKED( module ) 
  4518.  
  4519.  
  4520. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4521.  
  4522. Queries whether a module is linked.  The return value is: 
  4523.  
  4524. o module number (a small positive integer) if linked 
  4525. o -1 if found on disk but not currently linked 
  4526. o -307 if module can't be found on disk.  This RC value -307 is the same as 
  4527.   sayerror("Link: file not found"). 
  4528. o -308 if the expression is a bad module name that cannot be expanded into a 
  4529.   proper filename.  Same as sayerror("Link: invalid filename"). 
  4530.  
  4531.  
  4532. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4533.  
  4534. Sample usage:  result = linked("draw"). 
  4535.  
  4536. Note:  If you wish to make sure a module is linked, you can always just repeat 
  4537. the link command.  E won't reload the file from disk if it's already linked, 
  4538. but it will rerun the module's DEFINIT which might not be desirable. 
  4539.  
  4540.  
  4541. ΓòÉΓòÉΓòÉ 4.1.98. LONGESTLINE ΓòÉΓòÉΓòÉ
  4542.  
  4543. Choose: 
  4544.  
  4545. o Syntax 
  4546. o Definition 
  4547. o E Language Syntax 
  4548.  
  4549.  
  4550. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4551.  
  4552. LONGESTLINE() 
  4553.  
  4554.  
  4555. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4556.  
  4557. Returns the length of the longest line in the current file. 
  4558.  
  4559.  
  4560. ΓòÉΓòÉΓòÉ 4.1.99. LOOP ΓòÉΓòÉΓòÉ
  4561.  
  4562. Choose: 
  4563.  
  4564. o Syntax 
  4565. o Definition 
  4566. o E Language Syntax 
  4567.  
  4568.  
  4569. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4570.  
  4571. Is described in section Conditional and Loop Statements. 
  4572.  
  4573.  
  4574. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4575.  
  4576. Is described in section Conditional and Loop Statements. 
  4577.  
  4578.  
  4579. ΓòÉΓòÉΓòÉ 4.1.100. LOWCASE(expression) ΓòÉΓòÉΓòÉ
  4580.  
  4581. Choose: 
  4582.  
  4583. o Syntax 
  4584. o Definition 
  4585. o E Language Syntax 
  4586.  
  4587.  
  4588. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4589.  
  4590. LOWCASE( expression ) 
  4591.  
  4592.  
  4593. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4594.  
  4595. Returns the lower-case conversion of the expression.  (In versions earlier than 
  4596. 4.12, the input string was converted in place.  Now the input is left alone and 
  4597. the converted string is returned as the result.) 
  4598.  
  4599.  
  4600. ΓòÉΓòÉΓòÉ 4.1.101. LTOA(variable, radix) ΓòÉΓòÉΓòÉ
  4601.  
  4602. Choose: 
  4603.  
  4604. o Syntax 
  4605. o Definition 
  4606. o E Language Syntax 
  4607.  
  4608.  
  4609. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4610.  
  4611. LTOA( variable,  radix ) 
  4612.  
  4613.  
  4614. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4615.  
  4616. Converts the C representation of a long integer (data type long) stored in 
  4617. variable to a string representation of the same number, so that the E language 
  4618. can understand the number. radix specifies the base of the number (i.e. base 10 
  4619. = decimal; base 16 = hexadecimal) to be converted to a string representation. 
  4620. For use in converting numbers returned by C functions, for example function 
  4621. calls via DYNALINK(). 
  4622.  
  4623.  
  4624. ΓòÉΓòÉΓòÉ 4.1.102. MACHINE() ΓòÉΓòÉΓòÉ
  4625.  
  4626. Choose: 
  4627.  
  4628. o Syntax 
  4629. o Definition 
  4630. o E Language Syntax 
  4631.  
  4632.  
  4633. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4634.  
  4635. MACHINE() 
  4636.  
  4637.  
  4638. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4639.  
  4640. Returns operating system and machine information string.  Return values are 
  4641. "PCDOS" or "OS2REAL" or "OS2PROTECT". 
  4642.  
  4643.  
  4644. ΓòÉΓòÉΓòÉ 4.1.103. MAP_POINT ΓòÉΓòÉΓòÉ
  4645.  
  4646. Choose: 
  4647.  
  4648. o Syntax 
  4649. o Definition 
  4650. o Example 
  4651. o E Language Syntax 
  4652.  
  4653.  
  4654. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4655.  
  4656. MAP_POINT subop, op2, op3 [, op4 [, comment ] ] 
  4657.  
  4658.  
  4659. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4660.  
  4661. Everything other than subop must be a variable. This opcode is used to map 
  4662. between a pixel-offset in the window, a pixel-offset in the document, and a 
  4663. line, column and offset within the file. 
  4664.  
  4665. subop          op2_in  op3_in  op4_in  op2_out  op3_out  op4_out
  4666. 1  WindowToDoc   x       y       -       x        y        =
  4667. 2  DocToLCO      x       y       -       Line     Col      Off
  4668. 3  LCOToDoc      Line    Col     Off     x        y        =
  4669. 4  Doc2Win       x       y       -       x        y        =
  4670. 5  Win2LCO       x       y       -       Line     Col      Off
  4671. 6  LCO2Win       Line    Col     Off     x        y        =
  4672. The comment field is an extra field that eventually will be used to indicate if 
  4673. the special processing had to occur.  For example, a requested point was beyond 
  4674. the EOF and the returned values are based on extrapolation. 
  4675.  
  4676. Note:  When mapping to Line/Column/Offset, the mapping is to the nearest 
  4677.        interstitial space - i.e., the transition between two characters, two 
  4678.        attributes, or an attribute and a character.  This means that if you map 
  4679.        a coordinate that's on the left side of a character, it will return the 
  4680.        column of that character, but if you map a coordinate on the right side 
  4681.        of a character, you'll get back the column of the following character.
  4682.  
  4683.  
  4684. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  4685.  
  4686. The following example maps the mouse position to the character under the mouse 
  4687. pointer. 
  4688.  
  4689. xxx = .mousex; mx = xxx
  4690. yyy = .mousey
  4691.  
  4692. map_point 5, xxx, yyy, off, comment;  -- map screen to line
  4693.  
  4694. MouseLine = min(max(xxx, 0), .last)  -- Want line to be between 0 & .last
  4695. lne = yyy
  4696. map_point 6, xxx, lne, off, comment;  -- map line/col/offset to screen
  4697. if xxx>mx then  -- The intersection selected is to right of mouse pointer;
  4698.    yyy = yyy - 1  -- the character clicked on is the one to the left.
  4699. endif             -- Note:  could get col. 0 this way, but the following
  4700.                   --        takes care of that.
  4701. MouseCol  = min(max(yyy, 1), MAXCOL)
  4702.  
  4703.  
  4704. ΓòÉΓòÉΓòÉ 4.1.104. MARKBLOCK ΓòÉΓòÉΓòÉ
  4705.  
  4706. Choose: 
  4707.  
  4708. o Syntax 
  4709. o Definition 
  4710. o E Language Syntax 
  4711.  
  4712.  
  4713. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4714.  
  4715. MARKBLOCK | MARK_BLOCK 
  4716.  
  4717.  
  4718. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4719.  
  4720. Starts or changes coordinates of a block mark, like the standard Alt-B. 
  4721.  
  4722.  
  4723. ΓòÉΓòÉΓòÉ 4.1.105. MARKBLOCKG ΓòÉΓòÉΓòÉ
  4724.  
  4725. Choose: 
  4726.  
  4727. o Syntax 
  4728. o Definition 
  4729. o E Language Syntax 
  4730.  
  4731.  
  4732. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4733.  
  4734. MARKBLOCKG 
  4735.  
  4736.  
  4737. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4738.  
  4739. Like MARKBLOCK, but right column must be specified one beyond the desired right 
  4740. column. 
  4741.  
  4742.  
  4743. ΓòÉΓòÉΓòÉ 4.1.106. MARKCHAR ΓòÉΓòÉΓòÉ
  4744.  
  4745. Choose: 
  4746.  
  4747. o Syntax 
  4748. o Definition 
  4749. o E Language Syntax 
  4750.  
  4751.  
  4752. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4753.  
  4754. MARKCHAR | MARK_CHAR 
  4755.  
  4756.  
  4757. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4758.  
  4759. Starts or changes coordinates of a character mark, like the standard Alt-Z. 
  4760.  
  4761.  
  4762. ΓòÉΓòÉΓòÉ 4.1.107. MARKCHARG ΓòÉΓòÉΓòÉ
  4763.  
  4764. Choose: 
  4765.  
  4766. o Syntax 
  4767. o Definition 
  4768. o E Language Syntax 
  4769.  
  4770.  
  4771. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4772.  
  4773. MARKCHARG 
  4774.  
  4775.  
  4776. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4777.  
  4778. Like MARKCHAR, but column numbers represent edges rather than characters, so 
  4779. that they can be between attributes (and right column will generally be one 
  4780. higher that it would be for MARKCHAR). 
  4781.  
  4782.  
  4783. ΓòÉΓòÉΓòÉ 4.1.108. MARKLINE ΓòÉΓòÉΓòÉ
  4784.  
  4785. Choose: 
  4786.  
  4787. o Syntax 
  4788. o Definition 
  4789. o E Language Syntax 
  4790.  
  4791.  
  4792. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4793.  
  4794. MARKLINE | MARK_LINE 
  4795.  
  4796.  
  4797. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4798.  
  4799. Starts or changes coordinates of a line mark, like the standard Alt-L. 
  4800.  
  4801.  
  4802. ΓòÉΓòÉΓòÉ 4.1.109. MARKLINEG ΓòÉΓòÉΓòÉ
  4803.  
  4804. Choose: 
  4805.  
  4806. o Syntax 
  4807. o Definition 
  4808. o E Language Syntax 
  4809.  
  4810.  
  4811. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4812.  
  4813. MARKLINEG 
  4814.  
  4815.  
  4816. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4817.  
  4818. Same as MARKLINE. 
  4819.  
  4820.  
  4821. ΓòÉΓòÉΓòÉ 4.1.110. MARKTYPE() ΓòÉΓòÉΓòÉ
  4822.  
  4823. Choose: 
  4824.  
  4825. o Syntax 
  4826. o Definition 
  4827. o E Language Syntax 
  4828.  
  4829.  
  4830. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4831.  
  4832. MARKTYPE() 
  4833.  
  4834.  
  4835. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4836.  
  4837. Returns 'BLOCK', 'LINE', or 'CHAR'.  ' ' is returned if no text is highlighted. 
  4838.  
  4839.  
  4840. ΓòÉΓòÉΓòÉ 4.1.111. MEMCPYX(destination, source, length) ΓòÉΓòÉΓòÉ
  4841.  
  4842. Choose: 
  4843.  
  4844. o Syntax 
  4845. o Definition 
  4846. o E Language Syntax 
  4847.  
  4848.  
  4849. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4850.  
  4851. MEMCPYX( hexadecimal_address , hexadecimal_address   , length ) 
  4852.  
  4853.  
  4854. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4855.  
  4856. Copies length bytes from source to destination. Both source and destination are 
  4857. binary far pointers; e.g. 
  4858.  
  4859. call memcpyx(atoi(ptr1) || atoi(seg1), atoi(ptr2) || atoi(seg2), len)
  4860.  
  4861.  
  4862. ΓòÉΓòÉΓòÉ 4.1.112. MOUSE_SETPOINTER type ΓòÉΓòÉΓòÉ
  4863.  
  4864. Choose: 
  4865.  
  4866. o Syntax 
  4867. o Definition 
  4868. o E Language Syntax 
  4869.  
  4870.  
  4871. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4872.  
  4873. MOUSE_SETPOINTER 
  4874.  
  4875.  
  4876. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4877.  
  4878. Sets the mouse pointer to the figure specified by type. Mouse figures are: 
  4879.  
  4880. 1 = arrow pointer (can also user the constant SYSTEM_POINTER) 
  4881. 2 = a vertical bar (like those used to request text in a dialog box) 
  4882. 3 = an hour glass 
  4883. 4 = invisible 
  4884. 5 = four way arrows 
  4885. 6 = two way arrow (upper left/lower right) 
  4886. 7 = two way arrow (upper right/lower left) 
  4887. 8 = horizontal arrow 
  4888. 9 = vertical arrow 
  4889. 10 = an outlined box 
  4890. 11 = a stop octagon with a hand in a box 
  4891. 12 = the browse question mark in a box 
  4892. 13 = an explanation point in box 
  4893. 14 = an asterisk in a box 
  4894. 15 = cropping lines (as defined by the constant MARK_POINTER) 
  4895.  
  4896. For instance, when entering browse mode the mouse pointer can be changed to 
  4897. indicate that no text can be entered. 
  4898.  
  4899.  
  4900. ΓòÉΓòÉΓòÉ 4.1.113. MOVEMARK ΓòÉΓòÉΓòÉ
  4901.  
  4902. Choose: 
  4903.  
  4904. o Syntax 
  4905. o Definition 
  4906. o E Language Syntax 
  4907.  
  4908.  
  4909. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4910.  
  4911. MOVEMARK | MOVE_MARK 
  4912.  
  4913.  
  4914. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4915.  
  4916. Moves marked text to cursor position, like the standard Alt-M. 
  4917.  
  4918.  
  4919. ΓòÉΓòÉΓòÉ 4.1.114. NEXTFILE ΓòÉΓòÉΓòÉ
  4920.  
  4921. Choose: 
  4922.  
  4923. o Syntax 
  4924. o Definition 
  4925. o E Language Syntax 
  4926.  
  4927.  
  4928. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4929.  
  4930. NEXTFILE | NEXT_FILE 
  4931.  
  4932.  
  4933. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4934.  
  4935. Activates the next file in the active ring, like the standard F12 or Ctrl-N. 
  4936.  
  4937.  
  4938. ΓòÉΓòÉΓòÉ 4.1.115. OFFSET(variable) ΓòÉΓòÉΓòÉ
  4939.  
  4940. Choose: 
  4941.  
  4942. o Syntax 
  4943. o Definition 
  4944. o E Language Syntax 
  4945.  
  4946.  
  4947. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4948.  
  4949. OFFSET( variable ) 
  4950.  
  4951.  
  4952. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4953.  
  4954. Returns the offset of the memory address of variable in the form of a binary 
  4955. word. To be used with C functions like those made via DYNALINK(). 
  4956.  
  4957.  
  4958. ΓòÉΓòÉΓòÉ 4.1.116. OFS(variable) ΓòÉΓòÉΓòÉ
  4959.  
  4960. Choose: 
  4961.  
  4962. o Syntax 
  4963. o Definition 
  4964. o E Language Syntax 
  4965.  
  4966.  
  4967. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4968.  
  4969. OFS( variable ) 
  4970.  
  4971.  
  4972. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4973.  
  4974. Returns a string representation of the offset of the actual memory address of 
  4975. variable. See SEG() for an example of usage. 
  4976.  
  4977.  
  4978. ΓòÉΓòÉΓòÉ 4.1.117. OVERLAY(new, target[, n [, k [,pad] ] ]) ΓòÉΓòÉΓòÉ
  4979.  
  4980. Choose: 
  4981.  
  4982. o Syntax 
  4983. o Definition 
  4984. o Example 
  4985. o E Language Syntax 
  4986.  
  4987.  
  4988. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  4989.  
  4990. OVERLAY(new,  target   [, n  [, length   [, pad] ] ]) 
  4991.  
  4992.  
  4993. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  4994.  
  4995. overlays the string new, padded  to length k, onto the string target starting 
  4996. at the nth character. k must be zero or positive. If n is greater than the 
  4997. length of the target string, padding is added there also. The default pad 
  4998. character is the blank, and the default value for n is 1. n must be greater 
  4999. than 0. 
  5000.  
  5001.  
  5002. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5003.  
  5004. Examples are: 
  5005.  
  5006.   OVERLAY(' ','abcdef',3)      == 'ab def'
  5007.   OVERLAY('.','abcdef',3,2)    == 'ab. ef'
  5008.   OVERLAY('qq','abcd')         == 'qqcd'
  5009.   OVERLAY('qq','abcd',4)       == 'abcqq'
  5010.   OVERLAY('123','abc',5,6,'+') == 'abc+123+++'
  5011.  
  5012. Although E's OVERLAY procedure is similar to REXX's, they are not identical. E 
  5013. requires that each field be filled with a string, even if it is only a null 
  5014. string. REXX allows a field to be skipped. For example: 
  5015.  
  5016.   OVERLAY('qq',,5,6,'+')
  5017.  
  5018. This would be legal syntax in REXX, but would cause errors in E. The E 
  5019. equivalent would be: 
  5020.  
  5021.   OVERLAY('qq','',5,6,'+')
  5022.  
  5023.  
  5024. ΓòÉΓòÉΓòÉ 4.1.118. OVERLAYBLOCK ΓòÉΓòÉΓòÉ
  5025.  
  5026. Choose: 
  5027.  
  5028. o Syntax 
  5029. o Definition 
  5030. o E Language Syntax 
  5031.  
  5032.  
  5033. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5034.  
  5035. OVERLAYBLOCK | OVERLAY_BLOCK 
  5036.  
  5037.  
  5038. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5039.  
  5040. Copies marked text to cursor position without inserting, like standard Alt-O. 
  5041.  
  5042.  
  5043. ΓòÉΓòÉΓòÉ 4.1.119. PAGEDOWN ΓòÉΓòÉΓòÉ
  5044.  
  5045. Choose: 
  5046.  
  5047. o Syntax 
  5048. o Definition 
  5049. o E Language Syntax 
  5050.  
  5051.  
  5052. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5053.  
  5054. PAGEDOWN | PAGE_DOWN 
  5055.  
  5056.  
  5057. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5058.  
  5059. Moves cursor to next page of current file, like standard PgDn. 
  5060.  
  5061.  
  5062. ΓòÉΓòÉΓòÉ 4.1.120. PAGEUP ΓòÉΓòÉΓòÉ
  5063.  
  5064. Choose: 
  5065.  
  5066. o Syntax 
  5067. o Definition 
  5068. o E Language Syntax 
  5069.  
  5070.  
  5071. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5072.  
  5073. PAGEUP | PAGE_UP 
  5074.  
  5075.  
  5076. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5077.  
  5078. Moves cursor to previous page of current file, like standard PgUp. 
  5079.  
  5080.  
  5081. ΓòÉΓòÉΓòÉ 4.1.121. PARSE ΓòÉΓòÉΓòÉ
  5082.  
  5083. Choose: 
  5084.  
  5085. o Syntax 
  5086. o Definition 
  5087. o E Language Syntax 
  5088.  
  5089.  
  5090. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5091.  
  5092. See The Parse Statement. 
  5093.  
  5094.  
  5095. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5096.  
  5097. See The Parse Statement. 
  5098.  
  5099.  
  5100. ΓòÉΓòÉΓòÉ 4.1.122. PEEK(segment, offset, count) ΓòÉΓòÉΓòÉ
  5101.  
  5102. Choose: 
  5103.  
  5104. o Syntax 
  5105. o Definition 
  5106. o Example 
  5107. o E Language Syntax 
  5108.  
  5109.  
  5110. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5111.  
  5112. PEEK( segment ,  offset   ,  count ) 
  5113.  
  5114.  
  5115. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5116.  
  5117. Returns string of length count starting at the address  segment:offset.  The 
  5118. segment and offset values are used just as they are in assembler programs. See 
  5119. also POKE in the section Built-in Statement and Procedure Summary. 
  5120.  
  5121. A PEEK() call is often necessary to access the string pointed to by a pointer 
  5122. returned by a DYNALINK() function call. 
  5123.  
  5124.  
  5125. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5126.  
  5127. The following example of this type of usage is based on the procedure get_env() 
  5128. in DOSUTIL.E. 
  5129.  
  5130. seg_ptr = 1234       /* 4-byte place to put a far ptr   */
  5131. cmd_ptr = 1234
  5132. call dynalink('DOSCALLS',  /* dynamic link library name */
  5133.                '#91',       /* ordinal val for DOSGETENV */
  5134.                selector(seg_ptr) ||  /* ptr to env. seg   */
  5135.                offset(seg_ptr)   ||
  5136.                selector(cmd_ptr) || /* ptr to ofs after   */
  5137.                offset(cmd_ptr)    )/*  COMSPEC: unneeded */
  5138. env_seg = itoa(seg_ptr,10)
  5139. env_ofs = 0
  5140. start = env_ofs
  5141. do while peek(env_seg,env_ofs,1) /== \0
  5142.    env_ofs = env_ofs + 1
  5143. end
  5144. setting = peek(env_seg,start,env_ofs-start)
  5145.  
  5146. PEEK() allows us to determine where the end of the string is (marked by a null 
  5147. character: \0), and thereby determine the length of the string. 
  5148.  
  5149. WARNING: Attempts to PEEK to an area not owned by your process will cause a 
  5150. TRAP-D error. 
  5151.  
  5152.  
  5153. ΓòÉΓòÉΓòÉ 4.1.123. PEEKZ(segment, offset) ΓòÉΓòÉΓòÉ
  5154.  
  5155. Choose: 
  5156.  
  5157. o Syntax 
  5158. o Definition 
  5159. o Example 
  5160. o E Language Syntax 
  5161.  
  5162.  
  5163. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5164.  
  5165. PEEKZ( hexadecimal_address ) | PEEKZ( numeric_expression ,  numeric_expression 
  5166.  
  5167.  
  5168. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5169.  
  5170. Like PEEK, but for an ASCIIZ string. Returns the contents of storage starting 
  5171. with the address given and ending with the character before the next null 
  5172. character. 
  5173.  
  5174.  
  5175. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5176.  
  5177. This lets us simplify the PEEK example to: 
  5178.  
  5179. env_seg = itoa(seg_ptr,10)
  5180. setting = peekz(env_seg,0)
  5181.  
  5182. An alternate format supported is PEEKZ(address), where address is the 4-byte 
  5183. hex address of the storage. This is useful when calling an external routine 
  5184. that returns a far pointer to an ASCIIZ string. 
  5185.  
  5186.  
  5187. ΓòÉΓòÉΓòÉ 4.1.124. POKE segment, offset, string ΓòÉΓòÉΓòÉ
  5188.  
  5189. Choose: 
  5190.  
  5191. o Syntax 
  5192. o Definition 
  5193. o Example 
  5194. o E Language Syntax 
  5195.  
  5196.  
  5197. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5198.  
  5199. POKE( segment , offset   ,  string ) 
  5200.  
  5201.  
  5202. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5203.  
  5204. Writes string to the address segment:offset The segment and offset values are 
  5205. used just as they are in assembler programs. 
  5206.  
  5207. WARNING: Attempts to POKE to an area not owned by your process will cause a 
  5208. TRAP-D error and crash. 
  5209.  
  5210.  
  5211. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5212.  
  5213.     -- put greeting at beginning of segment.
  5214.     SelOfSharedSeg = itoa(Selector1, 10);
  5215.     poke SelOfSharedSeg , 0 , "Bonjour"\0;
  5216.  
  5217.  
  5218. ΓòÉΓòÉΓòÉ 4.1.125. POS needle,haystack[,start] ΓòÉΓòÉΓòÉ
  5219.  
  5220. Choose: 
  5221.  
  5222. o Syntax 
  5223. o Definition 
  5224. o Example 
  5225. o E Language Syntax 
  5226.  
  5227.  
  5228. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5229.  
  5230. POS( needle,  haystack [, start] ) 
  5231.  
  5232.  
  5233. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5234.  
  5235. Returns the position of one string, needle, in another, haystack. (See also the 
  5236. LASTPOS and INDEX functions.)  If the string needle is not found, 0 is 
  5237. returned.  By default the search starts at the first character of haystack 
  5238. (that is start is of the value 1).  This may be overridden by specifying start 
  5239. (which must be a positive whole number), the point at which to start the 
  5240. search. 
  5241.  
  5242.  
  5243. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5244.  
  5245. Here are some examples:
  5246.  
  5247.   POS('day','Saturday')       ->    6
  5248.   POS('x','abc def ghi')      ->    0
  5249.   POS(' ','abc def ghi')      ->    4
  5250.   POS(' ','abc def ghi',5)    ->    8
  5251.  
  5252.  
  5253. ΓòÉΓòÉΓòÉ 4.1.126. PREVFILE ΓòÉΓòÉΓòÉ
  5254.  
  5255. Choose: 
  5256.  
  5257. o Syntax 
  5258. o Definition 
  5259. o E Language Syntax 
  5260.  
  5261.  
  5262. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5263.  
  5264. PREVFILE | PREV_FILE 
  5265.  
  5266.  
  5267. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5268.  
  5269. Activates the previous file in the active ring, like the standard Alt-F11 or 
  5270. Ctrl-P key combinations. 
  5271.  
  5272.  
  5273. ΓòÉΓòÉΓòÉ 4.1.127. QPRINT ΓòÉΓòÉΓòÉ
  5274.  
  5275. Choose: 
  5276.  
  5277. o Syntax 
  5278. o Definition 
  5279. o E Language Syntax 
  5280.  
  5281.  
  5282. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5283.  
  5284. QPRINT printername 
  5285.  
  5286.  
  5287. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5288.  
  5289. Performs a WYSIWYG print of the current file to the print queue associated with 
  5290. the named printer. 
  5291.  
  5292.  
  5293. ΓòÉΓòÉΓòÉ 4.1.128. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  5294.  
  5295. Choose: 
  5296.  
  5297. o Syntax 
  5298. o Definition 
  5299. o Example 
  5300. o E Language Syntax 
  5301.  
  5302.  
  5303. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5304.  
  5305. QUERYACCELSTRING (table_name, id) 
  5306.  
  5307.  
  5308. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5309.  
  5310. Returns the string associated with identifier 'id' in the accelerator table 
  5311. named 'table_name'. 
  5312.  
  5313.  
  5314. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5315.  
  5316.       accelstr=queryaccelstring(activeaccel, menuid)
  5317.       if accelstr <> '' then
  5318.          sayerror 'menu id' menuid 'would execute command' accelstr
  5319.       endif
  5320.  
  5321. See also: 
  5322.  
  5323. o Building Accelerator Tables from the Macro Language 
  5324. o QUERYACCELSTRING 
  5325. o BUILDACCELTABLE 
  5326. o DELETEACCEL 
  5327.  
  5328.  
  5329. ΓòÉΓòÉΓòÉ 4.1.129. QUERY_ATTRIBUTE var class, var value, var ispush, offset, column, line [, fileid] ΓòÉΓòÉΓòÉ
  5330.  
  5331. Choose: 
  5332.  
  5333. o Syntax 
  5334. o Definition 
  5335. o E Language Syntax 
  5336.  
  5337.  
  5338. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5339.  
  5340. QUERY_ATTRIBUTE class, value, ispush, offset, column, line [, fileid] 
  5341.  
  5342.  
  5343. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5344.  
  5345. This statement allows a macro program to deterine what attribute record can be 
  5346. found at the specified location. 
  5347.  
  5348. Class   returns the class of the found attribute record.  A value of zero is 
  5349.         returned if no attribute was found.  A value between 1 and 63 is 
  5350.         returned if an internally supported attribute record was found.  A 
  5351.         value from 64 to 255 is returned if an application supported attribute 
  5352.         record was found.  The meaning of an application supported attribute 
  5353.         record is not predictable at compile time.  Some administrative macros 
  5354.         will be provided for determining the meaning of a macro during runtime. 
  5355.  
  5356. Value   returns the value of the found attribute record.  Its value is 
  5357.         unchanged if no attribute record was found at the specified location. 
  5358.  
  5359. IsPush  returns the value of the support field of the found attribute.  This 
  5360.         parameter's value is unchanged if no attribute record was found at the 
  5361.         specified location. 
  5362.  
  5363. Offset  The offset of the position being queried.  Must be a negative value, 
  5364.         indicating a position before the specified character location. 
  5365.  
  5366. Column  The column number of the position being queried. 
  5367.  
  5368. Line    The line number of the position being queried. 
  5369.  
  5370. FileID  The fileid of the position being queried.  If unspecified, the current 
  5371.         file will be assumed. 
  5372.  
  5373. See Attribute Pairs for additional information on attributes. 
  5374.  
  5375.  
  5376. ΓòÉΓòÉΓòÉ 4.1.130. QUERYFONT ΓòÉΓòÉΓòÉ
  5377.  
  5378. Choose: 
  5379.  
  5380. o Syntax 
  5381. o Definition 
  5382. o E Language Syntax 
  5383.  
  5384.  
  5385. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5386.  
  5387. QUERYFONT (font_id) 
  5388.  
  5389.  
  5390. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5391.  
  5392. Returns the font description associated with font_id, in the form 
  5393. fontname.fontsize.fontsel - e.g. 
  5394.  
  5395.    Courier.DD100WW9HH8BB.0
  5396.    Times New Roman.DD240WW0HH0.0
  5397. In fontsize, the numbers following DD are the size of the font in decipoints 
  5398. for a proportional font, and the numbers following WW and HH are the width and 
  5399. height of the font in pixels for a monospaced font.  The BB is present at the 
  5400. end if the font is a bitmapped font.  'fontsel' is any combination of 
  5401.  
  5402.   1 = Italic
  5403.   2 = Underscore
  5404.   8 = Outline
  5405.  16 = Strikeout
  5406.  32 = Bold
  5407.  
  5408.  
  5409. ΓòÉΓòÉΓòÉ 4.1.131. QUERYMENUSTRING(menuname, id) ΓòÉΓòÉΓòÉ
  5410.  
  5411. Choose: 
  5412.  
  5413. o Syntax 
  5414. o Definition 
  5415. o E Language Syntax 
  5416.  
  5417.  
  5418. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5419.  
  5420. QUERYMENUSTRING( menuname , id ) 
  5421.  
  5422.  
  5423. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5424.  
  5425. Determines the command to be executed by the menu specified by the menuname and 
  5426. by id. See Building Menus from the Macro Language for more information on the 
  5427. QUERYMENUSTRING statement. 
  5428.  
  5429.  
  5430. ΓòÉΓòÉΓòÉ 4.1.132. QUERYPROFILE(application, key_name) ΓòÉΓòÉΓòÉ
  5431.  
  5432. Choose: 
  5433.  
  5434. o Syntax 
  5435. o Definition 
  5436. o E Language Syntax 
  5437.  
  5438.  
  5439. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5440.  
  5441. QUERYPROFILE( file_handle, application , key_name ) 
  5442.  
  5443.  
  5444. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5445.  
  5446. Returns the value for key key_name listed under the application application, 
  5447. found in the .INI file given by the file_handle or the null string if not 
  5448. found. 
  5449.  
  5450. Some valid arguments for file_handle are: 
  5451.  
  5452.    HINI_PROFILE        =  0  -- Searches both OS2.INI and OS2SYS.INI
  5453.    HINI_USERPROFILE    = -1  -- Searches OS2.INI
  5454.    HINI_SYSTEMPROFILE  = -2  -- Searches OS2SYS.INI
  5455.  
  5456.  
  5457. ΓòÉΓòÉΓòÉ 4.1.133. QUIETSHELL  string_expression ΓòÉΓòÉΓòÉ
  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. QUIETSHELL | QUIET_SHELL string_expression 
  5470.  
  5471.  
  5472. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5473.  
  5474. Executes string_expression. string_expression is to be an OS/2 command. If 
  5475. string_expression is an external program, the screen and cursor are not touched 
  5476. before or after the program is executed. 
  5477.  
  5478.  
  5479. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5480.  
  5481. Use this when you know the external program will not write to the screen, and 
  5482. you prefer not to see the screen clear and to be asked to press a key. Normally 
  5483. this is used to keep redirected utilities invisible, for example quietshell 
  5484. "subdir *.* >etemp". 
  5485.  
  5486. If the command DOES write to the screen, say after an unexpected error, its 
  5487. message will appear on top of E's text screen. The text will appear messy until 
  5488. the next time E refreshes the screen.  You can manually force a screen refresh 
  5489. by pressing ESC a couple of times. 
  5490.  
  5491. Another example is quietshell "mc2", which runs Richard Redpath's MC2 
  5492. calculator. This is an unusual example because MC2 does write to the screen, 
  5493. but it takes responsibility for restoring the screen contents it found. The 
  5494. effect is that of a pop-up calculator on top of the text screen. 
  5495.  
  5496.  
  5497. ΓòÉΓòÉΓòÉ 4.1.134. REFLOW ΓòÉΓòÉΓòÉ
  5498.  
  5499. Choose: 
  5500.  
  5501. o Syntax 
  5502. o Definition 
  5503. o E Language Syntax 
  5504.  
  5505.  
  5506. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5507.  
  5508. REFLOW 
  5509.  
  5510.  
  5511. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5512.  
  5513. Reformats marked text using current margin settings, like the standard Alt-P. 
  5514.  
  5515.  
  5516. ΓòÉΓòÉΓòÉ 4.1.135. REFRESH ΓòÉΓòÉΓòÉ
  5517.  
  5518. Choose: 
  5519.  
  5520. o Syntax 
  5521. o Definition 
  5522. o E Language Syntax 
  5523.  
  5524.  
  5525. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5526.  
  5527. REFRESH 
  5528.  
  5529.  
  5530. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5531.  
  5532. Activates the active file in the top level ring. Activates the top level ring 
  5533. and updates portions of screen which need to be updated. 
  5534.  
  5535.  
  5536. ΓòÉΓòÉΓòÉ 4.1.136. REGISTERFONT ΓòÉΓòÉΓòÉ
  5537.  
  5538. Choose: 
  5539.  
  5540. o Syntax 
  5541. o Definition 
  5542. o Example 
  5543. o E Language Syntax 
  5544.  
  5545.  
  5546. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5547.  
  5548. REGISTERFONT (fontname, fontsize,fontsel) 
  5549.  
  5550.  
  5551. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5552.  
  5553. Loads the font specified and returns an identifier that can be set in the .font 
  5554. field or which can be used as the value of a font attribute. 
  5555.  
  5556. 'fontsel' is any combination of 
  5557.  
  5558.   1 = Italic
  5559.   2 = Underscore
  5560.   8 = Outline
  5561.  16 = Strikeout
  5562.  32 = Bold
  5563.  
  5564.  
  5565. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5566.  
  5567. Examples: 
  5568.  
  5569.   .font = registerfont('Times New Roman', 24, 0)  -- Set a 24-point font.
  5570.   .font = registerfont('System Monospaced','WW8HH16',0)  -- 8 x 16 font
  5571.  
  5572.  
  5573. ΓòÉΓòÉΓòÉ 4.1.137. RELINK ΓòÉΓòÉΓòÉ
  5574.  
  5575. Choose: 
  5576.  
  5577. o Syntax 
  5578. o Definition 
  5579. o E Language Syntax 
  5580.  
  5581.  
  5582. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5583.  
  5584. Is described in section Linkable External Modules. 
  5585.  
  5586.  
  5587. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5588.  
  5589. Is described in section Linkable External Modules. 
  5590.  
  5591.  
  5592. ΓòÉΓòÉΓòÉ 4.1.138. REPEATFIND ΓòÉΓòÉΓòÉ
  5593.  
  5594. Choose: 
  5595.  
  5596. o Syntax 
  5597. o Definition 
  5598. o E Language Syntax 
  5599.  
  5600.  
  5601. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5602.  
  5603. REPEATFIND | REPEAT_FIND 
  5604.  
  5605.  
  5606. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5607.  
  5608. Repeats find of last string searched, like the standard Ctrl-F. The previous 
  5609. search options are preserved. (Note: If the cursor is currently at the 
  5610. beginning of a target search string, it skips to the next occurrence.) 
  5611.  
  5612.  
  5613. ΓòÉΓòÉΓòÉ 4.1.139. REPLACELINE new_line  [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  5614.  
  5615. Choose: 
  5616.  
  5617. o Syntax 
  5618. o Definition 
  5619. o Example 
  5620. o E Language Syntax 
  5621.  
  5622.  
  5623. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5624.  
  5625. REPLACELINE new_line [, {;} line_number   [, {;} fileid] ] 
  5626.  
  5627.  
  5628. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5629.  
  5630. Replaces a specified line in the specified file with the contents of variable 
  5631. new_line Defaulted values for omitted parameters are line_number = current 
  5632. line, and fileid = current file. See example under GETLINE. 
  5633.  
  5634.  
  5635. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5636.  
  5637. For example: 
  5638.  
  5639. REPLACELINE line
  5640. /* Replaces current line of current file with line */
  5641.  
  5642. REPLACELINE  line, 7
  5643. /* Replaces line 7 of current file with line */
  5644.  
  5645. REPLACELINE  line, 3, ThatFile
  5646. /* Replace line 3 of file whose fileid
  5647.      is in variable ThatFile with line */
  5648.  
  5649.  
  5650. ΓòÉΓòÉΓòÉ 4.1.140. RETURN [expression] ΓòÉΓòÉΓòÉ
  5651.  
  5652. Choose: 
  5653.  
  5654. o Syntax 
  5655. o Definition 
  5656. o E Language Syntax 
  5657.  
  5658.  
  5659. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5660.  
  5661. RETURN [expression] 
  5662.  
  5663.  
  5664. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5665.  
  5666. Returns expression to caller. If no expression is supplied, a null value is 
  5667. returned to the caller. From a procedure, the returned value is passed back to 
  5668. the caller as a function value (as in x=myproc()). From a command the returned 
  5669. value is assigned to RC. 
  5670.  
  5671. When returning from a key (DEF), an expression is not allowed.  A return from a 
  5672. key DEF is unusual, since keys do not return values, but a return is sometimes 
  5673. used as an easy early exit from a key's program. A return is better than a STOP 
  5674. in case some other procedure was "calling" the key with an executekey; a STOP 
  5675. prevents the caller from regaining control. 
  5676.  
  5677.  
  5678. ΓòÉΓòÉΓòÉ 4.1.141. REVERSE(string) ΓòÉΓòÉΓòÉ
  5679.  
  5680. Choose: 
  5681.  
  5682. o Syntax 
  5683. o Definition 
  5684. o Example 
  5685. o E Language Syntax 
  5686.  
  5687.  
  5688. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5689.  
  5690. REVERSE( string_expression ) 
  5691.  
  5692.  
  5693. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5694.  
  5695. Returns the reverse of the string string. 
  5696.  
  5697.  
  5698. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5699.  
  5700. Here are some examples: 
  5701.  
  5702.     REVERSE('BACKWORDS') --> 'SDROWKCAB'
  5703.     REVERSE('seluR MPE') --> 'EPM Rules'
  5704.  
  5705.  
  5706. ΓòÉΓòÉΓòÉ 4.1.142. RIGHT ΓòÉΓòÉΓòÉ
  5707.  
  5708. Choose: 
  5709.  
  5710. o Syntax 
  5711. o Definition 
  5712. o E Language Syntax 
  5713.  
  5714.  
  5715. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5716.  
  5717. RIGHT 
  5718.  
  5719.  
  5720. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5721.  
  5722. Moves cursor one character to the right, like the standard key Right. 
  5723.  
  5724.  
  5725. ΓòÉΓòÉΓòÉ 4.1.143. RIGHTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  5726.  
  5727. Choose: 
  5728.  
  5729. o Syntax 
  5730. o Definition 
  5731. o Example 
  5732. o E Language Syntax 
  5733.  
  5734.  
  5735. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5736.  
  5737. RIGHTSTR( string,  length   [, pad] ) 
  5738.  
  5739.  
  5740. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5741.  
  5742. Returns a string of length length containing the right-most length characters 
  5743. of string. That is, padded with pad characters (or truncated) on the left as 
  5744. needed. The default pad character is a blank. length must be non-negative. 
  5745.  
  5746.  
  5747. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5748.  
  5749. Here are some examples: 
  5750.  
  5751.     RIGHTSTR('abc  d',8)   -->  '  abc  d'
  5752.     RIGHTSTR('abc def',5)  -->  'c def'
  5753.     RIGHTSTR('12',5,'0')   -->  '00012'
  5754.  
  5755.  
  5756. ΓòÉΓòÉΓòÉ 4.1.144. RUBOUT ΓòÉΓòÉΓòÉ
  5757.  
  5758. Choose: 
  5759.  
  5760. o Syntax 
  5761. o Definition 
  5762. o E Language Syntax 
  5763.  
  5764.  
  5765. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5766.  
  5767. RUBOUT 
  5768.  
  5769.  
  5770. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5771.  
  5772. Deletes character to left of cursor, like the standard key Backspace. 
  5773.  
  5774.  
  5775. ΓòÉΓòÉΓòÉ 4.1.145. SAYAT string, row, column, attribute [,length][,window] ΓòÉΓòÉΓòÉ
  5776.  
  5777. Choose: 
  5778.  
  5779. o Syntax 
  5780. o Definition 
  5781. o Example 
  5782. o E Language Syntax 
  5783.  
  5784.  
  5785. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5786.  
  5787. SAYAT string, row, column,   attribute [, length] 
  5788.  
  5789.  
  5790. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5791.  
  5792. Writes string at the screen location specified by row (any number included in 
  5793. 1..screenheight()) and column (any number included in 1..screenwidth()). The 
  5794. parameter attribute allows you to specify any screen attribute (0..255 or any 
  5795. constant color value listed in COLORS.e) to highlight string. If length is 
  5796. omitted, E assumes length = LENGTH(string). If length < LENGTH(string), E 
  5797. writes the first length number of characters. If length > LENGTH(string), E 
  5798. changes the screen attribute to attribute for the last length - LENGTH(string) 
  5799. number of character positions without changing the text. 
  5800.  
  5801. The window option defines which text window area should be written to by the 
  5802. SAYAT statement. 0=Edit Window, 1=Extra window. The extra window is the window 
  5803. that makes up the status line and message line. The edit window is everything 
  5804. else. 
  5805.  
  5806.  
  5807. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5808.  
  5809. Examples:
  5810.  
  5811. /* write red string in upper right corner */
  5812. sayat 'mymessage', 1, 70, RED
  5813.  
  5814. /* change screen positions (10,20) to (10,24)
  5815.    to green color without changing text */
  5816. sayat '', 10, 20, GREEN, 5
  5817.  
  5818. To put a message to the message line, use the MESSAGE() defproc. 
  5819.  
  5820. Note:  that something printed with the SAYAT statement only stays on the screen 
  5821. until a screen refresh is done. Since a SAYERROR call produces a screen 
  5822. refresh, combining these two statements: 
  5823.  
  5824.   sayat 'My Procedure.', 12, 20, GREEN, 5
  5825.   sayerror "File not found!"
  5826. will result in the SAYAT message never being seen. To prevent this, you can use 
  5827. the DISPLAY statement to stop screen refreshing, for example: 
  5828.  
  5829. display -1              -- turn off display updating
  5830.   sayat 'My Procedure.', 12, 20 ,GREEN, 5
  5831.   sayerror "File not found!"
  5832. display +1              -- turn on display updating
  5833. In this way, the screen will not be refreshed (and therefore the message will 
  5834. stay on the screen) until the next screen update. 
  5835.  
  5836.  
  5837. ΓòÉΓòÉΓòÉ 4.1.146. SAYERROR expression ΓòÉΓòÉΓòÉ
  5838.  
  5839. Choose: 
  5840.  
  5841. o Syntax 
  5842. o Definition 
  5843. o Example 
  5844. o E Language Syntax 
  5845.  
  5846.  
  5847. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5848.  
  5849. SAYERROR( expression ) 
  5850.  
  5851.  
  5852. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5853.  
  5854. Should not be confused with the built-in procedure SAYERROR() described in this 
  5855. section. 
  5856.  
  5857. If expression is the number 0 or 1, any pending error messages are discarded 
  5858. and not displayed. 0 will refresh the screen; 1 will not. 
  5859.  
  5860. If expression is any number other than 0 or 1, `the interpreter displays the 
  5861. string corresponding to that numbered error message.  Error messages and their 
  5862. corresponding return codes are listed in the section Return Codes. 
  5863.  
  5864. Each command in the E language returns a code which indicates any errors that 
  5865. were encountered while trying to perform the command.  Each of these return 
  5866. codes has a corresponding string which explains the error. 
  5867.  
  5868.  
  5869. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5870.  
  5871. For example: 
  5872.  
  5873.   sayerror -275
  5874.  
  5875. This will display the text "Missing filename" on the message line. 
  5876.  
  5877. If expression is a number which does not correspond to a return code, an 
  5878. "ERROR: Message not available" message is printed on the message line. 
  5879.  
  5880. If expression is anything other than a number, the text will be displayed on 
  5881. the message line. For example: 
  5882.  
  5883.   err1 = "-275"   -- remember everything is a string
  5884.   sayerror err1   --  equivalent to: err1 = -275
  5885.  
  5886.   err2 = "David"
  5887.   sayerror err2
  5888.  
  5889. The first example will display the error message (not "-275") on the message 
  5890. line. The second example will display the text David on the message line. 
  5891.  
  5892. A combination of text and numbers will act as if it were all text. For example: 
  5893.  
  5894.    sayerror "The error message was " err1
  5895.  
  5896. The intention to display all text would not work in this case. Instead the user 
  5897. would get: 
  5898.  
  5899.   The error message was -275
  5900.  
  5901. The error code did not get translated. 
  5902.  
  5903. To help clarify this explanation, try entering and compiling the following 
  5904. defc: 
  5905.  
  5906.   defc mytest
  5907.     sayerror arg(1)
  5908.  
  5909. Then experiment by typing in the command line dialog box mytest followed by 
  5910. valid error numbers, invalid error numbers, text, and text with numbers to 
  5911. determine what will happen. 
  5912.  
  5913.  
  5914. ΓòÉΓòÉΓòÉ 4.1.147. SAYERROR(error_string) ΓòÉΓòÉΓòÉ
  5915.  
  5916. Choose: 
  5917.  
  5918. o Syntax 
  5919. o Definition 
  5920. o Example 
  5921. o E Language Syntax 
  5922.  
  5923.  
  5924. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5925.  
  5926. SAYERROR expression 
  5927.  
  5928.  
  5929. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5930.  
  5931. Returns the return code specified by error_string. Note that this is only true 
  5932. if the sayerror procedure acts as a function and returns a return code. If the 
  5933. SAYERROR() procedure is not assigned and not used in a comparison, then the 
  5934. procedure acts the same as the SAYERROR statement (also described in this 
  5935. section). 
  5936.  
  5937.  
  5938. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  5939.  
  5940. For example: 
  5941.  
  5942.   x = sayerror("new file")
  5943.   sayerror("new file")
  5944.  
  5945. The first example will put the return code for new file (ie. -282) into the 
  5946. variable x. The second example will act in the same manner as a SAYERROR 
  5947. statement and would display the words "new file" on the message line. 
  5948.  
  5949.  The case of error_string does not matter. The compiler will convert 
  5950. error_string to uppercase and then perform the lookup for error_string. The 
  5951. compiler reduces sayerror(error_string) to a constant for efficiency. 
  5952. Therefore, if the words new file were changed to gobbildy gook (not a valid 
  5953. error message), the compiler would not compile and return an "invalid 
  5954. parameter" error message. 
  5955.  
  5956. The most common usage of this is to test an return code to see if a certain 
  5957. error occurred. For example: 
  5958.  
  5959.      'e myfile'
  5960.      if rc=sayerror("new file") then
  5961. All error messages and their corresponding RC code numbers can be found in 
  5962. Return Codes. 
  5963.  
  5964.  
  5965. ΓòÉΓòÉΓòÉ 4.1.148. SAYERRORTEXT(rc) ΓòÉΓòÉΓòÉ
  5966.  
  5967. Choose: 
  5968.  
  5969. o Syntax 
  5970. o Definition 
  5971. o E Language Syntax 
  5972.  
  5973.  
  5974. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5975.  
  5976. SAYERRORTEXT'(' numeric_expression ')' 
  5977.  
  5978.  
  5979. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5980.  
  5981. Returns the message that would be displayed for error code rc. 
  5982.  
  5983.  
  5984. ΓòÉΓòÉΓòÉ 4.1.149. SCREENHEIGHT() ΓòÉΓòÉΓòÉ
  5985.  
  5986. Choose: 
  5987.  
  5988. o Syntax 
  5989. o Definition 
  5990. o E Language Syntax 
  5991.  
  5992.  
  5993. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  5994.  
  5995. SCREENHEIGHT() 
  5996.  
  5997.  
  5998. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  5999.  
  6000. Returns physical screenheight, usually 25. 
  6001.  
  6002.  
  6003. ΓòÉΓòÉΓòÉ 4.1.150. SCREENWIDTH() ΓòÉΓòÉΓòÉ
  6004.  
  6005. Choose: 
  6006.  
  6007. o Syntax 
  6008. o Definition 
  6009. o E Language Syntax 
  6010.  
  6011.  
  6012. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6013.  
  6014. SCREENWIDTH() 
  6015.  
  6016.  
  6017. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6018.  
  6019. Returns physical screenwidth, usually 80. 
  6020.  
  6021.  
  6022. ΓòÉΓòÉΓòÉ 4.1.151. SEG(variable) ΓòÉΓòÉΓòÉ
  6023.  
  6024. Choose: 
  6025.  
  6026. o Syntax 
  6027. o Definition 
  6028. o Example 
  6029. o E Language Syntax 
  6030.  
  6031.  
  6032. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6033.  
  6034. SEG( variable ) 
  6035.  
  6036.  
  6037. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6038.  
  6039. Returns a string representation of the segment of the actual memory address of 
  6040. variable. 
  6041.  
  6042.  
  6043. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6044.  
  6045. For example:
  6046.  
  6047.     v = 'testing'
  6048.     sayerror peek( seg(v), ofs(v), 7 )
  6049.  
  6050. The above example prints testing. See also OFS(). 
  6051.  
  6052.  
  6053. ΓòÉΓòÉΓòÉ 4.1.152. SELECTOR(variable) ΓòÉΓòÉΓòÉ
  6054.  
  6055. Choose: 
  6056.  
  6057. o Syntax 
  6058. o Definition 
  6059. o E Language Syntax 
  6060.  
  6061.  
  6062. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6063.  
  6064. SELECTOR( variable ) 
  6065.  
  6066.  
  6067. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6068.  
  6069. Returns the segment address of variable in the form of a binary word. To be 
  6070. used with C functions, like those made via DYNALINK(). 
  6071.  
  6072. This function it is to be used only during the protected mode execution. 
  6073.  
  6074.  
  6075. ΓòÉΓòÉΓòÉ 4.1.153. SETMARK ΓòÉΓòÉΓòÉ
  6076.  
  6077. Choose: 
  6078.  
  6079. o Syntax 
  6080. o Definition 
  6081. o E Language Syntax 
  6082.  
  6083.  
  6084. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6085.  
  6086. SETMARK firstline, lastline, firstcol, lastcol, marktype, fileid 
  6087.  
  6088.  
  6089. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6090.  
  6091. Sets a mark in file 'fileid' from firstline firstcol to lastline lastcol. 
  6092. marktype must be one of: 
  6093.  
  6094.  0 = line mark
  6095.  1 = char mark
  6096.  2 = block mark
  6097.  3 = charg mark
  6098.  4 = blockg mark
  6099.  
  6100.  
  6101. ΓòÉΓòÉΓòÉ 4.1.154. SETPROFILE(application, key_name, data) ΓòÉΓòÉΓòÉ
  6102.  
  6103. Choose: 
  6104.  
  6105. o Syntax 
  6106. o Definition 
  6107. o E Language Syntax 
  6108.  
  6109.  
  6110. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6111.  
  6112. SETPROFILE( string_expression, string_expression, string_expression ) 
  6113.  
  6114.  
  6115. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6116.  
  6117. Sets the value for key key_name listed under the application application to 
  6118. data in OS2.INI. 
  6119.  
  6120.  
  6121. ΓòÉΓòÉΓòÉ 4.1.155. SETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  6122.  
  6123. Choose: 
  6124.  
  6125. o Syntax 
  6126. o Definition 
  6127. o Example 
  6128. o E Language Syntax 
  6129.  
  6130.  
  6131. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6132.  
  6133. SETSEARCH identifier 
  6134.  
  6135.  
  6136. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6137.  
  6138. Retrieves the search command string saved in the variable search_cmd via a 
  6139. GETSEARCH statement. These two statements allow the user to save a search 
  6140. command, perform other searches and then retrieve the original command, so that 
  6141. Ctrl-F's and REPEATFIND statements refer to the original search pattern. 
  6142.  
  6143.  
  6144. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6145.  
  6146. For example: 
  6147.  
  6148.    'xcom L /foobar/c'
  6149.    GETSEARCH search_command
  6150.    'L /word'
  6151.    SETSEARCH search_command
  6152. The first statement in the above example issues a search command. The GETSEARCH 
  6153. statement effectively sets the variable search_command to 'xcom L/foobar/c'. 
  6154. Then another search command is issued, wiping out the first search command, but 
  6155. the SETSEARCH statement restores the first command, so that if a Ctrl-F 
  6156. (REPEAT_FIND) is now executed, the string foobar will be once again located. 
  6157.  
  6158.  
  6159. ΓòÉΓòÉΓòÉ 4.1.156. SHIFTLEFT ΓòÉΓòÉΓòÉ
  6160.  
  6161. Choose: 
  6162.  
  6163. o Syntax 
  6164. o Definition 
  6165. o E Language Syntax 
  6166.  
  6167.  
  6168. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6169.  
  6170. SHIFTLEFT | SHIFT_LEFT 
  6171.  
  6172.  
  6173. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6174.  
  6175. Shifts marked text 1 position to left, like the standard Ctrl-F7. 
  6176.  
  6177.  
  6178. ΓòÉΓòÉΓòÉ 4.1.157. SHIFTRIGHT ΓòÉΓòÉΓòÉ
  6179.  
  6180. Choose: 
  6181.  
  6182. o Syntax 
  6183. o Definition 
  6184. o E Language Syntax 
  6185.  
  6186.  
  6187. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6188.  
  6189. SHIFTRIGHT | SHIFT_RIGHT 
  6190.  
  6191.  
  6192. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6193.  
  6194. Shifts marked text 1 position to right, like the standard Ctrl-F8. 
  6195.  
  6196.  
  6197. ΓòÉΓòÉΓòÉ 4.1.158. SHOWMENU ΓòÉΓòÉΓòÉ
  6198.  
  6199. Choose: 
  6200.  
  6201. o Syntax 
  6202. o Definition 
  6203. o E Language Syntax 
  6204.  
  6205.  
  6206. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6207.  
  6208. SHOWMENU 
  6209.  
  6210.  
  6211. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6212.  
  6213. Displays a menu after it has been built. See the section Building Menus from 
  6214. the Macro Language for more information on the SHOWMENU statement. 
  6215.  
  6216.  
  6217. ΓòÉΓòÉΓòÉ 4.1.159. SPLIT ΓòÉΓòÉΓòÉ
  6218.  
  6219. Choose: 
  6220.  
  6221. o Syntax 
  6222. o Definition 
  6223. o E Language Syntax 
  6224.  
  6225.  
  6226. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6227.  
  6228. SPLIT 
  6229.  
  6230.  
  6231. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6232.  
  6233. Splits current line at cursor position, like the standard Alt-S. 
  6234.  
  6235.  
  6236. ΓòÉΓòÉΓòÉ 4.1.160. STOP ΓòÉΓòÉΓòÉ
  6237.  
  6238. Choose: 
  6239.  
  6240. o Syntax 
  6241. o Definition 
  6242. o E Language Syntax 
  6243.  
  6244.  
  6245. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6246.  
  6247. STOP 
  6248.  
  6249.  
  6250. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6251.  
  6252. Stops execution of interpreter. A RETURN statement returns control to any 
  6253. calling procedures, however the STOP statement ends the execution immediately. 
  6254. RETURN is the preferred means of exiting a procedure, however, STOP is useful 
  6255. for terminating execution on a critical error. 
  6256.  
  6257.  
  6258. ΓòÉΓòÉΓòÉ 4.1.161. STOPONRC ΓòÉΓòÉΓòÉ
  6259.  
  6260. Choose: 
  6261.  
  6262. o Syntax 
  6263. o Definition 
  6264. o E Language Syntax 
  6265.  
  6266.  
  6267. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6268.  
  6269. STOPONRC | STOP_ON_RC 
  6270.  
  6271.  
  6272. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6273.  
  6274. Stops execution of interpreter only if rc is non-zero. 
  6275.  
  6276.  
  6277. ΓòÉΓòÉΓòÉ 4.1.162. STRIP(string [,option] [,char]) ΓòÉΓòÉΓòÉ
  6278.  
  6279. Choose: 
  6280.  
  6281. o Syntax 
  6282. o Definition 
  6283. o Example 
  6284. o E Language Syntax 
  6285.  
  6286.  
  6287. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6288.  
  6289. STRIP( string [,  (L|T|B)]  [,  'char' ] ) 
  6290.  
  6291.  
  6292. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6293.  
  6294. Removes char from string in any of the following positions depending upon the 
  6295. option specified: 
  6296.  
  6297. Option:        Position: 
  6298. 'L' 
  6299.                Leading 
  6300. 'T' 
  6301.                Trailing 
  6302. 'B' 
  6303.                Both 
  6304.  
  6305. If option is omitted, the default is B. If char is omitted, the default is the 
  6306. space character.  (Same as REXX.) 
  6307.  
  6308.  
  6309. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6310.  
  6311.    strip('  ab c  ')     = 'ab c'
  6312.    strip('  ab c  ','L') = 'ab c  '
  6313.  
  6314. Note:  Calling the STRIP() function does not actually change the value of the 
  6315. parameter string. In order to modify a variable you must assign to it, for 
  6316. example: 
  6317.  
  6318. field = strip( field )
  6319.  
  6320.  
  6321. ΓòÉΓòÉΓòÉ 4.1.163. SUBSTR(string,n [,k [,pad] ]) ΓòÉΓòÉΓòÉ
  6322.  
  6323. Choose: 
  6324.  
  6325. o Syntax 
  6326. o Definition 
  6327. o Example 
  6328. o E Language Syntax 
  6329.  
  6330.  
  6331. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6332.  
  6333. SUBSTR( string,  n [, length   [,  'pad' ] ] ) 
  6334.  
  6335.  
  6336. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6337.  
  6338. Returns the substring of string which begins at the nth character, and is of 
  6339. length, padded with blanks or the specified character (pad). If k is omitted, 
  6340. it defaults to be the rest of the string, and the default pad character is a 
  6341. blank. n must be positive. 
  6342.  
  6343.  
  6344. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6345.  
  6346.     SUBSTR('abc',2)       == 'bc'
  6347.     SUBSTR('abc',2,4)     == 'bc  '
  6348.     SUBSTR('abc',2,6,'.') == 'bc....'
  6349.  
  6350. Note: in some situations the positional (numeric) patterns of parsing templates 
  6351. are more convenient for selecting substring, especially if more than one 
  6352. substring is to be extracted from a string. 
  6353.  
  6354.  
  6355. ΓòÉΓòÉΓòÉ 4.1.164. SUBWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  6356.  
  6357. Choose: 
  6358.  
  6359. o Syntax 
  6360. o Definition 
  6361. o Example 
  6362. o E Language Syntax 
  6363.  
  6364.  
  6365. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6366.  
  6367. SUBWORD( string , n   [,  length] ) 
  6368.  
  6369.  
  6370. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6371.  
  6372. Returns the substring of string that begins at the nth word, and is of length 
  6373. length blank-delimited words. If length is not specified, the rest of the 
  6374. string is returned. n must be positive. The returned string will never have 
  6375. leading or trailing blanks, but will include all blanks between the selected 
  6376. words. 
  6377.  
  6378.  
  6379. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6380.  
  6381. Here are some examples: 
  6382.  
  6383.  SUBWORD('Now is the  time',2,2)    ->    'is the'
  6384.  SUBWORD('Now is the  time',3)      ->    'the  time'
  6385.  SUBWORD('Now is the  time',5)      ->    ''
  6386.  
  6387.  
  6388. ΓòÉΓòÉΓòÉ 4.1.165. TAB ΓòÉΓòÉΓòÉ
  6389.  
  6390. Choose: 
  6391.  
  6392. o Syntax 
  6393. o Definition 
  6394. o E Language Syntax 
  6395.  
  6396.  
  6397. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6398.  
  6399. TAB 
  6400.  
  6401.  
  6402. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6403.  
  6404. Moves cursor to next tab stop, like standard key Tab. 
  6405.  
  6406.  
  6407. ΓòÉΓòÉΓòÉ 4.1.166. TABWORD ΓòÉΓòÉΓòÉ
  6408.  
  6409. Choose: 
  6410.  
  6411. o Syntax 
  6412. o Definition 
  6413. o E Language Syntax 
  6414.  
  6415.  
  6416. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6417.  
  6418. TABWORD | TAB_WORD 
  6419.  
  6420.  
  6421. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6422.  
  6423. Positions cursor on first character of next word, like the standard key 
  6424. Ctrl-Right. If there are no more words, the cursor is positioned at the end of 
  6425. the last word. 
  6426.  
  6427.  
  6428. ΓòÉΓòÉΓòÉ 4.1.167. TEXTLINE(line_num) ΓòÉΓòÉΓòÉ
  6429.  
  6430. Choose: 
  6431.  
  6432. o Syntax 
  6433. o Definition 
  6434. o E Language Syntax 
  6435.  
  6436.  
  6437. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6438.  
  6439. TEXTLINE( line_num ) 
  6440.  
  6441.  
  6442. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6443.  
  6444. Returns the text of line number line_num. The following statements perform the 
  6445. same function: 
  6446.  
  6447.    getline line, i
  6448.  
  6449. and
  6450.  
  6451.    line = textline(i)
  6452. The TEXTLINE() procedure is simply a more economical way to do comparison loops 
  6453. like: 
  6454.  
  6455.    while textline(i) == ''
  6456.        deleteline i
  6457.  
  6458.  
  6459. ΓòÉΓòÉΓòÉ 4.1.168. TOP ΓòÉΓòÉΓòÉ
  6460.  
  6461. Choose: 
  6462.  
  6463. o Syntax 
  6464. o Definition 
  6465. o E Language Syntax 
  6466.  
  6467.  
  6468. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6469.  
  6470. TOP 
  6471.  
  6472.  
  6473. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6474.  
  6475. Moves cursor to top of file. 
  6476.  
  6477.  
  6478. ΓòÉΓòÉΓòÉ 4.1.169. TRANSLATE(string [, tableo [, tablei [ pad ]]] ) ΓòÉΓòÉΓòÉ
  6479.  
  6480. Choose: 
  6481.  
  6482. o Syntax 
  6483. o Definition 
  6484. o Example 
  6485. o E Language Syntax 
  6486.  
  6487.  
  6488. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6489.  
  6490. TRANSLATE( string [, tableo   [, tablei   [, pad ] ] ] ) 
  6491.  
  6492.  
  6493. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6494.  
  6495.  Translates characters in string to be other characters, or may be used to 
  6496. reorder characters in a string.  If neither translate table is given, string is 
  6497. simply translated to uppercase.  tableo is the output table and tablei is the 
  6498. input translate table (the default is ASCII 0...255).  The output table 
  6499. defaults to the null string, and is padded with pad or truncated as necessary. 
  6500. The default pad is a blank.  The tables may be of any length: the first 
  6501. occurrence of a character in the input table is the one that is used if there 
  6502. are duplicates. 
  6503.  
  6504.  
  6505. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6506.  
  6507. Examples:
  6508.  
  6509.   TRANSLATE('abcdef')                    ==    'ABCDEF'
  6510.   TRANSLATE('abbc','?','b')              ==    'a??c'
  6511.   TRANSLATE('abcdef','12','ec')          ==    'ab2d1f'
  6512.   TRANSLATE('abcdef','12','abcd','.')    ==    '12..ef'
  6513.   TRANSLATE('4123','abcd','1234')        ==    'dabc'
  6514.  
  6515. Note:  The last example shows how the TRANSLATE function may be used to reorder 
  6516. the characters in a string.  In the example, any 4-character string could be 
  6517. specified as the second argument and its last character would be moved to the 
  6518. beginning of the string. 
  6519.  
  6520.  
  6521. ΓòÉΓòÉΓòÉ 4.1.170. TRYINCLUDE filename ΓòÉΓòÉΓòÉ
  6522.  
  6523. Choose: 
  6524.  
  6525. o Syntax 
  6526. o Definition 
  6527. o E Language Syntax 
  6528.  
  6529.  
  6530. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6531.  
  6532. Is described in section Compiler Directive Statements. 
  6533.  
  6534.  
  6535. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6536.  
  6537. Is described in section Compiler Directive Statements. 
  6538.  
  6539.  
  6540. ΓòÉΓòÉΓòÉ 4.1.171. UNDO ΓòÉΓòÉΓòÉ
  6541.  
  6542. Choose: 
  6543.  
  6544. o Syntax 
  6545. o Definition 
  6546. o E Language Syntax 
  6547.  
  6548.  
  6549. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6550.  
  6551. UNDO 
  6552.  
  6553.  
  6554. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6555.  
  6556. Restores the current line after modification (but before leaving it), like the 
  6557. standard F9 key. Pressing the key (or issuing the statement) twice causes the 
  6558. UNDO to undo itself, i.e. the line is re-modified. 
  6559.  
  6560.  
  6561. ΓòÉΓòÉΓòÉ 4.1.172. UNDOACTION ΓòÉΓòÉΓòÉ
  6562.  
  6563. Choose: 
  6564.  
  6565. o Syntax 
  6566. o Definition 
  6567. o E Language Syntax 
  6568.  
  6569.  
  6570. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6571.  
  6572. UNDOACTION action, statevar 
  6573.  
  6574.  
  6575. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6576.  
  6577. Statevar must be a variable; it is used for input or output depending on the 
  6578. action.  Actions are: 
  6579.  
  6580. Action Value Result 
  6581.  
  6582. 1=GET_STATE Returns a handle for the current state of the current file.  If the 
  6583.           file hasn't changed since the the last time the file was checked, 
  6584.           then the same value is returned.  If the file has changed, the 
  6585.           current state is checkpointed and a new handle is returned. 
  6586.  
  6587. 2=GET_OLDEST_STATE The editor periodically forgets old states in order to save 
  6588.           memory.  This call allows one to determine the oldest reachable 
  6589.           state. 
  6590.  
  6591. 3=GOTO_STATE If the current state is not yet named, it is checkpointed and then 
  6592.           the content of the file is changed to reflect the specified state. 
  6593.  
  6594. 4=DISABLE_RECORDING The parameter specifies at which times state checkin should 
  6595.           no longer automatically be done.  A sideeffect of this command is to 
  6596.           checkin the current state if it is not already checked in. 
  6597.  
  6598.                                                   Times   0 upon starting each keystroke
  6599.                                                           1 upon starting each command
  6600.                                                           2 when moving the cursor from a
  6601.                                                                       modified line.
  6602.  
  6603. 5=ENABLE_RECORDING The parameter specifies at what additional times checkin 
  6604.           should be done. Unlike the disabling code, this operation does not 
  6605.           have checkin as a side effect.  See DISABLE for time codes. 
  6606.  
  6607. 6=QUERY_NAMED_SEQ This returns a string consisting of two numbers seperated by 
  6608.           an elipsis. This string represents the oldest and most recent states 
  6609.           that can be reached. These are lowlevel handles, so they can only be 
  6610.           use to call GOTO_STATE2.  The left most number returned represents 
  6611.           the oldest state the is currently remembered.  It is possible that it 
  6612.           is not reachable going to a state causes a checkpointing of the 
  6613.           current state and check pointing may require a trimming of the undo 
  6614.           tree.  If the current state is checked in, the second value 
  6615.           represents the current state.  If the current state is not checked 
  6616.           in, the second value represents the state of file when the next 
  6617.           checkin is done.  (Note a checkin will be done as a side effect of 
  6618.           the first GOTO.)  BTW, one can go to any state between the first and 
  6619.           last.  They do represent a temporal sequence. 
  6620.  
  6621. 7=GOTO_STATE2 This is like GOTO_STATE, except the parameter should be a low 
  6622.           level handle like those returned from QUERY_NAMED_SEQ. 
  6623.  
  6624.  
  6625. ΓòÉΓòÉΓòÉ 4.1.173. UNLINK ΓòÉΓòÉΓòÉ
  6626.  
  6627. Choose: 
  6628.  
  6629. o Syntax 
  6630. o Definition 
  6631. o E Language Syntax 
  6632.  
  6633.  
  6634. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6635.  
  6636. UNLINK string_expression 
  6637.  
  6638.  
  6639. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6640.  
  6641. Is described in section Linkable External Modules. 
  6642.  
  6643.  
  6644. ΓòÉΓòÉΓòÉ 4.1.174. UNMARK ΓòÉΓòÉΓòÉ
  6645.  
  6646. Choose: 
  6647.  
  6648. o Syntax 
  6649. o Definition 
  6650. o E Language Syntax 
  6651.  
  6652.  
  6653. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6654.  
  6655. UNMARK 
  6656.  
  6657.  
  6658. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6659.  
  6660. Removes text marks, like the standard key Alt-U. 
  6661.  
  6662.  
  6663. ΓòÉΓòÉΓòÉ 4.1.175. UP ΓòÉΓòÉΓòÉ
  6664.  
  6665. Choose: 
  6666.  
  6667. o Syntax 
  6668. o Definition 
  6669. o E Language Syntax 
  6670.  
  6671.  
  6672. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6673.  
  6674. UP 
  6675.  
  6676.  
  6677. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6678.  
  6679. Moves cursor 1 character up, like standard Up key. 
  6680.  
  6681.  
  6682. ΓòÉΓòÉΓòÉ 4.1.176. UPCASE(expression) ΓòÉΓòÉΓòÉ
  6683.  
  6684. Choose: 
  6685.  
  6686. o Syntax 
  6687. o Definition 
  6688. o E Language Syntax 
  6689.  
  6690.  
  6691. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6692.  
  6693. UPCASE( expression ) 
  6694.  
  6695.  
  6696. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6697.  
  6698. Returns the upper-case conversion of the expression. 
  6699.  
  6700.  
  6701. ΓòÉΓòÉΓòÉ 4.1.177. VER([option]) ΓòÉΓòÉΓòÉ
  6702.  
  6703. Choose: 
  6704.  
  6705. o Syntax 
  6706. o Definition 
  6707. o E Language Syntax 
  6708.  
  6709.  
  6710. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6711.  
  6712. VER() 
  6713.  
  6714.  
  6715. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6716.  
  6717. Returns the version of the editor being used. 
  6718.  
  6719. If option is 1 then VER returns the editors numeric version. If option is 2, 
  6720. VER returns the minimum allowed version number of a E macro file to be used 
  6721. within this version.  If no option is specified, the version "string" is 
  6722. returned. 
  6723.  
  6724.  
  6725. ΓòÉΓòÉΓòÉ 4.1.178. VERIFY(string, reference [,options [,start] ] ) ΓòÉΓòÉΓòÉ
  6726.  
  6727. Choose: 
  6728.  
  6729. o Syntax 
  6730. o Definition 
  6731. o Example 
  6732. o E Language Syntax 
  6733.  
  6734.  
  6735. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6736.  
  6737. VERIFY( string ,  reference  [ ,(M|N)   [,  start] ]) 
  6738.  
  6739.  
  6740. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6741.  
  6742. verifies that string is composed only of characters from reference, by 
  6743. returning the position of the first character in string that is not also in 
  6744. reference.  If all the characters are present in reference, 0 is returned. The 
  6745. options are: 
  6746.  
  6747. 'Match'       and       'Nomatch'
  6748. If 'Match' is specified, i.e. the value of the third argument expression is a 
  6749. string beginning with 'M' or 'm', the position of the first character in string 
  6750. that is in reference is returned.  0 is returned if none of the characters are 
  6751. found. 'Nomatch' (or any string expression beginning with 'N' or 'n') can also 
  6752. be specified, although you would not normally do so because 'Nomatch' is the 
  6753. default. 
  6754.  
  6755. The default for start is 1, making the search start at the first character of 
  6756. string.  This can be overridden by giving a different start value, which must 
  6757. be positive. 
  6758.  
  6759. If string is null, 0 is returned regardless of the value of the third argument. 
  6760. Similarly if start is greater than length(string), 0 is returned. 
  6761.  
  6762.  
  6763. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6764.  
  6765. Examples:
  6766.  
  6767.        VERIFY('123','1234567890')      ==  0
  6768.        VERIFY('1Z3','1234567890')      ==  2
  6769.        VERIFY('AB3','1234567890','M')  ==  3
  6770. The REXX documentation includes this example: 
  6771.  
  6772.        VERIFY('1P3Q4','1234567890',,3) ==  4
  6773. Notice that the third parameter is completely omitted between two adjacent 
  6774. commas.  This causes REXX to use the default option of 'nomatch'. 
  6775.  
  6776. In general, the E compiler does not like parameters to be completely omitted in 
  6777. this way.  It expects the parameter to be present even if it's an empty string. 
  6778. Thus the same intent can be achieved by either of these: 
  6779.  
  6780.        VERIFY('1P3Q4','1234567890','',3)  ==  4
  6781.        VERIFY('1P3Q4','1234567890','N',3) ==  4
  6782.  
  6783.  
  6784. ΓòÉΓòÉΓòÉ 4.1.179. WHILE ΓòÉΓòÉΓòÉ
  6785.  
  6786. Choose: 
  6787.  
  6788. o Syntax 
  6789. o Definition 
  6790. o E Language Syntax 
  6791.  
  6792.  
  6793. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6794.  
  6795. Is described in section Conditional and Loop Statements. 
  6796.  
  6797.  
  6798. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6799.  
  6800. Is described in section Conditional and Loop Statements. 
  6801.  
  6802.  
  6803. ΓòÉΓòÉΓòÉ 4.1.180. WINDOWMESSAGE ΓòÉΓòÉΓòÉ
  6804.  
  6805. Choose: 
  6806.  
  6807. o Syntax 
  6808. o Definition 
  6809. o Example 
  6810. o E Language Syntax 
  6811.  
  6812.  
  6813. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6814.  
  6815. WINDOWMESSAGE(send_flag, target, message, mp1, mp2) 
  6816.  
  6817.  
  6818. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6819.  
  6820. Performs a WinPostMessage (if send_flag = 0) or WinSendMessage (if send_flag = 
  6821. 1) to the target window with the given message number and MP1 and MP2 values. 
  6822.  
  6823.  
  6824. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6825.  
  6826. /* Pop the command line and pre-fill it with 'Prompt'
  6827. call windowmessage(0,  getpminfo(EPMINFO_OWNERCLIENT),
  6828.                    5124,               -- EPM_POPCMDLINE
  6829.                    0,
  6830.                    put_in_buffer('Prompt') )
  6831.  
  6832.  
  6833. ΓòÉΓòÉΓòÉ 4.1.181. WINMESSAGEBOX ΓòÉΓòÉΓòÉ
  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. WINMESSAGEBOX(caption, text [, attributes]) 
  6846.  
  6847.  
  6848. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6849.  
  6850. Puts up a PM message box containing caption as the title and text as the 
  6851. contents.  attributes is any combination of the MB_ constants from PMWIN.H in 
  6852. the OS/2 Toolkit.  These are duplicated in STDCONST.E. 
  6853.  
  6854.  
  6855. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6856.  
  6857. r = WinMessageBox('Reality check',
  6858.                   'Are you sure you want to delete your thesis?',
  6859.                   MB_YESNOCANCEL + MB_WARNING + MB_DEFBUTTON3 + MB_MOVEABLE)
  6860. if r = MBID_YES then
  6861.    sayerror 'Maybe you should sleep on it...'
  6862. elseif r = MBID_NO then
  6863.    sayerror 'Good idea!'
  6864. else
  6865.    sayerror '(Forget the whole thing.)'
  6866. endif
  6867.  
  6868.  
  6869. ΓòÉΓòÉΓòÉ 4.1.182. WORD(string, n) ΓòÉΓòÉΓòÉ
  6870.  
  6871. Choose: 
  6872.  
  6873. o Syntax 
  6874. o Definition 
  6875. o Example 
  6876. o E Language Syntax 
  6877.  
  6878.  
  6879. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6880.  
  6881. WORD( string , n ) 
  6882.  
  6883.  
  6884. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6885.  
  6886. Returns the nth blank-delimited word in string. n must be positive. If there 
  6887. are less than n words in string, the null string is returned. Exactly 
  6888. equivalent to SUBWORD(string,n,1). 
  6889.  
  6890.  
  6891. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6892.  
  6893. Here are some examples: 
  6894.  
  6895.     WORD('Now is the time',3)    -->  'the'
  6896.     WORD('Now is the time',5)    -->  ''
  6897.  
  6898.  
  6899. ΓòÉΓòÉΓòÉ 4.1.183. WORDINDEX(string, n) ΓòÉΓòÉΓòÉ
  6900.  
  6901. Choose: 
  6902.  
  6903. o Syntax 
  6904. o Definition 
  6905. o Example 
  6906. o E Language Syntax 
  6907.  
  6908.  
  6909. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6910.  
  6911. WORDINDEX( string , n ) 
  6912.  
  6913.  
  6914. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6915.  
  6916. Returns the character position of the nth blank-delimited word in string. n 
  6917. must be positive. If there are less than n words in string, 0 is returned. 
  6918.  
  6919.  
  6920. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6921.  
  6922. Here are some examples: 
  6923.  
  6924.     WORDINDEX('Now is the time',3)   -->    8
  6925.     WORDINDEX('Now is the time',6)   -->    0
  6926.  
  6927.  
  6928. ΓòÉΓòÉΓòÉ 4.1.184. WORDLENGTH(string, n) ΓòÉΓòÉΓòÉ
  6929.  
  6930. Choose: 
  6931.  
  6932. o Syntax 
  6933. o Definition 
  6934. o Example 
  6935. o E Language Syntax 
  6936.  
  6937.  
  6938. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6939.  
  6940. WORDLENGTH( string , n ) 
  6941.  
  6942.  
  6943. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6944.  
  6945. Returns the length of the nth blank-delimited word in string. n must be 
  6946. positive. If there are less than n words in string, 0 is returned. 
  6947.  
  6948.  
  6949. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6950.  
  6951. Here are some examples: 
  6952.  
  6953.     WORDLENGTH('Now is the time',2)    -->   2
  6954.     WORDLENGTH('Now comes the time',2) -->   5
  6955.     WORDLENGTH('Now is the time',6)    -->   0
  6956.  
  6957.  
  6958. ΓòÉΓòÉΓòÉ 4.1.185. WORDPOS(needle, haystack [, start] ) ΓòÉΓòÉΓòÉ
  6959.  
  6960. Choose: 
  6961.  
  6962. o Syntax 
  6963. o Definition 
  6964. o Example 
  6965. o E Language Syntax 
  6966.  
  6967.  
  6968. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  6969.  
  6970. WORDPOS( needle , haystack   [,  start] ) 
  6971.  
  6972.  
  6973. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  6974.  
  6975. Searches haystack for the first occurrence of the sequence of blank-delimited 
  6976. words needle and returns the word number of the first word of needle in 
  6977. haystack. Multiple blanks between words in either needle or haystack are 
  6978. treated as a single blank for the comparison, but otherwise the words must 
  6979. match exactly. Returns 0 if needle is not found. 
  6980.  
  6981. By default the search starts at the first word in haystack. This may be 
  6982. overridden by specifying start (which must be positive), the word at which to 
  6983. start the search. 
  6984.  
  6985.  
  6986. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  6987.  
  6988. Here are some examples: 
  6989.  
  6990.  WORDPOS('the','now is the time')              ->  3
  6991.  WORDPOS('The','now is the time')              ->  0
  6992.  WORDPOS('is the','now is the time')           ->  2
  6993.  WORDPOS('is   the','now is the time')         ->  2
  6994.  WORDPOS('is   time ','now is   the time')     ->  0
  6995.  WORDPOS('be','To be or not to be')            ->  2
  6996.  WORDPOS('be','To be or not to be',3)          ->  6
  6997.  
  6998.  
  6999. ΓòÉΓòÉΓòÉ 4.1.186. WORDS(string) ΓòÉΓòÉΓòÉ
  7000.  
  7001. Choose: 
  7002.  
  7003. o Syntax 
  7004. o Definition 
  7005. o Example 
  7006. o E Language Syntax 
  7007.  
  7008.  
  7009. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  7010.  
  7011. WORDS( string ) 
  7012.  
  7013.  
  7014. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  7015.  
  7016. Returns the number of blank-delimited words in string. 
  7017.  
  7018.  
  7019. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  7020.  
  7021. Here are some examples: 
  7022.  
  7023.     WORDS('Now is the time')   -->  4
  7024.     WORDS(' ')                 -->  0
  7025.  
  7026.  
  7027. ΓòÉΓòÉΓòÉ 4.2. Conditional and Loop Statements ΓòÉΓòÉΓòÉ
  7028.  
  7029. The IF statement is used to change the flow of statements depending upon some 
  7030. condition. As you can see, the syntax varies from that of REXX: 
  7031.  
  7032. IF 
  7033.                  Conditional execution 
  7034.  
  7035.                                     IF expression THEN
  7036.                                        statements
  7037.                                     {ELSEIF expression THEN
  7038.                                        statements}
  7039.                                      [ELSE
  7040.                                        statements]
  7041.                                     ENDIF
  7042.  
  7043.                  Note:  Any nonzero, non-null value for expression is regarded 
  7044.                  as TRUE.  The value zero is FALSE, and (as of version 3.07) a 
  7045.                  null value is FALSE. The null-value treatment is important 
  7046.                  because that's the default value returned by a DEFPROC.  If a 
  7047.                  DEFPROC simply "runs off the end" and does not have an 
  7048.                  explicit RETURN statement, ET automatically assigns a null 
  7049.                  return value.  For example: 
  7050.  
  7051.                                      defproc tinyproc=
  7052.                                         x = 1
  7053.                                         /* no return statement */
  7054.  
  7055.                                      defc test=
  7056.                                         myswitch = tinyproc()
  7057.                                         if myswitch then
  7058.                                            sayerror 'null is true'
  7059.                                         else
  7060.                                            sayerror 'null is false'
  7061.                                         endif
  7062.  
  7063.                  Previous versions of E would have printed null is true because 
  7064.                  the value of myswitch was not precisely zero ('0'). It makes 
  7065.                  more sense for no-value to be false.  But it's still better 
  7066.                  practice to specify the return value explicitly in your procs. 
  7067.  
  7068.                  Several ways are provided to structure a repetitive loop: 
  7069.  
  7070. WHILE - DO 
  7071.                  Conditional loop 
  7072.  
  7073.                                   WHILE expression DO
  7074.                                     statements
  7075.                                   ENDWHILE
  7076.  
  7077. DO - WHILE 
  7078.                  Same effect as WHILE - DO 
  7079.  
  7080.                                   DO WHILE expression
  7081.                                     statements
  7082.                                   END or ENDDO
  7083.  
  7084. DO FOREVER 
  7085.                  Continuous loop (See LEAVE, below) 
  7086.  
  7087.                                   DO FOREVER        /* clearer meaning than  WHILE 1  */
  7088.                                     statements     /* Exit with a RETURN or LEAVE    */
  7089.                                   END or ENDDO
  7090.  
  7091. LOOP 
  7092.                  Same effect as DO FOREVER 
  7093.  
  7094.                                   LOOP              /* equivalent to the previous one */
  7095.                                      statements
  7096.                                   ENDLOOP
  7097.  
  7098. FOR 
  7099.                  Stepwise Iteration 
  7100.  
  7101.                                   FOR i=expression TO expression [BY expression]
  7102.                                     statements
  7103.                                   ENDFOR
  7104.  
  7105. DO (FOR) 
  7106.                  Same effect as FOR 
  7107.  
  7108.                                   DO i=expression TO expression [BY expression]
  7109.                                      statements
  7110.                                   END or ENDDO
  7111.  
  7112. LEAVE 
  7113.                  Exits LOOP, WHILE or DO. 
  7114.  
  7115.                  Execution resumes after ENDLOOP, ENDWHILE or END. 
  7116.  
  7117. ITERATE 
  7118.                  Iterates LOOP, WHILE or DO. 
  7119.  
  7120.                  Execution resumes at LOOP, WHILE or DO. 
  7121.  
  7122. Note:  It is possible to modify the loop index within the FOR loop. For 
  7123. example, the following is correct: 
  7124.  
  7125.    for i= 1 to 10
  7126.        if i=7 then
  7127.            i= i - 1  -- i = 6
  7128.        endif
  7129.    endfor
  7130.  
  7131.  
  7132. ΓòÉΓòÉΓòÉ 4.3. The Parse Statement ΓòÉΓòÉΓòÉ
  7133.  
  7134. Use the PARSE statement to extract information from a string. The syntax is: 
  7135.  
  7136.  
  7137.    PARSE  ARG template
  7138.    PARSE  VALUE expression WITH template
  7139.  
  7140. where expression is the input, i.e. the string to parse, and template is a list 
  7141. of symbols separated by blanks, which dictates how to parse the input. 
  7142.  
  7143. The syntax of template is
  7144.  
  7145. { '.' | string | +number | -number |number | variable | '(' variable ')' }
  7146. The only difference between the two forms of the parse statement is that the 
  7147. PARSE ARG statement is a special case of the PARSE - VALUE - WITH statement. 
  7148. The PARSE ARG statement automatically assumes ARG(1) to be its input. 
  7149. Therefore, the following two statements are logically equivalent: 
  7150.  
  7151. PARSE ARG A B C D
  7152. PARSE VALUE arg(1) WITH A B C D
  7153.  
  7154. The template in the above example is A B C D. A template in general specifies 
  7155. the names of variables that are to be given new values, together with optional 
  7156. triggers (either strings or special characters) to control the parsing. In the 
  7157. example, A, B, C and D are all variables to which new values will be assigned; 
  7158. there are no triggers. 
  7159.  
  7160. Normally each variable in the template is assigned one word from the input 
  7161. string.  The last variable, however, is assigned the remainder of the string 
  7162. (if any).  If there are fewer words in the string than variables in the 
  7163. template, all excess variables are set to null. A null, therefore, indicates 
  7164. the end of data. 
  7165.  
  7166. For example, if the string 'The Red Baron' is parsed with the template A B C D, 
  7167. then the first three variables would each be assigned one word from the string, 
  7168. in sequence, and the variable D would be set to ' '. 
  7169.  
  7170. If the template were changed to A B and the input string remained the same, 
  7171. then the variable A would be set to 'The' and the variable B would be set to 
  7172. 'Red Baron'. 
  7173.  
  7174. The parsing algorithm also allows some pattern matching, in which you may 
  7175. trigger on strings. If the template contains a string (such as a '/' or 'TO' ), 
  7176. then synchronization will occur at the next point where the trigger matches the 
  7177. data.  This is best explained with the aid of examples: 
  7178.  
  7179.  
  7180.      Input data:        EDIT AUTOEXEC.BAT /D
  7181.      Template:          X Fn '/'Opt
  7182.  
  7183.      Variables set:     X   = 'EDIT'
  7184.                         Fn  = 'AUTOEXEC.BAT'
  7185.                         Opt = 'D'
  7186.  
  7187. The value of a variable may be used as a trigger, by enclosing the name of the 
  7188. variable in parentheses.  It then acts in exactly the same way as a literal 
  7189. string trigger.  For example: 
  7190.  
  7191.   delim=','
  7192.   parse value 'abc, def' with  x (delim) y /* splits the string */
  7193.  
  7194. This feature allows you to parse when you don't know what the trigger string 
  7195. (delim in the example) is in advance.  Without the parentheses, the variable 
  7196. delim would receive the value 'def'. 
  7197.  
  7198. You may also use numbers as triggers to pick out positional substrings, or to 
  7199. extract a string of a certain length.  These may be absolute column numbers, or 
  7200. numbers relative to the last trigger (or column) specified. 
  7201.  
  7202.      Input string:      This is the time for all good men
  7203.      Template:          8 X +4  16 Y +5
  7204.  
  7205.      Variables set:     X = ' the'  /* four starting at column 8  */
  7206.                         Y = 'e for' /* five starting at column 16 */
  7207. In this case, a +n following the variable indicates that the string to be 
  7208. picked out should begin at the last column specified and should continue n 
  7209. characters to the right. The '-' unary operator cannot be used in this manner. 
  7210. However, both unary plus and minus can also be used in the template to advance 
  7211. the current column position. For example, 
  7212.  
  7213. Input string:        This is the time for all good men
  7214. Template:            10 't' X +4 +5 Y -4 Z
  7215.  
  7216. Variables set:       X = 'time'
  7217.                      Y = 'all good men'
  7218.                      Z = 'for all good men'
  7219. Notice that in this example, the current position is moved to the 10th column, 
  7220. and then to the next instance of 't' (which is the 't' in 'time'). X is 
  7221. assigned a string of length 4 beginning from this point. The current position 
  7222. is then moved 5 positions to the right. The Y variable is assigned a string 
  7223. beginning at this point and continuing to the end of the string. The cursor 
  7224. position is then moved back (to the left) 4 positions and the Z variable gets a 
  7225. string from that position to the end of the string. 
  7226.  
  7227. Further examples: 
  7228.  
  7229.  
  7230.      Input string:      MSG WINPA(FRED) Hello Fred
  7231.      Template:          X node'('userid')' msg
  7232.  
  7233.      Variables set:     X      = 'MSG'
  7234.                         NODE   = 'WINPA'
  7235.                         USERID = 'FRED'
  7236.                         MSG    = ' Hello Fred'
  7237.  
  7238.  
  7239.      Input string:      /foo/bar zot/
  7240.      Template:          delim 2 word1 (delim) word2 (delim)
  7241.      Variables set:     delim  = '/'
  7242.                         word1  = 'foo'
  7243.                         word2  = 'bar zot'
  7244.  
  7245. Note that each substring (between triggers) is parsed in the same manner as a 
  7246. complete string would be if there were no triggers present. 
  7247.  
  7248. You can also use a period (.) as a place holder to skip over a word that would 
  7249. otherwise be placed in a variable.  For example: 
  7250.  
  7251.  
  7252.      Input string:      'The Red Baron'
  7253.      Template:          word1 . word2
  7254.      Variables set:     word1  = 'The'
  7255.                         word2  = 'Baron'
  7256.  
  7257.  
  7258. ΓòÉΓòÉΓòÉ 4.4. Compiler Directive Statements ΓòÉΓòÉΓòÉ
  7259.  
  7260. The following statements are different from other E statements because they 
  7261. serve no function when the program is being run, rather they provide 
  7262. instructions to the ET compiler. 
  7263.  
  7264.  
  7265. ΓòÉΓòÉΓòÉ 4.5. compiler directives ΓòÉΓòÉΓòÉ
  7266.  
  7267. The compiler directive statements are: 
  7268.  
  7269. Includes
  7270.                                                               INCLUDE 'filespec'
  7271.  
  7272.                                                               TRYINCLUDE 'filespec'
  7273.  
  7274. Conditional compilation
  7275.                                                               COMPILE IF constant_expression
  7276.                                                                   statements
  7277.                                                               { COMPILE ELSEIF constant_expression
  7278.                                                                   statements }
  7279.                                                               [ COMPILE ELSE
  7280.                                                                   statements ]
  7281.                                                               COMPILE ENDIF
  7282.  
  7283.  
  7284. ΓòÉΓòÉΓòÉ 4.5.1. Include Statements ΓòÉΓòÉΓòÉ
  7285.  
  7286. The usage and usefulness of INCLUDE statements is shown in The EPM User's 
  7287. Guide. In this section, we will discuss how these statements work. Let's say 
  7288. that there is an INCLUDE statement (INCLUDE 'filespec') in a file test.e. The 
  7289. statement directs the compiler (ET) to replace the INCLUDE statement with the E 
  7290. code found in the file named in filespec. The contents of file filespec are 
  7291. inserted into file test.e. If file filespec does not exist, compilation is 
  7292. aborted. 
  7293.  
  7294. The TRYINCLUDE statement has the same syntax as an INCLUDE file, i.e. filespec 
  7295. must be enclosed with quotes. It also behaves the same way as an INCLUDE 
  7296. statement: the specified file is included into the file where the INCLUDE 
  7297. statement appears. However, when a TRYINCLUDE statement is used, the compiler 
  7298. tries to include the file. If it is unsuccessful, compilation does not halt. 
  7299. For example, consider the following excerpt from a file: 
  7300.  
  7301. tryinclude 'test1.e'
  7302. tryinclude 'test2.e'
  7303. include 'test3.e'
  7304. If the file test1.e does not exist, the compiler will simply go on to the next 
  7305. statement without notifying the user. Next it will try to include file test2.e. 
  7306. However, if file test3.e does not exist, the compiler will issue an error 
  7307. message and stop compilation. 
  7308.  
  7309.  
  7310. ΓòÉΓòÉΓòÉ 4.5.2. Conditional Compilation ΓòÉΓòÉΓòÉ
  7311.  
  7312. In the past few releases of E we've tried to simplify configuration and 
  7313. updates.  We've rearranged the standard E files to bring together all the usual 
  7314. configuration options (in STDCNF.E and COLORS.E) and all the INCLUDEs (into 
  7315. E.E).  Ideally the user should be able to customize E with simple one-line 
  7316. changes. 
  7317.  
  7318. The available configuration techniques have been: 
  7319.  
  7320. o setting a universal variable, for example matchtab_on=0. This is fine for 
  7321.   simple options but can be expensive for large features.  The macros must 
  7322.   contain the code for all possible values of the variable since the value can 
  7323.   change at run-time.  Even though you might never use the matchtab feature, 
  7324.   memory space is used for the possibility. 
  7325.  
  7326. o setting a constant, like TEMP_PATH='C:\'. Constants have been good only for 
  7327.   minor configuration options which don't change after installation, such as 
  7328.   drive letters and directories.  They're also useful for mnemonic names like 
  7329.   GREEN=2 to make macros more readable. 
  7330.  
  7331. o using INCLUDE and TRYINCLUDE statements, such as tryinclude 'math.e', to ease 
  7332.   the installation of large optional features if the features are cleanly 
  7333.   separable into independent files. After the compilation is done, the INCLUDE 
  7334.   statements have no effect and occupy no memory. 
  7335.  
  7336. Another tool, conditional compilation includes features which aren't cleanly 
  7337. separable into files. Programmers experienced with the C language will be 
  7338. familiar with this concept (as #if).  Other users might be uncomfortable with 
  7339. the distinction between compile-time and run-time processing. 
  7340.  
  7341. Let's take a small feature as an illustration - imagine that whenever you press 
  7342. F4 (File) you don't want the file saved if it hasn't been modified. If you were 
  7343. a power user who wanted this feature, you had to modify STDCMDS.E as follows: 
  7344.  
  7345. defc f,file=
  7346.    if .modify=0 then   /* my mod:  don't file if not modified */
  7347.       'quit'
  7348.    endif
  7349.    /* rest of code as before */
  7350.  
  7351. The trouble with modifying the standard commands like this is that you had to 
  7352. repeat the modification on every new release of E. To ease your updates you 
  7353. might have tried to convince us developers to include the feature in the 
  7354. standard distribution version.  But we've been reluctant to do this because 
  7355. every user would be forced to use the same feature, or at least to sacrifice 
  7356. memory space to it (if we turn it on/off with a variable assignment). 
  7357.  
  7358. But now it's possible to write: 
  7359.  
  7360. const FILE_ONLY_IF_MODIFIED = 1
  7361.  
  7362. defc f,file=
  7363. compile if FILE_ONLY_IF_MODIFIED
  7364.    if .modify=0 then
  7365.       'quit'
  7366.    endif
  7367. compile endif
  7368.    /* rest of code as before */
  7369.  
  7370. When the compiler sees the compile if it will check the value of the constant 
  7371. FILE_ONLY_IF_MODIFIED, and, seeing that it's true, will compile the new code 
  7372. just as it did when you hand-modified it. But now the feature is easier to 
  7373. distribute to all users.  A user who doesn't like it can set 
  7374. FILE_ONLY_IF_MODIFIED = 0, which will cause ET to ignore the code enclosed 
  7375. between compile if and compile endif.  This happens at compile time, in much 
  7376. the same manner as a TRYINCLUDE, so the other user is not penalized memory 
  7377. space for the choice. 
  7378.  
  7379. We encourage developers of add-on packages to use this feature.  In time we 
  7380. hope to make the most popular add-ons installable without the user having to 
  7381. touch the macro source code. 
  7382.  
  7383. The new keywords all start with the word compile: 
  7384.  
  7385. o COMPILE IF  const_expression 
  7386.  
  7387. o COMPILE ELSE 
  7388.  
  7389. o COMPILE ELSEIF const_expression 
  7390.  
  7391. o COMPILE ENDIF 
  7392. const_expression must be a simple expression combining only constants known at 
  7393. compile time. Understand that ET cannot know the values that will be assigned 
  7394. to variables at run-time (like matchtab_on). If we assume that all uppercase 
  7395. identifiers represent pre-defined constants, the following are valid 
  7396. const_expressions: 
  7397.  
  7398.    COMPILE IF 0            /* Means 'never compile'. */
  7399.  
  7400.    COMPILE IF FOO + BAR >= 2
  7401.  
  7402.    COMPILE IF EVERSION = '3.07'
  7403.  
  7404.    COMPILE IF STATUSCOLOR = NORMAL
  7405.  
  7406.    COMPILE IF not (OS2 or DOS)
  7407.  
  7408. Note:  simple arithmetic and logical expressions are possible, but not string 
  7409. functions such as substr(). 
  7410.  
  7411. Any strings in the constant expression associated with a COMPILE IF statement 
  7412. are converted to upper case. This means that many of the values for 
  7413. configuration options in the STDCNF.E file may now be entered in any 
  7414. combination of lower and upper case letters. For example, the following 
  7415. statement is now valid: 
  7416.  
  7417. HOST_SUPPORT = 'pdq'
  7418. even though STDCNF.E contains the following statement: 
  7419.  
  7420. COMPILE IF HOST_SUPPORT = 'PDQ'
  7421.     HAVE_DOS = 0
  7422. COMPILE ENDIF
  7423. Since the string constant `pdq' will be converted to `PDQ' at compile-time, the 
  7424. compile-if condition will be found to be true. 
  7425.  
  7426. There must be one COMPILE ENDIF to each COMPILE IF, zero or one COMPILE ELSE's, 
  7427. and zero or more COMPILE ELSEIF's.  The ELSE must come after all ELSEIF's, as 
  7428. in normal E if-else-endif structures. 
  7429.  
  7430. These conditional blocks can be nested (in the same manner as if-else-endif 
  7431. structures) up to a maximum depth of 20 levels. 
  7432.  
  7433. Here's an example of how we might include different methods of host-file 
  7434. support: 
  7435.  
  7436. compile if HOST_SUPPORT = 'STD'
  7437.    include 'saveload.e' -- with host support
  7438. compile elseif HOST_SUPPORT = 'EMUL'
  7439.    include 'e3emul.e'   -- Brian Tucker's add-on package
  7440. compile else
  7441.    include 'slnohost.e' -- without host support
  7442. compile endif
  7443.  
  7444. The COMPILE keyword can be inserted anywhere a newline is allowed, including 
  7445. cases where a newline serves as a line continuation in the middle of a 
  7446. statement. 
  7447.  
  7448.    delay = 2000 /
  7449.    compile if OS2
  7450.    10             /* delay = 200  here */
  7451.    compile else
  7452.    1              /* delay = 2000 here */
  7453.    compile endif
  7454.  
  7455. See the section Line Continuations for other examples. 
  7456.  
  7457.  
  7458. ΓòÉΓòÉΓòÉ 4.5.3. Compiler Directives as Definition Primitives ΓòÉΓòÉΓòÉ
  7459.  
  7460. The compiler directives discussed in this section are valid E statements, i.e. 
  7461. they can be contained within a DEFPROC, DEFC, or other definition. However, 
  7462. compiler directives can also be considered definition primitives depending upon 
  7463. what they contain. Consider the following example: file junk.e contains: 
  7464.  
  7465.     sayerror "print junk"
  7466.     x = x + 5
  7467. file main_junk.e contains: 
  7468.  
  7469.     DEFPROC junk()
  7470.         universal x
  7471.  
  7472.         x = 8
  7473.         include 'junk.e'
  7474.         temp = 250
  7475. After execution of the procedure junk(), the value of x is 13. In this case, 
  7476. the included file (junk.e) contains only statements, and therefore the INCLUDE 
  7477. statement acts as a statement. However, consider the next example: file junk.e 
  7478. contains: 
  7479.  
  7480.     DEFPROC junk()
  7481.         sayerror "printing junk"
  7482. file main_junk.e contains: 
  7483.  
  7484.     SET insert_state 0
  7485.  
  7486.     DEFC com1 =
  7487.         call junk()
  7488.  
  7489.     CONST
  7490.         a = 25
  7491.  
  7492.     include 'junk.e'
  7493.  
  7494. If the included file (junk.e) contained only statements, as in the last 
  7495. example, the ET compiler would issue the following error: "Expecting DEFinition 
  7496. primitive". Because the INCLUDE statement is no longer contained within a 
  7497. definition primitive, the included file must contain a definition primitive, as 
  7498. it does in this example. In this case, the INCLUDE statement is not really 
  7499. acting as a statement; it is acting as a definition primitive. 
  7500.  
  7501. The same can be said of the conditional compile statement: it can occur within 
  7502. a definition primitive and enclose only statements or it can occur outside a 
  7503. primitive and enclose one or more definition primitives. The following examples 
  7504. show various correct usages: 
  7505.  
  7506.  
  7507. CONST
  7508.     flag1 = 1
  7509.  
  7510. DEFPROC fred()
  7511.     universal perm
  7512.  
  7513.     perm = 8
  7514.     compile if flag1 = 1
  7515.         perm = perm + 5
  7516.     compile endif
  7517.     sayerror "perm is " perm
  7518.  
  7519. /************** Second example ****************/
  7520.  
  7521. CONST
  7522.     USERS_CHOICE = 0
  7523.  
  7524. compile if USERS_CHOICE
  7525.     DEFC optional_command =
  7526.         sayerror "just printing junk for testing"
  7527. compile endif
  7528.  
  7529. DEFPROC test()
  7530.     sayerror "stuff"
  7531.  
  7532. In the first example, if flag1 is set to 1, then the value of perm becomes 13. 
  7533. If flag1 is set to 0, then the value of perm is 8. In either case, the value is 
  7534. printed out with the sayerror statement. In the second example, if USERS_CHOICE 
  7535. is set to 1, the optional_command is included in the code; otherwise it is not, 
  7536. and at run-time (when you are running the editor), the command optional_command 
  7537. does not exist, and will not be recognized. 
  7538.  
  7539.  
  7540. ΓòÉΓòÉΓòÉ 4.6. Using EPM Commands in E Statements ΓòÉΓòÉΓòÉ
  7541.  
  7542. The E commands that were discussed in The EPM User's Guide can be used not only 
  7543. on the command dialog box, but also in E programs. When the name of a command 
  7544. and its options and parameters are enclosed in quotes (single or double), the 
  7545. command can be used in place of a statement. The syntax of these commands is 
  7546. the same as that which was presented in the User's Guide. An example of this 
  7547. usage follows: 
  7548.  
  7549. defproc zap_file()
  7550.     k = entrybox("Confirm",'/Yes/No/','Really quit?',18,0)
  7551.     if k then
  7552.        sayerror("Data has been cruelly obliterated ...")
  7553.        'quit'           /*  <-- Note the quit command in quotes */
  7554.     else
  7555.        sayerror("File has been mercifully spared ...")
  7556.     endif
  7557.  
  7558. When the zap_file() procedure is activated, it will prompt the user. If the 
  7559. user picks 'Yes', it will quit the file; if he picks 'No' the user can continue 
  7560. editing. 
  7561.  
  7562. Another common usage is when redefining key strokes. For example: 
  7563.  
  7564.   def c_2
  7565.     'togglecontrol 9 '
  7566.     'togglecontrol 10'
  7567.  
  7568. This will define the key ctrl-2 to toggle the scroll bars on or off. Other 
  7569. examples can be seen in section Sample E Procs. 
  7570.  
  7571. Any command can be used as a statement. The command need not be a built-in 
  7572. command; it can be a command defined by a user using a DEFC. For example: 
  7573.  
  7574. defc temp
  7575.     call temp()
  7576.  
  7577. defproc temp()
  7578.     'testA stuff'
  7579.  
  7580. defc testA
  7581.     sayerror "argument is " arg(1)
  7582. Issuing the command temp will print argument is stuff. 
  7583.  
  7584.  
  7585. ΓòÉΓòÉΓòÉ 4.6.1. Commands Omitted From the User's Guide ΓòÉΓòÉΓòÉ
  7586.  
  7587. Most of the standard commands (defc constructions) are listed in The EPM User's 
  7588. Guide. However, a few were omitted because they produce no useful results by 
  7589. themselves, but are only really useful in a programming context or because they 
  7590. may not be understood by a novice. These advanced commands are: 
  7591.  
  7592. Command                       Description 
  7593.  
  7594. ACTIVATEFILEID fileid 
  7595.                               activates the file specified by the file handle 
  7596.                               fileid. 
  7597.  
  7598. AMU_ADDENDA_ADDITION word 
  7599.                               adds the word specified by word to the addenda 
  7600.                               file specified the variable ADDENDA_FILENAME. 
  7601.  
  7602. AMU_ADDENDA_PICKUP 
  7603.                               adds the addenda dictionary specified by the 
  7604.                               variable ADDENDA_FILENAME to the standard 
  7605.                               dictionary. 
  7606.  
  7607. CLEARSHARBUFF 
  7608.                               clears the shared PM buffer. 
  7609.  
  7610. COMMANDLINE [ text ] 
  7611.                               brings up the command line dialog box. This is 
  7612.                               the equivalent of the standard ESC key 
  7613.                               definition. This command optionally takes an 
  7614.                               argument of text or a string variable. If the 
  7615.                               argument is included, it will be placed on the 
  7616.                               command line. 
  7617.  
  7618. COPY2DMBUFF 
  7619.                               copies the marked area to the "Delete Mark" 
  7620.                               buffer. 
  7621.  
  7622. COPY2SHARBUFF 
  7623.                               copies a marked area to the shared buffer. 
  7624.  
  7625. CURSOROFF 
  7626.                               turns the cursor off. This command is equivalent 
  7627.                               to a: 
  7628.  
  7629.                                                               `TOGGLECONTROL 14 0'
  7630.  
  7631.                               To turn the cursor back on again, issue a 
  7632.                               TOGGLECONTROL command with a 1 instead of a zero 
  7633.                               as the second argument. 
  7634.  
  7635. DUPMARK typemark 
  7636.                               takes an argument (typemark) of: 
  7637.  
  7638.    M = move marked text 
  7639.    C = copy marked text 
  7640.    O = overlay marked text 
  7641.    U = unmark marked text 
  7642.    D = delete marked text 
  7643.  
  7644. and executes that action on the marked text. 
  7645.  
  7646. EPM will look first in the local buffer and then in the shared buffer for 
  7647. marked text. 
  7648.  
  7649. GETDMBUFF 
  7650.                               gets text from the Delete Mark buffer. 
  7651.  
  7652. GETSHARBUFF 
  7653.                               gets text from EPM shared buffer. 
  7654.  
  7655. LOADDEFAULTMENU 
  7656.                               loads the default menu setup. 
  7657.  
  7658. MH_BEGIN_MARK 
  7659.                               mouse handler's begin mark. This is executed when 
  7660.                               the standard mouse setup begins a drag. See 
  7661.                               MOUSE.E and Configuring the Mouse. for more 
  7662.                               information. 
  7663.  
  7664. MH_CANCEL_MARK 
  7665.                               mouse handler's cancel mark. This is executed 
  7666.                               when the standard mouse setup double clicks on 
  7667.                               button one. See MOUSE.E and Configuring the Mouse 
  7668.                               for more information. 
  7669.  
  7670. MH_END_MARK 
  7671.                               mouse handler's end mark. This is executed when 
  7672.                               the standard mouse setup ends a drag. See MOUSE.E 
  7673.                               and Configuring the Mouse for more information. 
  7674.  
  7675. MH_GOTOPOSITION 
  7676.                               moves the cursor to the current mouse pointer 
  7677.                               location. This is like the standard mouse of a 
  7678.                               single button one click. See MOUSE.E and 
  7679.                               Configuring the Mouse for more information. 
  7680.  
  7681.  
  7682. ΓòÉΓòÉΓòÉ 4.7. Predefined Constants and Variables ΓòÉΓòÉΓòÉ
  7683.  
  7684. There are several predefined UNIVERSAL variables which may be accessed in any 
  7685. definition without an explicit UNIVERSAL declaration: 
  7686.  
  7687. o RC, 
  7688.  
  7689. o join_after_wrap, 
  7690.  
  7691. o center_search, 
  7692.  
  7693. o exit_after_last_file, and 
  7694.  
  7695. o two_spaces. 
  7696.  
  7697. RC holds the error code from the last-executed command. All commands, for 
  7698. example 'edit', 'quit', and 'file', set the value of RC.  If no error occurs, 
  7699. RC will be reset to zero by a command. Upon entering a DEFC, the value of RC 
  7700. depends upon the source of the command invocation. If another definition 
  7701. (internal to the E program) activates the command, RC is set to zero. If a user 
  7702. issues the command from the command dialog box, RC is set to the position of 
  7703. the cursor in the command dialog box. However, statements and procedures, such 
  7704. as 'nextfile', 'copymark', or 'top', do NOT normally set RC.  If no error 
  7705. occurs, whatever value RC had before the statement is still there.  This 
  7706. approach was followed for considerations of speed, space, and to allow an 
  7707. earlier command's RC to "filter down" to the end of the proc.  Commands are the 
  7708. ones most likely to encounter meaningful errors. 
  7709.  
  7710. Thus if you want a sure error-check on a statement, zero RC first: 
  7711.  
  7712.    rc = 0
  7713.    copymark
  7714.    if rc then /* complain */ endif
  7715.  
  7716. One special case:  REPEATFIND is a statement but it sets RC to zero if the find 
  7717. is successful. 
  7718.  
  7719. An assignment to one of the function key text variables changes the value of 
  7720. the function key text displayed at the bottom of the screen. 
  7721.  
  7722. There is also one predefined constant called ARGSEP. Since the argument option 
  7723. separator can change from machine to machine, this constant is used to keep the 
  7724. E procs portable.  On a PC, ARGSEP is the slash '/'.  On a RT, it's the hyphen 
  7725. '-'. 
  7726.  
  7727. JOIN_AFTER_WRAP, CENTER_SEARCH and other configurable constants are discussed 
  7728. in The EPM User's Guide. 
  7729.  
  7730.  
  7731. ΓòÉΓòÉΓòÉ 4.8. User Exits ΓòÉΓòÉΓòÉ
  7732.  
  7733. If the configuration constant SUPPORT_USER_EXITS is set when the macros are 
  7734. compiled, "hooks" for user exits will be included. If any particular user exit 
  7735. is not present, no attempt to call it will be made, and no error message will 
  7736. be given. 
  7737.  
  7738. The user exits are: 
  7739.  
  7740. defmain_exit This defproc will be called from the DEFMAIN in MAIN.E, just 
  7741.           before the command-line arguments are executed.  The argument given 
  7742.           will be the one passed to EPM (preceded by 'e '); if declared as a 
  7743.           VAR parameter, the exit can modify the value. 
  7744.  
  7745. postsave_exit This defproc will be called from the SAVE command, just after the 
  7746.           file is saved.  Arg(1) will be the .filename of the file, arg(2) will 
  7747.           be the options to the SAVE command, and arg(3) will be 0 to indicate 
  7748.           a normal save, or 1 to indicate that the name was changed (because 
  7749.           the user attempted to save a .Untitled file). 
  7750.  
  7751. presave_exit This defproc will be called from the SAVE command, just before the 
  7752.           file is saved.  The first three arguments will be the same as for 
  7753.           postsave_exit, and arg(4) will be the return code from the SAVE. 
  7754.  
  7755. quit_exit This defproc will be called from the QUIT command, just before the 
  7756.           file is quit.  Arg(1) will be the .filename of the file. 
  7757.  
  7758. rename_exit This defproc will be called from the NAME command and the 
  7759.           SAVEAS_DLG command.  Arg(1) will be the old name, arg(2) will be the 
  7760.           new name, and arg(3) (if present) will be 1 to indicate that the name 
  7761.           was changed by the SAVEAS_DLG command. 
  7762.  
  7763. Note:  The SAVEAS_DLG command (executed when Save as is selected from the File 
  7764.        menu) changes the name directly; it doesn't call the NAME command.  It 
  7765.        does call the rename_exit directly.  The SAVE command can also present 
  7766.        the Save as dialog if the user attempts to save the .Untitled file; in 
  7767.        this case, the NAME command is called to process the name change.
  7768.  
  7769.  
  7770. ΓòÉΓòÉΓòÉ 5. Sample E Procs ΓòÉΓòÉΓòÉ
  7771.  
  7772. Using the E language, the user can configure the editor and define complex 
  7773. macros for increased editing power. The E language is translated by the 'etpm' 
  7774. compiler to increase the speed of execution. The syntax of the ETPM compiler 
  7775. is: 
  7776.  
  7777.   ETPM filespec[.E] [destfile[.EX]]
  7778.  
  7779. The default extension of the source code is .E. If no destination file is 
  7780. specified, ETPM will use the same source file name and just attach an .EX 
  7781. extention. Typically, only the filespec is given. These source modules are 
  7782. referred to as E Procs. Two examples of an E Procs are shown below. 
  7783.  
  7784.  
  7785. ΓòÉΓòÉΓòÉ 5.1. Example One ΓòÉΓòÉΓòÉ
  7786.  
  7787. The first E Proc is a simple procedure to define a command to display the 
  7788. different mouse pointers available. Edit a file (say TESTFILE.E). Then type in 
  7789. the following code: 
  7790.  
  7791.  
  7792.   defc firsttime                     -- Define a initialization procedure
  7793.     universal pointertype            -- Make available to both procedures
  7794.     pointertype = 1                  /* Initialize pointertype (same as
  7795.                                         pointertype = '1') */
  7796.     mouse_setpointer pointertype     -- Set the mouse pointer type
  7797.     sayerror "Completed first time." -- Message so you know it worked
  7798.  
  7799.   defc more                          -- Define a subsequent procedure
  7800.     universal pointertype            -- Make E know pointertype is global
  7801.     pointertype = pointertype + 1    -- Increment pointer type
  7802.     mouse_setpointer pointertype     -- Set the mouse pointer type
  7803.     sayerror "Completed subsequent time. Cusor number: "||pointertype
  7804.                                      -- Message so you know it worked
  7805.  
  7806. Then enter RELINK from the commandline dialog box. This will save, compile, and 
  7807. link this code (provided, of course, that there were no typos and the code 
  7808. compiled successfully). The commands FIRSTTIME and MORE are now defined. From 
  7809. the command line dialog box, type FIRSTTIME. Mouse pointer 1 is an arrow so you 
  7810. won't notice a change in the pointer but will see the message Completed first 
  7811. time. Now enter the MORE command. This should change the mouse pointer type. 
  7812. You can continue changing the mouse pointer (upto 15 times) by entering the 
  7813. MORE command. Entering FIRSTTIME again will start you at mouse pointer one 
  7814. again. 
  7815.  
  7816. Note how the variable pointertype is declared universal so it can carry a value 
  7817. between procedures. Since strings and numbers are interchangeable, we could 
  7818. have initialized pointertype with a string instead of a numeric constant. 
  7819.  
  7820.  
  7821. ΓòÉΓòÉΓòÉ 5.2. Example Two ΓòÉΓòÉΓòÉ
  7822.  
  7823. The second E Proc shows how key set definitions can be programmed. This E Proc 
  7824. will configure a few keys of the editor to mimic the EMACS editor. 
  7825.  
  7826. /**********************************************************************/
  7827. /* This E Proc will configure a few keys in the E editor to perform   */
  7828. /* the same operations as the EMACS editor.                           */
  7829. /**********************************************************************/
  7830. defkeys mykeys
  7831. def F3 = 'quit'    /* define a key for fast exit. */
  7832. def C_A = beginline
  7833. def C_B = left
  7834. def C_D = deletechar
  7835. def C_E = endline
  7836. def C_F = right
  7837. def C_N = down
  7838. def C_P = up
  7839. def C_X =
  7840.   choice = listbox("/Quit/Save/")
  7841.   if (choice='Quit') then
  7842.     'quit'
  7843.   endif
  7844.   if (choice='Save') then
  7845.     'save'
  7846.   endif
  7847.  
  7848. If we have a file called EMACS.E which contains the above E Procs, this file 
  7849. would then be translated by the E translator with the following command from 
  7850. the command dialog: 
  7851.  
  7852.   etpm emacs
  7853.  
  7854. To load this file (assuming it compiled correctly) we could type from the 
  7855. command line dialog box: 
  7856.  
  7857.   link emacs
  7858.  
  7859. This will load EMACS into the currently running version of EPM. 
  7860.  
  7861. To have this file automatically included we could add the line: 
  7862.  
  7863.   include "emacs.e"
  7864.  
  7865. in the file MYKEYS.E. When we recompile EPM (see The EPM User's Guide for 
  7866. information on recompiling your editor from the OS/2 prompt) the EMACS key 
  7867. definition will always be available by issuing the following from the command 
  7868. dialog: 
  7869.  
  7870.   keys mykeys
  7871.  
  7872.  
  7873. ΓòÉΓòÉΓòÉ 6. Advanced Configuration ΓòÉΓòÉΓòÉ
  7874.  
  7875. The fact that you are reading this means that you probably want to configure 
  7876. EPM beyond that which can be done merely by setting constants.  In this section 
  7877. are listed a few advanced configuration options that involve some programming. 
  7878.  
  7879.  
  7880. ΓòÉΓòÉΓòÉ 6.1. Building Accelerator Tables from the Macro Language ΓòÉΓòÉΓòÉ
  7881.  
  7882. A Named Accelerator Table is the way true PM accelerators are created from the 
  7883. E macro language.  This is achieved using the BuildAccelTable, and the 
  7884. ActivateAccelTable statements. 
  7885.  
  7886. First, the BuildAccelTable statement is used to create, and add keys to, a 
  7887. named accelerator table.  (The first time BuildAccelTable is called the table 
  7888. is automatically created.)  During this process a data base is created linking 
  7889. accelerator keys to command ids,  and command ids to user strings.  When a 
  7890. named accelerator table is activated, it becomes a true PM accelerator table. 
  7891. This is done via the ActivateAccelTable statement. Now, when a pre-registered 
  7892. key is pressed, the corresponding command id is issued as part of the message 
  7893. parameter of a PM - WM_COMMAND message.  In the E macro world, the defc 
  7894. PROCESSMENU is executed whenever a WM_COMMAND message is received.  ARG(1) of 
  7895. PROCESSMENU contains the command-id corresponding to the event that just took 
  7896. place. If an accelerator key was the cause of the PROCESSMENU command, ARG(1) 
  7897. will be the command-id registered during the corresponding BuildAccelTable 
  7898. statement. 
  7899.  
  7900. During the PROCESSMENU command, it is sometimes useful to take the command-id 
  7901. (passed as arg(1)) and look up the corresponding user string.  This is done 
  7902. using the QueryAccelString function. 
  7903.  
  7904. Accelerator tables created with the BuildAccelTable statement can be deleted 
  7905. with the DeleteAccel statement.  BY DEFAULT, named accelerator tables are 
  7906. deleted when the corresponding edit window is closed. 
  7907.  
  7908.  
  7909. ΓòÉΓòÉΓòÉ 6.1.1. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  7910.  
  7911. The buildacceltable statement adds a key to a named accelerator table. If it is 
  7912. the first key added, the named table is automatically created. Once a table is 
  7913. built, the ActivateAccelTable statement can be issued to make the named 
  7914. accelerator table into an true, active PM Accelerator table. The syntax for the 
  7915. buildacceltable statement is: 
  7916.  
  7917. buildacceltable  table-name, user-string, key-style, key, command-id
  7918.  
  7919. table-name  a text string containing the name of your particular accelerator 
  7920.             table.  (MAX. = 80 characters) 
  7921. user-string an information string that can be retrieved using the 
  7922.             QueryAccelString function. 
  7923. key-style   describes the style of the accelerator key.  The value must be the 
  7924.             sum of the PM-defined AF_ constants defined in STDCONST.E (copied 
  7925.             from PMWIN.H in the OS/2 Toolkit). 
  7926. key         a key constant, (e.g. VK_F1) 
  7927. command-id  a unique number within this particular accelerator table (and 
  7928.             active menu) to define the key in question. (1-MAXINT) 
  7929.  
  7930.  
  7931. ΓòÉΓòÉΓòÉ 6.1.2. ACTIVATEACCELTABLE ΓòÉΓòÉΓòÉ
  7932.  
  7933. The activateacceltable statement activates a named Accelerator table created 
  7934. with BuildAccelTable. When a named accelerator table is activated, it becomes a 
  7935. true PM accelerator table. The syntax for the activateacceltable statement is: 
  7936.  
  7937. activateacceltable table-name
  7938.  
  7939. table-name  where 'table-name' is a text string containing the name of your 
  7940.             particular accelerator table.  (MAX. = 80 characters) 
  7941.  
  7942.  
  7943. ΓòÉΓòÉΓòÉ 6.1.3. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  7944.  
  7945. The queryaccelstring statement allows the retrival of the user-string which was 
  7946. registered with the BuildAccelTable statement. The syntax for the 
  7947. queryaccelstring statement is: 
  7948.  
  7949. queryaccelstring table-name, command-id
  7950.  
  7951. table-name  where 'table-name' is a text string containing the name of your 
  7952.             particular accelerator table.  (MAX. = 80 characters) 
  7953. command-id  where 'command-id' is a unique number within this particular 
  7954.             accelerator table to define the key in question. (1-MAXINT) 
  7955.  
  7956.  
  7957. ΓòÉΓòÉΓòÉ 6.1.4. DELETEACCEL ΓòÉΓòÉΓòÉ
  7958.  
  7959. The deleteaccel statement deletes a named Accelerator table created with 
  7960. BuildAccelTable.  BY DEFAULT, named accelerator tables are deleted when the 
  7961. corresponding edit window is closed. The syntax for the deleteaccel statement 
  7962. is: 
  7963.  
  7964. deleteaccel table-name
  7965.  
  7966. table-name  where 'table-name' is a text string containing the name of your 
  7967.             particular accelerator table.  (MAX. = 80 characters) 
  7968.  
  7969.  
  7970. ΓòÉΓòÉΓòÉ 6.1.5. An example that uses the Named Accelerator statements ΓòÉΓòÉΓòÉ
  7971.  
  7972. -- constants needed for Accelerator example.
  7973. -- key constants
  7974. const  VK_F2 = 33             -- Taken from PMWIN.H
  7975.        VK_F3 = 34
  7976.        VK_F4 = 35
  7977.        VK_F5 = 36
  7978.       -- key style constants
  7979.        AF_CHAR        =   1   -- Taken from PMWIN.H
  7980.        AF_VIRTUALKEY  =   2
  7981.        AF_SCANCODE    =   4
  7982.        AF_SHIFT       =   8
  7983.        AF_CONTROL     =   16
  7984.        AF_ALT         =   32
  7985.        AF_LONEKEY     =   64
  7986.        AF_SYSCOMMAND  =   256
  7987.        AF_HELP        =   512
  7988.  
  7989. -- Creates Two named accel tables, and activates the "default" table
  7990. defc loadaccel
  7991.    universal activeaccel
  7992.  
  7993.    activeaccel='default'
  7994.    otheraccel  ='other'
  7995.  
  7996.    -- Register F2 and F3 as accelerator keys
  7997.    buildacceltable activeaccel, 'john',  AF_VIRTUALKEY, VK_F2, 1000
  7998.    buildacceltable activeaccel, 'thomas',AF_VIRTUALKEY, VK_F3, 1001
  7999.  
  8000.    -- Register F4 and F5 as accelerator keys
  8001.    buildacceltable otheraccel, 'jason', AF_VIRTUALKEY, VK_F4, 1002
  8002.    buildacceltable otheraccel, 'larry', AF_VIRTUALKEY, VK_F5, 1003
  8003.  
  8004.    -- Make the "default" named accel table active.  Now F2 and F3
  8005.    -- are real accel keys,  when they are selected they will cause
  8006.    -- "processmenu" to be executed with id's of 1000 or 1001
  8007.    activateacceltable  activeaccel
  8008.  
  8009. -- In the E macro world, the defc PROCESSMENU is executed whenever
  8010. -- a WM_COMMAND message is received.   ARG(1) of PROCESSMENU contains
  8011. -- the command-id corresponding to the event that just took place.
  8012. -- If an accelerator key was the cause of the PROCESSMENU command,
  8013. -- ARG(1) will be the command-id registered during the corresponding
  8014. -- BuildAccelTable statement.
  8015. -- If a pull-down menu was selected then ARG(1) will be the command-id
  8016. -- registered during the corresponding BUILDMENUITEM statement.
  8017. defc processmenu
  8018.    universal activemenu, activeaccel
  8019.  
  8020.    -- arg(1) contains the command id specified as registered with
  8021.    -- either the BUILDMENUITEM, or BUILDACCELTABLE statements.
  8022.    cmdid = arg(1)
  8023.  
  8024.    -- First check if a usersting exists for this command-id in the
  8025.    -- active accel table.
  8026.    accelstr=queryaccelstring(activeaccel, cmdid)
  8027.    sayerror "querystring=<"accelstr"> cmdid=<"cmdid">"
  8028.  
  8029.    -- "flip-flop" active accel tables just for fun!
  8030.    if accelstr="thomas" then
  8031.       activeaccel="other"
  8032.       activateacceltable activeaccel
  8033.    endif
  8034.    if accelstr="jason" then
  8035.       activeaccel='default'
  8036.       activateacceltable activeaccel
  8037.    endif
  8038.  
  8039.    -- if an accel string was not found, try the menu manager.
  8040.    if accelstr="" then
  8041.       strip(querymenustring(activemenu,cmdid),"T",\0)
  8042.        -- execute user string after stripping off null terminating char
  8043.    endif
  8044.  
  8045.  
  8046. ΓòÉΓòÉΓòÉ 6.2. Building Menus from the Macro Language ΓòÉΓòÉΓòÉ
  8047.  
  8048. EPM allows user configurable pull-down menus.  The menus are created from the 
  8049. macro language using a set of macro procedures: 
  8050.  
  8051. BuildSubMenu Adds an entry to the action bar. 
  8052.  
  8053. BuildMenuItem Adds an entry to an action bar submenu. 
  8054.  
  8055. ShowMenu  Activates an action bar . 
  8056.  
  8057. DeleteMenu Deletes an action bar, submenu, or menu item. 
  8058.  
  8059. QueryMenuString Returns the command associated with a menu item. 
  8060.  
  8061.  
  8062. ΓòÉΓòÉΓòÉ 6.2.1. Buildsubmenu ΓòÉΓòÉΓòÉ
  8063.  
  8064. The buildsubmenu command creates an option on the action bar.  If the option 
  8065. name already exists, then the command is appended to the existing option menu 
  8066. as a sub menu option. Although the menu is built internally, it is not seen 
  8067. until a 'showmenu' is issued. The syntax for a buildsubmenu command is: 
  8068.  
  8069.  
  8070.      buildsubmenu menu_name, subid, text, cmd, mis_style, mia_attr
  8071.  
  8072. menuname    where 'menuname' is a text string containing the name of your 
  8073.             particular menu.  (MAX. = 80 characters) 
  8074. subid       where 'subid' is a unique number within this particular menu to 
  8075.             define that sub-menu in question. (1-MAXINT) 
  8076. text        where 'text' is a string of text which is to appear in as the title 
  8077.             of that particular sub-menu. 
  8078. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8079.             submenu is selected.  If the submenu has associated items then the 
  8080.             defc is not executed. 
  8081. mis_style   where 'mis_style' is a PM menu style. (See PM tech ref vol. 3 pages 
  8082.             59-60) 
  8083. mis_attr    where 'mis_attr' is a PM menu attribute. (See PM tech ref vol. 3 
  8084.             pages 59-60) 
  8085.  
  8086.  
  8087. ΓòÉΓòÉΓòÉ 6.2.2. Buildmenuitem ΓòÉΓòÉΓòÉ
  8088.  
  8089. The buildmenuitem command appends a menu item under an existing option on the 
  8090. action bar (which can be created with buildsubmenu). The syntax for 
  8091. buildmenuitem is: 
  8092.  
  8093.  
  8094.  
  8095.   buildmenuitem menu_name, subid, item_id, text, cmd, mis_style, mia_attr
  8096.  
  8097. menu_name   where 'menuname' is a string containing the name of your particular 
  8098.             menu.  (MAX. = 80 characters) 
  8099. subid       where 'subid' is a unique number within this particular menu to 
  8100.             define that sub-menu in question. (1-MAXINT) 
  8101. item_id     where 'item id' is a unique number within this particular menu to 
  8102.             define that menu-item in question. (1-MAXINT) 
  8103. text        where 'text' is a string of text which is to appear in as the title 
  8104.             of that particular sub-menu. 
  8105. cmd         where 'cmd' is the editor defc that is to be executed when the 
  8106.             submenu is selected. 
  8107. mis_style   where 'mis_style' is a PM menu style. (See PM tech ref vol. 3 pages 
  8108.             59-60) 
  8109. mis_attr    where 'mis_attr' is a PM menu attribute. (See PM tech ref vol. 3 
  8110.             pages 59-60) 
  8111.  
  8112.  
  8113. ΓòÉΓòÉΓòÉ 6.2.3. Showmenu ΓòÉΓòÉΓòÉ
  8114.  
  8115. Displays a prebuilt menu, built using 'buildsubmenu' and 'buildmenuitem'. The 
  8116. syntax for the showmenu command is: 
  8117.  
  8118.  
  8119.      showmenu menuname
  8120.  
  8121. menuname    where 'menuname' is a string containing the name of your particular 
  8122.             menu.  (MAX. = 80 characters) 
  8123.  
  8124. Note:  When a menu item is selected, the PROCESSMENU command (defined in 
  8125. STDCTRL.E) is called, with an argument of the itemid. PROCESSMENU retrieves the 
  8126. command associated with this itemid in the menu whose name is stored in the 
  8127. universal variable ACTIVEMENU, and then executes the retrieved command. 
  8128. Therefore, whenever a SHOWMENU is done, ACTIVEMENU should be set to the name of 
  8129. the menu that was shown. 
  8130.  
  8131.  
  8132. ΓòÉΓòÉΓòÉ 6.2.4. Deletemenu ΓòÉΓòÉΓòÉ
  8133.  
  8134. Deletes a named menu or a particular part of a named menu from the internal 
  8135. menu manager.  The syntax of the deletemenu command is: 
  8136.  
  8137.  
  8138.       deletemenu menuname, subid, itemid, itemonly
  8139.  
  8140. menuname    where 'menuname' is a string containing the name of your particular 
  8141.             menu.  (MAX. = 80 characters) 
  8142. subid       where 'subid' is the sub-menu that is to be deleted. To delete all 
  8143.             submenus set this parameter to 0. 
  8144. itemid      where 'item id' is the item to start deleting off a particular sub 
  8145.             menu.  To delete all menu items under a sub menu, set this 
  8146.             parameter to 0. 
  8147. itemonly    where 'itemonly' is true if it is desired to delete only the items 
  8148.             under a sub-menu but not the sub-menu itself. 
  8149.  
  8150.  
  8151. ΓòÉΓòÉΓòÉ 6.2.5. querymenustring ΓòÉΓòÉΓòÉ
  8152.  
  8153. Returns the command associated with a menu option. The syntax of the 
  8154. querymenustring command is: 
  8155.  
  8156.  
  8157.      cmd = querymenustring(menuname, subid)
  8158.  
  8159. cmd         where 'cmd' will contain the command associated with the menu 
  8160.             option requested. 
  8161. menuname    where 'menuname' is a string containing the name of the menu to be 
  8162.             queried. 
  8163. subid       where 'subid' is the sub-menu id number of the menu to be queried. 
  8164.  
  8165.  
  8166. ΓòÉΓòÉΓòÉ 6.2.6. sample menu addition ΓòÉΓòÉΓòÉ
  8167.  
  8168. This example shows a menu being added to the default action bar menu. It is 
  8169. defined as a DEFINIT in my MYSTUFF.E file. This means that each time a new edit 
  8170. window is initialized, the action bar option Compile will be added to the 
  8171. default action bar choices. Remember to recompile your editor to have this 
  8172. addition take effect. 
  8173.  
  8174.  
  8175.   defload
  8176.     universal defaultmenu
  8177.     buildsubmenu defaultmenu, 19, 'Compile', '', 0, 0
  8178.     buildmenuitem defaultmenu, 19, 911, 'Save', 'save', 0, 0
  8179.     buildmenuitem defaultmenu, 19, 912, 'Relink', 'relink test', 0, 0
  8180.     showmenu defaultmenu
  8181.  
  8182. Note that the numbers 19, 911, and 912 where chosen to insure that they are 
  8183. unique. 
  8184.  
  8185.  
  8186. ΓòÉΓòÉΓòÉ 6.3. Configuring the Mouse ΓòÉΓòÉΓòÉ
  8187.  
  8188. Power users may want to configure the mouse to meet their needs.  There are 
  8189. three base mouse sets that can be configured. See The EPM User's Guide for 
  8190. information on setting the constant my_Mousestyle to the desired value (1,2 or 
  8191. 3). This will change the basic mouse configuration styles.  You can also 
  8192. configure the mouse actions yourself.  To execute these use the built-in 
  8193. procedure REGISTER_MOUSEHANDLER. 
  8194.  
  8195. The REGISTER_MOUSHANDLER(IsGlobal, event, mcommand) command allows the binding 
  8196. of mouse actions to commands. Mouse actions can be global or local. Mouse 
  8197. actions will be processed as follows: 
  8198.  
  8199.  1. local mouse action definition (if defined) 
  8200.  2. else global mouse action definition (if defined) 
  8201.  3. else mouse action ignored. 
  8202.  
  8203. The variable IsGlobal determines whether the mouse action described is local or 
  8204. gloabl. The variable event determines the mouse action to be bound with the 
  8205. command listed in the variable mcommand. Event should be in the following 
  8206. format: 
  8207.  
  8208.         'key action state'
  8209.  
  8210. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  8211. following: 
  8212.  
  8213. BEGINDRAG           activates at the beginning of the drag 
  8214. CLICK               activates if a button (specified by key) is single clicked 
  8215. SECONDCLK           activates if a button (specified by key) is double clicked 
  8216.  
  8217. These actions must be capitalized and have exactly one space between the key 
  8218. and the state numbers. The state should be the sum of the following: 
  8219.  
  8220. 0 = no states active 
  8221. 1 = shift key active 
  8222. 2 = control key active 
  8223. 4 = alternate key active 
  8224.  
  8225. An Event should can also be of the following format: 
  8226.  
  8227.         'action'
  8228.  
  8229. where action must be one of the following: 
  8230.  
  8231. ENDDRAG             activates at the end of a drag 
  8232. CANCELDRAG          activates if a drag is cancelled 
  8233.  
  8234. These actions must be capitalized and unpadded by spaces. 
  8235.  
  8236. An example of a mouse action is: 
  8237.  
  8238. call register_mousehandler(0,'2 SECONDCLK 3','quit')
  8239.  
  8240. This would set the second click of button two on the mouse with the shift and 
  8241. control states activated to do a QUIT command. This key action would be bound 
  8242. locally to a particular file. Similarly, 
  8243.  
  8244. call register_mousehandler(1,'CANCELDRAG','SynthesizeVoice whoops')
  8245.  
  8246. would cause the 'SynthesizeVoice whoops' command to be invoked every time a 
  8247. drag was canceled in any file that did not have a local CANCELDRAG event 
  8248. handler defined. 
  8249.  
  8250. By combining several of these register_mousehandler statements together in a 
  8251. DEFLOAD statement, one can customize the mouse actions.  Note that the 
  8252. following defc commands are useful for helping define common mouse actions: 
  8253.  
  8254. o MH_BEGIN_MARK 
  8255. o MH_CANCEL_MARK 
  8256. o MH_END_MARK 
  8257. o HH_GOTOPOSITION 
  8258.  
  8259. See the section Commands Omitted From the User's Guide. for descriptions on 
  8260. these commands. 
  8261.  
  8262. An example use of these commands is: 
  8263.  
  8264.  
  8265.   defc mymouse
  8266.     register_mousehandler(0,'1 CLICK 2','MH_GOTOPOSITION')
  8267.     sayerror "New mouse command is in effect."
  8268.  
  8269. Compiling and linking this command into EPM will allow the new mouse action to 
  8270. be added when the command MYMOUSE is entered in the commandline dialog box. 
  8271. Then, whenever you hit a ctrl+left mouse button one click, the cursor will move 
  8272. to the mouse's position. 
  8273.  
  8274. If you want a series of events to happen, define a new command using defc. The 
  8275. following is an example: 
  8276.  
  8277.  
  8278.   defc mycmd
  8279.     getline txtline               -- get the current line
  8280.     'mh_gotoposition'             -- go to the mouse position
  8281.     insertline txtline            -- copy the line
  8282.     up                            -- move up to the new line
  8283.  
  8284.   defc mymouse
  8285.     register_mousehandler(0,'1 CLICK 2','mycmd')  -- set the mouse key
  8286.     sayerror "New mouse command is in effect."    -- show it worked
  8287.  
  8288. In this example, when compiled and linked, executing the command MYMOUSE will 
  8289. setup the ctrl+single button one click combination to copy the line the cursor 
  8290. is on, to the line the mouse is pointing to. See the file MOUSE.E for more 
  8291. examples of defining mouse actions. 
  8292.  
  8293. As you can see, the REGISTER_MOUSEHANDLER is a very powerful command that 
  8294. should be exploited to make the most of EPM and the mouse. 
  8295.  
  8296.  
  8297. ΓòÉΓòÉΓòÉ 6.4. Programming Hints ΓòÉΓòÉΓòÉ
  8298.  
  8299. Programming Hints 
  8300.  
  8301.  
  8302. ΓòÉΓòÉΓòÉ 6.4.1. Using REFRESH ΓòÉΓòÉΓòÉ
  8303.  
  8304. Advanced users may find themselves writing applications that rely heavily on 
  8305. the E programming language. In such applications the need may arise to have 
  8306. messages and actions update the screen while the macro continues in progress. 
  8307. Take the following example: 
  8308.  
  8309.  
  8310. defproc delay(time)=       -- procedure to slow things down
  8311.   totaltime=time * 100     -- this procedure represents the time consumed
  8312.   for i = 1 to totaltime   -- ... by calculations and E commands or
  8313.     j = i+5/3              -- ... external programs
  8314.   endfor
  8315.  
  8316. defc mycmd=
  8317.   'togglecontrol 8 1'           -- make sure the message bar is showing
  8318.   .messageline = "Stage one executing..."   -- this should trace
  8319.   call delay(4)                             -- ... the macro's execution
  8320.   .messageline = "Stage two executing..."
  8321.   call delay(4)
  8322.   .messageline = "Stage three executing..."
  8323.  
  8324. In this example, all the message appear very quickly as the message buffer 
  8325. empties at the end of the procedure and not throughout the procedure as was 
  8326. intended. This occurs because the compiler doesn't refresh the screen during 
  8327. the execution of the macro. Constantly refreshing the screen is very costly and 
  8328. would slow down the execution of EPM too much. To accomplish the goal (ie. have 
  8329. the messageline trace the execution) replace mycmd with: 
  8330.  
  8331.  
  8332.   defc mycmd=
  8333.     'togglecontrol 8 1'
  8334.     .messageline = "Stage one executing..."
  8335.     refresh
  8336.     call delay(4)
  8337.     .messageline = "Stage two executing..."
  8338.     refresh
  8339.     call delay(4)
  8340.     .messageline = "Stage three executing..."
  8341.     refresh
  8342.  
  8343. The new MYCMD will show the lines as they execute. All that was added was the 
  8344. internal statement REFRESHto cause a screen refresh. (By the way the command 
  8345. 'TOGGLECONTROL 8 0' will turn the messageline off). 
  8346.  
  8347.  
  8348. ΓòÉΓòÉΓòÉ 6.4.2. Using ECHO ΓòÉΓòÉΓòÉ
  8349.  
  8350. Debugging programs can sometimes be a rather tricky task. E is no exception. 
  8351. There is an internal procedure ECHO that can be inserted into programs to allow 
  8352. a command trace. Whenever a command is executed, it will first appear in a 
  8353. message dialog box. By keeping track of the commands the programmer can help 
  8354. trace down errors. 
  8355.  
  8356. There is also a defc front end for this internal command, allowing ECHO to be 
  8357. issued from the command line dialog box. 
  8358.  
  8359. Another useful debug tool is the messageNwait standard procedure. By placing 
  8360. messageNwaits one can view variables and create check points to verify the 
  8361. macro's execution. 
  8362.  
  8363.  
  8364. ΓòÉΓòÉΓòÉ 7. Linkable External Modules ΓòÉΓòÉΓòÉ
  8365.  
  8366. Linkable external modules. 
  8367.  
  8368.  
  8369. ΓòÉΓòÉΓòÉ 7.1. Introduction ΓòÉΓòÉΓòÉ
  8370.  
  8371. You can compile a group of .E files into an .EX file that is separate from the 
  8372. E.EX file, and yet still incorporate both into the editor. In other words, 
  8373. multiple .EX files can be loaded into the editor. Each .EX file can use up to 
  8374. 64K of p-code space. This means that there's effectively no limit on the total 
  8375. size of a user's compiled macros, as long as they can be broken into logical 
  8376. chunks ("modules") of less than 64K each. 
  8377.  
  8378. I'll use the DRAW feature as an example of the new reorganization of E via 
  8379. these linkable modules. We used to include the draw code into the base E.E so 
  8380. that it was always available, and always occupied 3410 bytes of p-code space. 
  8381. But in version 4.02, E.E omits the feature: 
  8382.  
  8383.    compile if EVERSION < '4.02'
  8384.     include 'slimdraw.e'
  8385.    compile endif
  8386. Instead, DRAW.E is compiled separately into its own .EX file. Now when you type 
  8387. draw in the command dialog box, EPM searches for DRAW.EX on disk, loads it into 
  8388. its own block of memory, and begins execution. The relocation of the draw code 
  8389. is transparent to the user, except for the slight delay of the disk search. 
  8390. Once the draw command is completed, the module is released again, to free up 
  8391. memory. 
  8392.  
  8393.  
  8394. ΓòÉΓòÉΓòÉ 7.2. Implicit Loading of External Modules ΓòÉΓòÉΓòÉ
  8395.  
  8396. External modules can be invoked implicitly, by simply issuing the name of the 
  8397. module as a command.  As in our previous example, the user (or a macro) can 
  8398. simply issue the DRAW command (F6). When E sees that the command is not in its 
  8399. base set, it will search the disk for an .EX file of the same name. The search 
  8400. follows the same rules as for shelling an external .EXE program: 
  8401.  
  8402. o It does not occur if AUTOSHELL is off. 
  8403.  
  8404. o The search path is: 
  8405.  
  8406.    - the current directory, 
  8407.    - the directories in PATH, 
  8408.    - the directories in EPMPATH, and 
  8409.    - E's directory. 
  8410.  
  8411. o An .EX file will be found before a .EXE or .CMD file, but after an internal 
  8412.   system command.  (That is, you can't name a module EDIT.EX because EDIT will 
  8413.   always be recognized first as an internal system command.) 
  8414. Upon activation of the module, its code contents will be executed in the 
  8415. following order: 
  8416.  
  8417. o DEFINIT will be executed first if it exists.  This will consist of minor 
  8418.   initialization tasks like predefining variables. 
  8419.  
  8420. o DEFMAIN will be executed.  This is the body of the command.  If you convert 
  8421.   an old macro to an external module, you'll usually rename its DEFC to 
  8422.   DEFMAIN.  For instance, when SLIMDRAW.E was converted to the module DRAW.E, 
  8423.   defc draw was changed to defmain. 
  8424.  
  8425. o DEFEXIT, if it exists, will be executed after DEFMAIN finishes. 
  8426.  
  8427. When a module is invoked implicitly, it is executed once and discarded.  All 
  8428. three sections -- DEFINIT, DEFMAIN, DEFEXIT -- are run in sequence, so the 
  8429. division makes little difference; you'd get the same results by lumping them 
  8430. all into DEFMAIN. 
  8431.  
  8432.  
  8433. ΓòÉΓòÉΓòÉ 7.3. Explicit Linking of External Modules ΓòÉΓòÉΓòÉ
  8434.  
  8435. For better control, you can explicitly load a module with the LINK and UNLINK 
  8436. statements.  The DRAW module can be linked by the statement: 
  8437.  
  8438.    link 'draw'
  8439. E will search the disk for the explicit filename DRAW.EX, without bothering to 
  8440. check for internal system commands or .EXE files. This gives you some minor 
  8441. advantages since an explicit search can be faster, and the module can have the 
  8442. same name as a system command (DIR.EX) or a DEFC compiled into your base set. 
  8443. But the primary advantage is a better control of the order of execution. 
  8444. DEFMAIN is not executed at all.  DEFINIT is executed at link time, and DEFEXIT 
  8445. at unlink time.  In the interim all the module's commands, procs, universal 
  8446. variables and keysets are available globally.  This will be important if 
  8447. procedures or variables are shared by several modules. 
  8448.  
  8449. Explicit linking to the draw module does NOT execute the DRAW command. In fact 
  8450. the DEFMAIN of such a module is never executed if it is explicitly linked. In 
  8451. order to execute the DRAW command under these conditions, you must define a 
  8452. defc draw. The following example shows how the new external draw module allows 
  8453. users to link to it implicitly and explicitly: 
  8454.  
  8455. definit
  8456.     /* initializations, global vars, etc. */
  8457.  
  8458. defmain
  8459.     'draw' arg(1)
  8460.  
  8461. defc draw
  8462.     /* code which implements DRAW command */
  8463.     /*   remains the same as when it was  */
  8464.     /*   included in E.E                  */
  8465.  
  8466. If you repeat a link of an already-linked module, no harm is done.  The disk is 
  8467. not searched again, but the module's DEFINIT is re-executed as if the module 
  8468. were reloaded from scratch. 
  8469.  
  8470. Note:  if your module has a DEFEXIT, don't use a STOP statement to end 
  8471. execution of DEFMAIN.  A STOP will permanently end the module's execution 
  8472. before getting to the DEFEXIT. 
  8473.  
  8474. Note:  The RC, universal return code variable, is set to the module number of 
  8475. the .ex file linked. 
  8476.  
  8477.  
  8478. ΓòÉΓòÉΓòÉ 7.4. Useful Commands ΓòÉΓòÉΓòÉ
  8479.  
  8480. Since LINK and UNLINK are statements, we had to redefine them as commands in 
  8481. order to give you access to explicit linking from the command dialog box. We 
  8482. also added a RELINK command. All of these commands are defined in the file 
  8483. LINKCMDS.E as follows: 
  8484.  
  8485.    defc link
  8486.       link arg(1)
  8487.  
  8488.    defc unlink
  8489.       unlink arg(1)
  8490. A combination of the two gives us the nifty RELINK command: 
  8491.  
  8492.    defc relink
  8493.       if arg() > 0 then
  8494.         modulename=arg(1)     -- if argument is given, then uses that
  8495.       else
  8496.         modulename=.filename  -- if no argument, then assume current file
  8497.         'save '||.filename    --   ... and save current file
  8498.       endif
  8499.       'etpm' modulename       -- Recompile it,
  8500.       unlink modulename       --   unlink the old version,
  8501.       link modulename         --     relink the new one.
  8502. This is very useful for fast development of macros, since you don't have to 
  8503. exit from the editor to compile revised macros and re-run the newly compiled 
  8504. version. You can relink a macro in a few seconds.  (RELINK DRAW, for example, 
  8505. takes 3 seconds on my AT. Understand that the slow step is the compilation; 
  8506. LINK and UNLINK are almost instantaneous.) 
  8507.  
  8508. When using LINK, UNLINK and RELINK as commands, you need not enclose the module 
  8509. name in quotes. For example, the statement link 'draw' is acceptable, but the 
  8510. command link 'draw' would be incorrect. The interpreter would assume that the 
  8511. name of the module was six characters and included the quotes. The correct 
  8512. syntax for the command (i.e. issued from the command line dialog box) is: 
  8513.  
  8514. link draw
  8515.  
  8516.  
  8517. ΓòÉΓòÉΓòÉ 7.5. Keysets ΓòÉΓòÉΓòÉ
  8518.  
  8519. Individual keys cannot be linked; you cannot define a single key (like def f1) 
  8520. in an external module.  You can however link a keyset, which is almost as easy, 
  8521. by following these steps: 
  8522.  
  8523.  1. Begin the key definitions with a DEFKEYS declaration: 
  8524.  
  8525.            In MYMODULE.E:
  8526.  
  8527.               defkeys mymodule_keys
  8528.               def f5=
  8529.                  sayerror 'F5 pressed'
  8530.  
  8531.  2. Compile the module: et mymodule. 
  8532.  
  8533.  3. Link it: link mymodule. 
  8534.  
  8535.  4. Execute a KEYS statement: keys mymodule_keys. The best place to put the 
  8536.     KEYS statement is in the module's DEFINIT so that it automatically gets 
  8537.     executed immediately after linking: 
  8538.  
  8539.               definit        -- Also in MYMODULE.E
  8540.                  keys mymodule_keys
  8541.  
  8542. It doesn't make much sense to define keys in a module that will be implicitly 
  8543. loaded.  An implicitly-loaded module will be run once and discarded; its keyset 
  8544. will not be retained long enough to be used. Instead you should explicitly link 
  8545. an external module with keyset definitions, so that its resources will stick 
  8546. around until released. 
  8547.  
  8548. Keysets are stored economically (as a linked list) so that a two-key keyset 
  8549. occupies only 8 bytes.  The expansion and overlaying onto a base keyset occur 
  8550. at run time, within the KEYS statement. 
  8551.  
  8552. Partial keysets can be defined usefully in external modules. edit_keys can be 
  8553. defined in the base module E.E, and mymodule_keys can be defined elsewhere. 
  8554. The overlaying occurs soon after the link (assuming you put a KEYS statement in 
  8555. MYMODULE's DEFINIT as recommended). We refer to the partial external keyset as 
  8556. an overlay keyset and edit_keys as the base. E will accept BASE as a synonym 
  8557. for NEW, and OVERLAY means the same thing as the absence of NEW.  The following 
  8558. are equivalent: 
  8559.  
  8560.    defkeys edit_keys new     =      defkeys edit_keys base
  8561.    defkeys c_keys            =      defkeys c_keys overlay
  8562.  
  8563. You can return to the base edit_keys either by executing keys edit_keys or by 
  8564. unlink 'mymodule'. When a module is unlinked, its keyset is automatically 
  8565. removed. 
  8566.  
  8567. Note:  That's true only for OVERLAY keysets.  E will complain if you try to 
  8568. unlink a module containing the current base keyset, since that would leave no 
  8569. keys at all.  You'd see the message Cannot unlink base keyset module. 
  8570.  
  8571. Note:  A base keyset (as defined by DEFKEYS BASE or NEW) is automatically given 
  8572. a starting set of the standard 128 ASCII keys, including 'A'-'Z', '0'-'9', and 
  8573. control keys.  Even if you don't give the keyset any DEF's, it will include the 
  8574. ASCII keys.  But some applications might not want those keys included, so 
  8575. another keyset attribute CLEAR has been added.  For example: 
  8576.  
  8577.    defkeys zero_keys base clear
  8578. defines a REALLY empty keyset. 
  8579.  
  8580.  
  8581. ΓòÉΓòÉΓòÉ 7.6. Multiple Definitions ΓòÉΓòÉΓòÉ
  8582.  
  8583. If a command (DEFC) of the same name is defined in more than one module, the 
  8584. highest (latest-linked) module wins.  The last-linked module can be regarded as 
  8585. the "current application", whose commands take precedence in case of name 
  8586. conflicts.  If the highest module is unlinked, commands in lower modules become 
  8587. available again. Keysets are similar.  If multiple modules define the same 
  8588. keyset name, the latest-linked module's keyset wins. 
  8589.  
  8590. If a procedure (DEFPROC) is defined in multiple modules, the definition in the 
  8591. caller's module (if any) wins, whether or not that module is the latest-linked. 
  8592. This is consistent with the concept of a current application. If module 3 calls 
  8593. myproc() and module 3 itself contains a defproc myproc(), that's certainly the 
  8594. one that the application writer intended to be called. 
  8595.  
  8596. If a procedure is multiply defined but none of the definitions are in the 
  8597. caller's module, an error Call: duplicated proc is issued. If a procedure is 
  8598. defined only once, that definition wins even if it isn't in the caller's 
  8599. module. 
  8600.  
  8601. To determine a module number, issue a QLINK command followed by the name of an 
  8602. E module already linked. For example: 
  8603.  
  8604.   QLINK EPM
  8605.  
  8606. would return module number zero (the lowest level) because it is always linked, 
  8607. and always the first module loaded. 
  8608.  
  8609. Universal variables can be declared in many different modules, all of which 
  8610. share the same data. A universal variable is not discarded as long as any 
  8611. active module references it.  Thus a module can initialize a variable and be 
  8612. unlinked, without the value being lost, as long as any other module needs it. 
  8613.  
  8614.  
  8615. ΓòÉΓòÉΓòÉ 7.7. E Applications ΓòÉΓòÉΓòÉ
  8616.  
  8617. Large applications are feasible in the E language. Dynamic linking, i.e. the 
  8618. ability to link a compiled module at run-time, makes it possible to distribute 
  8619. an application as a compiled .EX file.  Distributing object-code-only 
  8620. applications is possible. This is not recommended, as many programmers wish to 
  8621. be able to examine and adjust the source code of applications according to 
  8622. their own needs. However, this type of distribution would have its advantages. 
  8623. For example, this would make such an application much easier for the end-user 
  8624. to use. The user would simply have to: 
  8625.  
  8626.  1. copy it onto the hard disk, somewhere along the PATH, and 
  8627.  
  8628.  2. type its name as a command. 
  8629.  
  8630.     Note:  that's strictly true only for implicit loading. Complex applications 
  8631.     will usually require explicit LINK and UNLINK commands, but even those can 
  8632.     be given single-word front ends if desired; see MATH.E for examples. 
  8633. In addition, invoking it is fast: the time for a link equals a fraction of a 
  8634. second plus the path-search time.  (Path-search times can be minimized by 
  8635. explicit LINK commands with explicit file specs for the modules, like "link 
  8636. c:\epm\mymodule".) 
  8637.  
  8638. Another recent change to support compiled applications is that: EPM.EXE can run 
  8639. earlier-version .EX files.  If a developer releases an application as an 
  8640. object-code black box (compiled, say, with ET 4.03) it will still be runnable 
  8641. if and when the user upgrades EPM.EXE.  The versions of E and ETPM will not 
  8642. have to match, as long as E is more recent than the .EX file. (Assuming we 
  8643. don't make any more major structural revisions as we did in release 4.02.) 
  8644.  
  8645. If your application really must know the exact versions of E and ET it's 
  8646. working with, it can check two things: 
  8647.  
  8648. o EVERSION is a constant supplied automatically by ET.  It's a constant 
  8649.   attribute of the .EX file. The name EVERSION appears to be an unfortunate 
  8650.   choice in hindsight, since it's really ETVERSION. 
  8651.  
  8652. o A new function VER() provides EPM.EXE's version.  This will be the same 
  8653.   version number now shown by the VER command, but in function form so it's 
  8654.   queryable by a macro. 
  8655. Your application could do something like: 
  8656.  
  8657.    if ver() <> EVERSION then
  8658.       sayerror "Sorry, I can only run with EPM.EXE version "EVERSION"."
  8659.       stop
  8660.    endif
  8661.  
  8662. Note:  Advice to writers of add-on applications:  If you're writing a 
  8663. stand-alone E application, one that you'd like to compile separately and link 
  8664. in as an external module (which we recommend), feel free to include STDCONST.E 
  8665. because unused constants do not waste space now.  You should also try to 
  8666. include MYCNF.E to allow the user to pre-override your constants.  A catch-all 
  8667. header is: 
  8668.  
  8669.    include     'colors.e'
  8670.    include     'stdconst.e'
  8671.    tryinclude  'mycnf.e'
  8672. Your applications can check whether the user overrode your constants with 
  8673. compile if defined().  For example: 
  8674.  
  8675.    compile if not defined(AUTOSAVE_PATH)
  8676.       const AUTOSAVE_PATH=''
  8677.    compile endif
  8678. A similar technique allows your application to check whether it's being 
  8679. compiled as part of the base (by an INCLUDE) or as an external module (by a 
  8680. LINK).  Query the existence of any constant that's defined in the base, like 
  8681. SMALL. 
  8682.  
  8683.    compile if not defined(SMALL) -- are we separately compiled?
  8684.     include 'colors.e'           -- if so, must include color names
  8685.    compile endif
  8686.  
  8687. The file USERAPP.SMP, which is included in EMACROS.FLS, is a good example of a 
  8688. routine that tests to see if it's base or external; if external, sets 
  8689. configuration constants the same way they would be set if it were included in 
  8690. the base; and defines the routines it needs without duplicating anything that's 
  8691. included in the base macros. 
  8692.  
  8693.  
  8694. ΓòÉΓòÉΓòÉ 7.8. Dynamic Linking ΓòÉΓòÉΓòÉ
  8695.  
  8696. Dynamic linking is the delayed binding of application program external 
  8697. references to subroutines.  There are two forms of dynamic linking -- load time 
  8698. and run time. 
  8699.  
  8700. In load time dynamic linking, a program calls a dynamically linked routine just 
  8701. as it would any external routine.  When the program is assembled or compiled, a 
  8702. standard external reference is generated.  At link time, the programmer 
  8703. specifies one or more libraries which contain routines to satisfy external 
  8704. references.  External routines to be dynamically linked contain special 
  8705. definition records in the library.  A definition record tells the linker that 
  8706. the routine in question is to be dynamically linked and provides the linker 
  8707. with a dynamic link module name and entry name.  The module name is the name of 
  8708. a special executable file with the filename extension of .DLL which contains 
  8709. dynamic link entry points.  The linker stores module name/entry name pairs 
  8710. describing the dynamic link routines in the executable file created for the 
  8711. program. When the calling program is run, OS/2 loads the dynamic link routines 
  8712. from the modules specified and links the calling program to the called 
  8713. routines. 
  8714.  
  8715. For more information on Dynamic Linking see the OS/2 Technical Reference 
  8716. Manual. For an example of dynamic linking in E using the DYNALINK command see 
  8717. the DYNATEST.E file. 
  8718.  
  8719.  
  8720. ΓòÉΓòÉΓòÉ 7.9. Run-Time Error Messages for Linking and Keysets ΓòÉΓòÉΓòÉ
  8721.  
  8722. Call: duplicated proc 
  8723.                               A macro called a procedure that is not defined in 
  8724.                               the caller's module, but which is defined in more 
  8725.                               than one other module.  The caller can't decide 
  8726.                               which DEFPROC is the right one. 
  8727.  
  8728. Call: unknown proc 
  8729.                               A macro tried to call a procedure that is not 
  8730.                               defined in any module. Note that ET will now 
  8731.                               allow you to compile an .E file with unresolved 
  8732.                               procedure calls; it assumes some other module 
  8733.                               will supply the DEFPROC by the time the call 
  8734.                               occurs.  If that doesn't happen, this message is 
  8735.                               given at run-time. 
  8736.  
  8737. Cannot find keyset 
  8738.                               A macro tried to execute a KEYS statement with an 
  8739.                               unknown keyset name. Perhaps the module 
  8740.                               containing the keyset (the DEFKEYS) has not been 
  8741.                               linked. 
  8742.  
  8743. Cannot unlink base keyset module 
  8744.                               You tried to unlink the module that selected the 
  8745.                               current base keyset. What keys would be left 
  8746.                               after the unlink? 
  8747.  
  8748. Cannot unlink module in use 
  8749.                               A macro tried to unlink the same module it was 
  8750.                               contained in.  Or it tried to unlink a calling 
  8751.                               module (one that must be kept around for 
  8752.                               returning to). Only modules which are not 
  8753.                               involved in the current chain of execution can be 
  8754.                               unlinked.  You can produce this message by the 
  8755.                               command 'UNLINK E' which tries to unlink E.EX. 
  8756.  
  8757. Invalid EX file or incorrect version 
  8758.                               You tried to link to a file that does not have 
  8759.                               the proper .EX format expected, or you tried to 
  8760.                               link to an .EX file that was compiled with a past 
  8761.                               version of the ET translator. 
  8762.  
  8763. Link: file not found 
  8764.                               You probably misspelled the module's filename in 
  8765.                               a LINK statement. The filename.EX could not be 
  8766.                               found in the current directory or along the PATH. 
  8767.  
  8768. Link: invalid filename 
  8769.                               The module name is poorly formed in a link 
  8770.                               statement, for example with multiple periods or 
  8771.                               colons.  This is an unusual error; normally 
  8772.                               you'll get "Link: file not found". 
  8773.  
  8774. Unlink: bad module filename 
  8775.                               You tried to unlink a module that does not exist 
  8776.                               on disk. 
  8777.  
  8778. Unlink: unknown module 
  8779.                               You tried to unlink a module that is not 
  8780.                               currently linked, although it does exist on the 
  8781.                               disk. 
  8782.  
  8783.  
  8784. ΓòÉΓòÉΓòÉ 8. E Language Syntax ΓòÉΓòÉΓòÉ
  8785.  
  8786. In this appendix the syntax of the E language is presented in a modified EBNF 
  8787. notation. For those who are unfamiliar with this form, a brief summary of its 
  8788. symbolic conventions are presented here: 
  8789.  
  8790. Keywords of the E language are printed here entirely in capital letters. All 
  8791. program components (non-terminals) whose definition is included in this section 
  8792. are highlighted in a bold font. All other literals (i.e. those strings that 
  8793. should be included in an E phrase exactly as they appear here in the syntax) 
  8794. are enclosed with single or double quotes. Any other character in the syntax is 
  8795. used as a symbol to convey the following meanings: 
  8796.  
  8797. A B       represents the concatenation of A AND B. 
  8798. (A | B)   represents either expression A OR expression B. 
  8799. [ A ]     represents an optional occurrence of expression A: zero or one 
  8800.           occurrence. 
  8801. { A }     represents zero or more occurrences of expression A. 
  8802. 'a'..'z'  represents: 'a' OR 'b' OR 'c' ... OR 'z' 
  8803.  
  8804.  
  8805. ΓòÉΓòÉΓòÉ 8.1. Syntax Notes ΓòÉΓòÉΓòÉ
  8806.  
  8807.  1. A semicolon is treated the same as a new line.  Wherever you see ';' in the 
  8808.     following listing, a line-break (a 'newline', CR-LF) is acceptable. Several 
  8809.     examples of line breaks were given in the earlier section Line 
  8810.     Continuations. 
  8811.  
  8812.  2. Quoted strings in syntax descriptions below indicate that the enclosed 
  8813.     string is not a keyword in the language.  Quoted strings (ex. 'filename') 
  8814.     below are not case specific. 
  8815.  
  8816.  3. For speed reasons the lexer does not return a space token for space and tab 
  8817.     characters. Syntax descriptions have been written without space tokens for 
  8818.     convenience. 
  8819.  
  8820.  4. Strings may not cross file or line boundaries. 
  8821.  
  8822.  5. Comments may not cross file boundaries.   There are three styles of 
  8823.     comments.    /*  */  may be nested and may cross line boundaries.    ; 
  8824.     in column 1 makes the rest of line a comment.    --    in any column makes 
  8825.     the rest of line a comment. 
  8826.  
  8827.  6. Include files may be nested. 
  8828.  
  8829.  7. Implied concatenation expressions with comments between have undefined 
  8830.     values.       'a'  /* comment */'b'    Undefined value 
  8831.  
  8832.  8. Identifiers are not case sensitive. 
  8833.  
  8834.  9. Compiler directives (COMPILE IF and INCLUDEs) are included in the following 
  8835.     listing, but cannot be sufficiently explained with this limited syntactical 
  8836.     depiction. Be aware that they can occur anywhere a semicolon or newline 
  8837.     can. For a more in depth discussion, see section Compiler Directive 
  8838.     Statements. 
  8839.  
  8840.  
  8841. ΓòÉΓòÉΓòÉ 8.2. The Syntax ΓòÉΓòÉΓòÉ
  8842.  
  8843. Syntax of the E language. 
  8844.  
  8845.  
  8846. ΓòÉΓòÉΓòÉ 8.2.1. e_program ΓòÉΓòÉΓòÉ
  8847.  
  8848. e_program ::=  definition_group 
  8849.  
  8850.  
  8851. ΓòÉΓòÉΓòÉ 8.2.2. definition_group ΓòÉΓòÉΓòÉ
  8852.  
  8853. definition_group ::=   definition  {definition} 
  8854.  
  8855.  
  8856. ΓòÉΓòÉΓòÉ 8.2.3. definition ΓòÉΓòÉΓòÉ
  8857.  
  8858. definition ::=  DEF  keyname {','{';'} keyname} ['=']   global_decl_group 
  8859. statement_group   [RETURN] 
  8860.  
  8861. | DEFC  identifier {',' identifier} ['=']   global_decl_group  statement_group 
  8862. [RETURN [expression] ] 
  8863.  
  8864. | DEFEXIT {';'} global_decl_group  statement_group 
  8865.  
  8866. | DEFINIT {';'} global_decl_group  statement_group 
  8867.  
  8868. | DEFKEYS  identifier [NEW | BASE | OVERLAY | CLEAR] 
  8869.  
  8870. | DEFMAIN {';'} global_decl_group  statement_group 
  8871.  
  8872. | DEFPROC identifier ['('{';'} formal_decl_group')']   global_decl_group 
  8873. statement_group   [RETURN [expression] ] 
  8874.  
  8875. | SET 'cursors' ['=']  number 
  8876.  
  8877. | SET 'insert_state' ['='] 0 | 1 
  8878.  
  8879. | CONST  {';'} const_decl_group 
  8880.  
  8881. | compiler_directive 
  8882.  
  8883. | ';' 
  8884.  
  8885.  
  8886. ΓòÉΓòÉΓòÉ 8.2.4. compiler_directive ΓòÉΓòÉΓòÉ
  8887.  
  8888. compiler_directive  INCLUDE  string ';' 
  8889.  
  8890. | TRYINCLUDE  string ';' 
  8891.  
  8892. | COMPILE IF constant_expression { ';' }     ( statement_group | 
  8893. definition_group )   {COMPILE ELSEIF constant_expression { ';' }     ( 
  8894. statement_group | definition_group ) }   [COMPILE ELSE  { ';' }     ( 
  8895. statement_group | definition_group ) ]   COMPILE ENDIF 
  8896.  
  8897.  
  8898. ΓòÉΓòÉΓòÉ 8.2.5. formal_decl_group ΓòÉΓòÉΓòÉ
  8899.  
  8900. formal_decl_group ::=  formal_declaration { {';'} [','] {';'} 
  8901. formal_declaration } 
  8902.  
  8903.  
  8904. ΓòÉΓòÉΓòÉ 8.2.6. formal_declaration ΓòÉΓòÉΓòÉ
  8905.  
  8906. formal_declaration ::=  [VAR]  identifier 
  8907.  
  8908.  
  8909. ΓòÉΓòÉΓòÉ 8.2.7. const_decl_group ΓòÉΓòÉΓòÉ
  8910.  
  8911. const_decl_group ::=  { constant_declaration {';'} (';' | ',') {';'} } 
  8912.  
  8913.  
  8914. ΓòÉΓòÉΓòÉ 8.2.8. constant_declaration ΓòÉΓòÉΓòÉ
  8915.  
  8916. constant_declaration ::=  identifier '='  expression 
  8917.  
  8918.  
  8919. ΓòÉΓòÉΓòÉ 8.2.9. global_decl_group ΓòÉΓòÉΓòÉ
  8920.  
  8921. global_decl_group ::=  {global_declaration {';'} } 
  8922.  
  8923.  
  8924. ΓòÉΓòÉΓòÉ 8.2.10. global_declaration ΓòÉΓòÉΓòÉ
  8925.  
  8926. global_declaration ::=  UNIVERSAL {';'}  identifier ['*']  {';'} {',' {';'} 
  8927. identifier } 
  8928.  
  8929.  
  8930. ΓòÉΓòÉΓòÉ 8.2.11. keyname ΓòÉΓòÉΓòÉ
  8931.  
  8932. keyname ::=  " ' " printable_char " ' " 
  8933.  
  8934. | " ' " printable_char " ' " '-' " ' "printable_char " ' " 
  8935.  
  8936. Although ETPM will accept all key definitions, some may seem not to take effect 
  8937. because PM intercepts these keys before EPM sees them. For a list of these keys 
  8938. see PM Keys. 
  8939.  
  8940. | 'backspace' 
  8941.  
  8942. | 'keydown' 
  8943.  
  8944. | 'keyend' 
  8945.  
  8946. | 'keyenter' 
  8947.  
  8948. | 'keyleft' 
  8949.  
  8950. | 'keyright' 
  8951.  
  8952. | 'keytab' 
  8953.  
  8954. | 'keyup' 
  8955.  
  8956. | 'space' 
  8957.  
  8958. | 'del' 
  8959.  
  8960. | 'end' 
  8961.  
  8962. | 'tab' 
  8963.  
  8964. | 'up' 
  8965.  
  8966. | 'enter' 
  8967.  
  8968. | 'entry' 
  8969.  
  8970. | 'esc' 
  8971.  
  8972. | 'f1'..'f12' 
  8973.  
  8974. | 'down' 
  8975.  
  8976. | 'home' 
  8977.  
  8978. | 'ins' 
  8979.  
  8980. | 'left' 
  8981.  
  8982. | 'pgdn' 
  8983.                                | 'pagedown' 
  8984.  
  8985. | 'pgup' 
  8986.                                | 'pageup' 
  8987.  
  8988. | 'right' 
  8989.  
  8990. | 'padenter' 
  8991.                                | 'pad_enter' 
  8992.  
  8993. | 's_f1'..'s_f12' 
  8994.  
  8995. | 's_tab' 
  8996.  
  8997. | 's_backspace' 
  8998.  
  8999. | 's_enter' 
  9000.  
  9001. | 's_esc' 
  9002.  
  9003. | 's_pgup' 
  9004.                                | 's_pageup' 
  9005.  
  9006. | 's_pgdn' 
  9007.                                | 's_pagedown' 
  9008.  
  9009. | 's_end' 
  9010.  
  9011. | 's_home' 
  9012.  
  9013. | 's_left' 
  9014.  
  9015. | 's_up' 
  9016.  
  9017. | 's_right' 
  9018.  
  9019. | 's_down' 
  9020.  
  9021. | 's_ins' 
  9022.  
  9023. | 's_del' 
  9024.  
  9025. | 's_padenter' 
  9026.  
  9027. | 's_space 
  9028.  
  9029. | 'a_0'..'a_9' 
  9030.  
  9031. | 'a_a'..'a_z' 
  9032.  
  9033. | 'a_f1'..'a_f12' 
  9034.  
  9035. | 'a_enter' 
  9036.  
  9037. | 'a_padenter' 
  9038.  
  9039. | 'a_backspace' 
  9040.  
  9041. | 'a_space' 
  9042.  
  9043. | 'a_minus' 
  9044.  
  9045. | 'a_equal' 
  9046.  
  9047. | 'a_leftbracket' 
  9048.  
  9049. | 'a_rightbracket' 
  9050.  
  9051. | 'a_tab' 
  9052.  
  9053. | 'a_quote' 
  9054.  
  9055. | 'a_comma' 
  9056.  
  9057. | 'a_period' 
  9058.  
  9059. | 'a_slash' 
  9060.  
  9061. | 'a_semicolon' 
  9062.  
  9063. | 'a_backslash' 
  9064.  
  9065. | 'c_0'..'c_9' 
  9066.  
  9067. | 'c_a'..'c_z' 
  9068.  
  9069. | 'c_f1'..'c_f12' 
  9070.  
  9071. | 'c_backslash' 
  9072.  
  9073. | 'c_backspace' 
  9074.  
  9075. | 'c_keyenter' 
  9076.  
  9077. | 'c_pagdown' 
  9078.                                | 'c_pgdn' 
  9079.  
  9080. | 'c_pageup' 
  9081.                                | 'c_pgup' 
  9082.  
  9083. | 'c_space' 
  9084.  
  9085. | 'c_quote' 
  9086.  
  9087. | 'c_comma' 
  9088.  
  9089. | 'c_period' 
  9090.  
  9091. | 'c_slash' 
  9092.  
  9093. | 'c_semicolon' 
  9094.  
  9095. | 'c_equal' 
  9096.  
  9097. | 'c_del' 
  9098.  
  9099. | 'c_down' 
  9100.  
  9101. | 'c_end' 
  9102.  
  9103. | 'c_enter' 
  9104.  
  9105. | 'c_home' 
  9106.  
  9107. | 'c_ins' 
  9108.  
  9109. | 'c_left' 
  9110.  
  9111. | 'c_leftbracket' 
  9112.  
  9113. | 'c_minus' 
  9114.  
  9115. | 'c_prtsc' 
  9116.  
  9117. | 'c_right' 
  9118.  
  9119. | 'c_rightbracket' 
  9120.  
  9121. | 'c_tab' 
  9122.  
  9123. | 'c_up' 
  9124.  
  9125. | 'c_padenter' 
  9126.                                | 'c_pad_enter' 
  9127.  
  9128. | 'otherkeys' 
  9129.                                | 'other_keys' 
  9130.  
  9131.  
  9132. ΓòÉΓòÉΓòÉ 8.2.12. statement_group ΓòÉΓòÉΓòÉ
  9133.  
  9134. statement_group ::=  { {';'}  statement ';' {';'} } 
  9135.  
  9136.  
  9137. ΓòÉΓòÉΓòÉ 8.2.13. statement ΓòÉΓòÉΓòÉ
  9138.  
  9139. statement ::=  assignment_statement 
  9140.  
  9141. | built-in_statement 
  9142.  
  9143. | conditional_statement 
  9144.  
  9145. | parse_statement 
  9146.  
  9147. | compiler_directive 
  9148.  
  9149. | procedure_call 
  9150.  
  9151. |  " ' "command" ' " All commands used in an E program must be quoted, e.g. 
  9152. if new=0 then       'edit' 
  9153.  
  9154.  
  9155. ΓòÉΓòÉΓòÉ 8.2.14. assignment_statement ΓòÉΓòÉΓòÉ
  9156.  
  9157. assignment_statement ::=  designator '=' expression 
  9158.  
  9159.  
  9160. ΓòÉΓòÉΓòÉ 8.2.15. designator ΓòÉΓòÉΓòÉ
  9161.  
  9162. designator ::=  identifier 
  9163.  
  9164. | identifier '.'  field 
  9165.  
  9166. | '.'  field 
  9167.  
  9168. | built-in_universal_variable 
  9169.  
  9170.  
  9171. ΓòÉΓòÉΓòÉ 8.2.16. field ΓòÉΓòÉΓòÉ
  9172.  
  9173. field ::=  'autosave' 
  9174.  
  9175. | 'col' 
  9176.  
  9177. | 'cursorx' 
  9178.  
  9179. | 'cursory' 
  9180.  
  9181. | 'dragcolor' 
  9182.  
  9183. | 'dragstyle' 
  9184.  
  9185. | 'dragthreshholdx' 
  9186.  
  9187. | 'dragthreshholdy' 
  9188.  
  9189. | 'filename' 
  9190.  
  9191. | 'fontheight' 
  9192.  
  9193. | 'fontwidth' 
  9194.  
  9195. | 'keyset' 
  9196.  
  9197. | 'last' 
  9198.  
  9199. | 'line' 
  9200.  
  9201. | 'lockhandle' 
  9202.  
  9203. | 'margins' 
  9204.  
  9205. | 'markcolor' 
  9206.  
  9207. | 'messagecolor' 
  9208.  
  9209. | 'messageline' 
  9210.  
  9211. | 'modify' 
  9212.  
  9213. | 'mousex' 
  9214.  
  9215. | 'mousey' 
  9216.  
  9217. | 'statuscolor' 
  9218.  
  9219. | 'statusline' 
  9220.  
  9221. | 'tabs' 
  9222.  
  9223. | 'textcolor' 
  9224.  
  9225. | 'userstring' 
  9226.  
  9227. | 'visible' 
  9228.  
  9229. | 'windowheight' 
  9230.  
  9231. | 'windowwidth' 
  9232.  
  9233. | 'windowx' 
  9234.  
  9235. | 'windowy' 
  9236.  
  9237.  
  9238. ΓòÉΓòÉΓòÉ 8.2.17. built-in_universal_variable ΓòÉΓòÉΓòÉ
  9239.  
  9240. built-in_universal_variable ::= CENTER_SEARCH 
  9241.  
  9242. | FUNCTIONKEYTEXT 
  9243.  
  9244. | JOIN_AFTER_WRAP 
  9245.  
  9246. | RC 
  9247.  
  9248. | EXIT_AFTER_LAST_FILE 
  9249.  
  9250. | TWO_SPACES 
  9251.  
  9252.  
  9253. ΓòÉΓòÉΓòÉ 8.2.18. built-in_statement ΓòÉΓòÉΓòÉ
  9254.  
  9255. built-in_statement ::= See individual statement. 
  9256.  
  9257.  
  9258. ΓòÉΓòÉΓòÉ 8.2.19. conditional_statement ΓòÉΓòÉΓòÉ
  9259.  
  9260. conditional_statement ::=  DO  i=expression  TO  expression [BY expression] 
  9261. statement_group  [LEAVE] [ITERATE] statement_group  (END | ENDDO) 
  9262.  
  9263. | DO FOREVER   statement_group  [LEAVE] [ITERATE] statement_group  (END | 
  9264. ENDDO) 
  9265.  
  9266. | DO WHILE expression   statement_group  [LEAVE] [ITERATE] statement_group 
  9267. (END | ENDDO) 
  9268.  
  9269. | FOR i=expression TO expression [BY expression]   statement_group  [LEAVE] 
  9270. [ITERATE] statement_group  ENDFOR 
  9271.  
  9272. | IF expression { ';' } THEN statement_group   {ELSEIF expression { ';' } THEN 
  9273. statement_group}   [ELSE statement_group]  { ';' }  ENDIF 
  9274.  
  9275. | LOOP   statement_group  [LEAVE] [ITERATE] statement_group  ENDLOOP 
  9276.  
  9277. | WHILE expression { ';' } DO   statement_group  [LEAVE] [ITERATE] 
  9278. statement_group  ENDWHILE 
  9279.  
  9280.  
  9281. ΓòÉΓòÉΓòÉ 8.2.20. parse_statement ΓòÉΓòÉΓòÉ
  9282.  
  9283. parse_statement ::=  PARSE ARG  {string | +number | -number |number | 
  9284. identifier } 
  9285.  
  9286. | PARSE VALUE expression   WITH {string | +number | -number |number | 
  9287. identifier } 
  9288.  
  9289.  
  9290. ΓòÉΓòÉΓòÉ 8.2.21. expression ΓòÉΓòÉΓòÉ
  9291.  
  9292. expression ::=  simple_expression [relation simple_expression] 
  9293.  
  9294.  
  9295. ΓòÉΓòÉΓòÉ 8.2.22. simple_expression ΓòÉΓòÉΓòÉ
  9296.  
  9297. simple_expression ::=  term  {operator  term} 
  9298.  
  9299.  
  9300. ΓòÉΓòÉΓòÉ 8.2.23. term ΓòÉΓòÉΓòÉ
  9301.  
  9302. term ::=  numeric_term 
  9303.  
  9304. | string 
  9305.  
  9306. | unary_operator term 
  9307.  
  9308. | '(' expression ')' 
  9309.  
  9310.  
  9311. ΓòÉΓòÉΓòÉ 8.2.24. arithmetic_expression ΓòÉΓòÉΓòÉ
  9312.  
  9313. arithmetic_expression ::=  arithmetic_term {arithmetic_operator 
  9314. arithmetic_term} 
  9315.  
  9316.  
  9317. ΓòÉΓòÉΓòÉ 8.2.25. arithmetic_term ΓòÉΓòÉΓòÉ
  9318.  
  9319. arithmetic_term ::=  '('arithmetic_expression')' 
  9320.  
  9321. | number 
  9322.  
  9323. | hex_number 
  9324.  
  9325. | octal_number 
  9326.  
  9327. | [numeric_unary_operator] arithmetic_term 
  9328.  
  9329.  
  9330. ΓòÉΓòÉΓòÉ 8.2.26. numeric_expression ΓòÉΓòÉΓòÉ
  9331.  
  9332. numeric_expression ::=  numeric_term {numeric_operator  numeric_term} 
  9333.  
  9334.  
  9335. ΓòÉΓòÉΓòÉ 8.2.27. numeric_term ΓòÉΓòÉΓòÉ
  9336.  
  9337. numeric_term ::=  number 
  9338.  
  9339. | designator 
  9340.  
  9341. | '('numeric_expression')' 
  9342.  
  9343. | procedure_call 
  9344.  
  9345. | numeric_unary_operator numeric_term 
  9346.  
  9347.  
  9348. ΓòÉΓòÉΓòÉ 8.2.28. string_expression ΓòÉΓòÉΓòÉ
  9349.  
  9350. string_expression ::=  string 
  9351.  
  9352. | designator 
  9353.  
  9354. | procedure_call 
  9355.  
  9356.  
  9357. ΓòÉΓòÉΓòÉ 8.2.29. constant_expression ΓòÉΓòÉΓòÉ
  9358.  
  9359. constant_expression ::=   simple_constant_expression  [ relation 
  9360. simple_constant_expression ] 
  9361.  
  9362.  
  9363. ΓòÉΓòÉΓòÉ 8.2.30. simple_constant_expression ΓòÉΓòÉΓòÉ
  9364.  
  9365. simple_constant_expression ::=   constant_term { operator  constant_term } 
  9366.  
  9367.  
  9368. ΓòÉΓòÉΓòÉ 8.2.31. constant_term ΓòÉΓòÉΓòÉ
  9369.  
  9370. constant_term ::=   number 
  9371.  
  9372. | designator 
  9373.  
  9374. | '('simple_constant_expression')' 
  9375.  
  9376. | unary_operator  constant_term 
  9377.  
  9378. | string 
  9379.  
  9380.  
  9381. ΓòÉΓòÉΓòÉ 8.2.32. relation ΓòÉΓòÉΓòÉ
  9382.  
  9383. relation ::=  '==' 
  9384.  
  9385. | '/==' 
  9386.  
  9387. | '=' 
  9388.  
  9389. | '<>' 
  9390.  
  9391. | '<=' 
  9392.  
  9393. | '>=' 
  9394.  
  9395. | '<' 
  9396.  
  9397. | '>' 
  9398.  
  9399.  
  9400. ΓòÉΓòÉΓòÉ 8.2.33. operator ΓòÉΓòÉΓòÉ
  9401.  
  9402. operator ::=  numeric_operator 
  9403.  
  9404. | AND 
  9405.  
  9406. | '&' 
  9407.  
  9408. | OR 
  9409.  
  9410. | '|' 
  9411.  
  9412. | '||' 
  9413.  
  9414. | spaces 
  9415.  
  9416.  
  9417. ΓòÉΓòÉΓòÉ 8.2.34. spaces ΓòÉΓòÉΓòÉ
  9418.  
  9419. spaces ::=  (' '|'\t')  spaces 
  9420.  
  9421.  
  9422. ΓòÉΓòÉΓòÉ 8.2.35. numeric_operator ΓòÉΓòÉΓòÉ
  9423.  
  9424. numeric_operator ::=  arithmetic_operator 
  9425.  
  9426. | '//' 
  9427.  
  9428. | '%' 
  9429.  
  9430.  
  9431. ΓòÉΓòÉΓòÉ 8.2.36. arithmetic_operator ΓòÉΓòÉΓòÉ
  9432.  
  9433. arithmetic_operator ::=  '+' 
  9434.  
  9435. | '-' 
  9436.  
  9437. | '*' 
  9438.  
  9439. | '/' 
  9440.  
  9441.  
  9442. ΓòÉΓòÉΓòÉ 8.2.37. unary_operator ΓòÉΓòÉΓòÉ
  9443.  
  9444. unary_operator ::=  NOT 
  9445.  
  9446. | numeric_unary_operator 
  9447.  
  9448.  
  9449. ΓòÉΓòÉΓòÉ 8.2.38. numeric_unary_operator ΓòÉΓòÉΓòÉ
  9450.  
  9451. numeric_unary_operator ::=  '+' 
  9452.  
  9453. | '-' 
  9454.  
  9455.  
  9456. ΓòÉΓòÉΓòÉ 8.2.39. procedure_call ΓòÉΓòÉΓòÉ
  9457.  
  9458. procedure_call ::=  user_defined_proc_call 
  9459.  
  9460. | built-in_proc_call 
  9461.  
  9462.  
  9463. ΓòÉΓòÉΓòÉ 8.2.40. user_defined_proc_call ΓòÉΓòÉΓòÉ
  9464.  
  9465. user_defined_proc_call ::=  identifier '(' [expression_list] ')' 
  9466.  
  9467.  
  9468. ΓòÉΓòÉΓòÉ 8.2.41. built-in_proc_call ΓòÉΓòÉΓòÉ
  9469.  
  9470. built-in_proc_call ::= See individual procedure. 
  9471.  
  9472.  
  9473. ΓòÉΓòÉΓòÉ 8.2.42. command ΓòÉΓòÉΓòÉ
  9474.  
  9475. command ::=  macro-defined_command 
  9476.  
  9477. | internal_command 
  9478.  
  9479. | dos_command 
  9480.  
  9481.  
  9482. ΓòÉΓòÉΓòÉ 8.2.43. internal_command ΓòÉΓòÉΓòÉ
  9483.  
  9484. internal_command ::=  NUMBER 
  9485.  
  9486. |  '+' [number] 
  9487.  
  9488. |  '-' [number] 
  9489.  
  9490. | 'C/' unquoted_string '/' unquoted_string '/' ['-'] ['+'] ['*'] ['m'] ['a'] 
  9491. ['c'] ['e'] ['r'] ['f'] ['g'] 
  9492.  
  9493. | ( 'E' | 'ED' | 'EDIT' )  {['/d'] ['/e'] ['/n'] ['='] unquoted_string} 
  9494. [quoted_string] 
  9495.  
  9496. | ( 'F' | 'FILE' ) ['/t'] [unquoted_string] 
  9497.  
  9498. | ( 'L/' | '/' ) unquoted_string '/' unquoted_string'/' ['-'] ['+'] ['m'] ['a'] 
  9499. ['c'] ['e'] ['r'] ['f'] ['g'] 
  9500.  
  9501. | ( 'MA' | 'MARGINS' ) [number_list3] 
  9502.  
  9503. | ( 'N' | 'NAME' ) [unquoted_string] 
  9504.  
  9505. | ( 'O' | 'OPEN' ) {[ options ] filespec } 
  9506.  
  9507. | 'OS2' string_expression 
  9508.  
  9509. | ( 'Q' | 'QUIT' ) 
  9510.  
  9511. | ( 'S' | 'SAVE' ) ['/t'] [unquoted_string] 
  9512.  
  9513. | 'TABS' number_list3 
  9514.  
  9515. | 'VER' 
  9516.  
  9517. | 'XCOM' internal_command 
  9518.  
  9519.  
  9520. ΓòÉΓòÉΓòÉ 8.2.44. macro-defined_command ΓòÉΓòÉΓòÉ
  9521.  
  9522. macro-defined_command ::=  'ADD' 
  9523.  
  9524. | 'ALL' '/' searchstring ['/'][c] 
  9525.  
  9526. | ( 'APPEND' | 'APP' ) [unquoted_string] 
  9527.  
  9528. | 'ASC' ( character ) 
  9529.  
  9530. | 'AUTOSAVE' [ ( number | 'on' | 'off') ] 
  9531.  
  9532. | 'AUTOSAVEDLG' 
  9533.  
  9534. | 'AUTOSHELL' ( ['0' | '1' ] ) 
  9535.  
  9536. | ( 'BOTTOM' | 'BOT' ) 
  9537.  
  9538. | 'BOX' ('1' | '2' | '3' | '4' | '5' | '6' | 'C' | 'P' | 'A' | 'E' | 'R' | 
  9539. '/'character) 
  9540.  
  9541. | 'BROWSE' ( ['ON' | 'OFF' | '?'] ) 
  9542.  
  9543. | 'CD'  [unquoted_string] 
  9544.  
  9545. | ( 'CHANGE' | 'C' )  '/' find_text '/' replace_text ['/' [-] [+] [*] [M] [A] 
  9546. [C] [E] [R] [F] [G] ] 
  9547.  
  9548. | 'CHANGEDLG' 
  9549.  
  9550. | 'CENTER' 
  9551.  
  9552. | 'CHR' number 
  9553.  
  9554. | 'CLOSE' 
  9555.  
  9556. | 'COMMANDLINE [ string_expression ] 
  9557.  
  9558. | 'CUT' 
  9559.  
  9560. | 'DIR' [ path ] 
  9561.  
  9562. | 'DOLINES' 
  9563.  
  9564. | 'DPATH' 
  9565.  
  9566. | 'DRAW' ('1' | '2' | '3' | '4' | '5' | '6' | 'B' | '/'character) 
  9567.  
  9568. | 'ECHO' ('on' | 'off') 
  9569.  
  9570. | ( 'ETPM' | 'ET' ) ['/e' unquoted_string] ['/u'] 
  9571.  
  9572.   [unquoted_string  [unquoted_string] ] 
  9573.  
  9574. | 'EXPAND' ['on' | 'off'] 
  9575.  
  9576. | 'FILL' character 
  9577.  
  9578. | 'FINDDLG' 
  9579.  
  9580. | ( 'FINDFILE' | 'FILEFIND' ) unquoted_string 
  9581.  
  9582. | 'GET' unquoted_string 
  9583.  
  9584. | 'HELP' 
  9585.  
  9586. | 'KEY' ( number ' ' character ) 
  9587.  
  9588. | 'LINK' ( filespec ) 
  9589.  
  9590. | 'LIST' [unquoted_string] 
  9591.  
  9592. | 'LOCK' ( [ filespec ] ) 
  9593.  
  9594. | 'LOOPKEY' ( number | 'all' ) 
  9595.  
  9596. | 'LOWERCASE' 
  9597.  
  9598. | 'MARGINSDLG' 
  9599.  
  9600. | 'MARKWORD' 
  9601.  
  9602. | 'MATCHTAB' ['on' | 'off'] 
  9603.  
  9604. | 'MATH' arithmetic_expression 
  9605.  
  9606. | 'MATHO' arithmetic_expression 
  9607.  
  9608. | 'MATHX' arithmetic_expression 
  9609.  
  9610. | 'MESSAGEBOX' 
  9611.  
  9612. | 'MULT' 
  9613.  
  9614. | 'OPENDLG' 
  9615.  
  9616. | 'PASTE' 
  9617.  
  9618. | 'PATH' 
  9619.  
  9620. | 'PRINT' [ printer_name ] 
  9621.  
  9622. | 'PROCESSBREAK' 
  9623.  
  9624. | 'PROOF' 
  9625.  
  9626. | 'PROOFWORD' 
  9627.  
  9628. | 'PUT' [unquoted_string] 
  9629.  
  9630. | 'QCONTROL' idnum 
  9631.  
  9632. | ( 'QDATE' | 'QD' ) 
  9633.  
  9634. | ( 'QL' | 'QLINK' | 'QLINKED' ) 
  9635.  
  9636. | ( 'QUIETSHELL' | 'QS' ) 
  9637.  
  9638. | ( 'QTIME' | 'QT' ) 
  9639.  
  9640. | 'RC' command 
  9641.  
  9642. | 'RELINK'  [ filename ] 
  9643.  
  9644. | 'SET' 
  9645.  
  9646. | 'SETSCROLLS' 
  9647.  
  9648. | ( 'SORT' | 'SORTDLL' )  [ 'R' ] [ 'C' ] 
  9649.  
  9650. | 'STAY' ( 'ON' | 'OFF' ) 
  9651.  
  9652. | 'STDFILE_READ' 
  9653.  
  9654. | 'STDFILE_WRITE' 
  9655.  
  9656. | 'TABS' { numeric_expression } 
  9657.  
  9658. | 'TOGGLECONTROL' numeric_expression [, '0' | '1' ] 
  9659.  
  9660. | 'TOGGLEFONT' 
  9661.  
  9662. | 'TOP' 
  9663.  
  9664. | 'UNLINK' [ filespec ] 
  9665.  
  9666. | 'UNLOCK' filespec 
  9667.  
  9668. | 'UPPERCASE' 
  9669.  
  9670. | 'VOL' 
  9671.  
  9672.  
  9673. ΓòÉΓòÉΓòÉ 8.2.45. dos_command ΓòÉΓòÉΓòÉ
  9674.  
  9675. dos_command ::=  Any command recognized and interpreted by the current 
  9676. operating system, whether that is DOS or OS/2. 
  9677.  
  9678.  
  9679. ΓòÉΓòÉΓòÉ 8.2.46. expression_list ΓòÉΓòÉΓòÉ
  9680.  
  9681. expression_list ::=  expression { {';'} [','] {';'} expression } 
  9682.  
  9683.  
  9684. ΓòÉΓòÉΓòÉ 8.2.47. identifier ΓòÉΓòÉΓòÉ
  9685.  
  9686. identifier ::=  letter {letter |  digit | '_' } 
  9687.  
  9688.  
  9689. ΓòÉΓòÉΓòÉ 8.2.48. identifier_list ΓòÉΓòÉΓòÉ
  9690.  
  9691. identifier_list ::=  identifier [spaces  identifier [spaces  identifier [spaces 
  9692. identifier . . . ] ] ] 
  9693.  
  9694.  
  9695. ΓòÉΓòÉΓòÉ 8.2.49. unquoted_string ΓòÉΓòÉΓòÉ
  9696.  
  9697. unquoted_string ::=  {character} 
  9698.  
  9699.  
  9700. ΓòÉΓòÉΓòÉ 8.2.50. string ΓòÉΓòÉΓòÉ
  9701.  
  9702. string ::=  " ' " {character} " ' " 
  9703.  
  9704. | ' " ' {character} ' " ' 
  9705.  
  9706. | esc_code 
  9707.  
  9708.  
  9709. ΓòÉΓòÉΓòÉ 8.2.51. letter ΓòÉΓòÉΓòÉ
  9710.  
  9711. letter ::=  'a' .. 'z' | 'A' .. 'Z' 
  9712.  
  9713.  
  9714. ΓòÉΓòÉΓòÉ 8.2.52. character ΓòÉΓòÉΓòÉ
  9715.  
  9716. character ::=  any character whose ASCII value is between 0 and 255 
  9717.  
  9718.  
  9719. ΓòÉΓòÉΓòÉ 8.2.53. printable_char ΓòÉΓòÉΓòÉ
  9720.  
  9721. printable_char ::=  any character whose ASCII value is between 0 and 255 
  9722.  
  9723.  
  9724. ΓòÉΓòÉΓòÉ 8.2.54. esc_code ΓòÉΓòÉΓòÉ
  9725.  
  9726. esc_code ::=  '\' ('n' | 't' | 'b' | 'r' | 'f') 
  9727.  
  9728. | '\'  digit [digit [digit] ] 
  9729.  
  9730. | '\'x  hex_digit [hex_digit] 
  9731.  
  9732.  
  9733. ΓòÉΓòÉΓòÉ 8.2.55. hex_number ΓòÉΓòÉΓòÉ
  9734.  
  9735. hex_number ::=  'x'hex_digit {hex_digit} 
  9736.  
  9737.  
  9738. ΓòÉΓòÉΓòÉ 8.2.56. octal_number ΓòÉΓòÉΓòÉ
  9739.  
  9740. octal_number ::=  'o'octal_digit {octal_digit} 
  9741.  
  9742.  
  9743. ΓòÉΓòÉΓòÉ 8.2.57. octal_digit ΓòÉΓòÉΓòÉ
  9744.  
  9745. octal_digit ::=  '0'..'7' 
  9746.  
  9747.  
  9748. ΓòÉΓòÉΓòÉ 8.2.58. hex_digit ΓòÉΓòÉΓòÉ
  9749.  
  9750. hexdigit ::=  (number | 'a' .. 'f' | 'A' .. 'F' ) 
  9751.  
  9752.  
  9753. ΓòÉΓòÉΓòÉ 8.2.59. number ΓòÉΓòÉΓòÉ
  9754.  
  9755. number ::=  digit{digit} 
  9756.  
  9757.  
  9758. ΓòÉΓòÉΓòÉ 8.2.60. digit ΓòÉΓòÉΓòÉ
  9759.  
  9760. digit ::=  '0' .. '9' 
  9761.  
  9762.  
  9763. ΓòÉΓòÉΓòÉ 8.2.61. number_list2 ΓòÉΓòÉΓòÉ
  9764.  
  9765. number_list2 ::=  number  [spaces  number] 
  9766.  
  9767.  
  9768. ΓòÉΓòÉΓòÉ 8.2.62. number_list3 ΓòÉΓòÉΓòÉ
  9769.  
  9770. number_list3 ::=  number  [spaces  number  [ spaces  number] ] 
  9771.  
  9772.  
  9773. ΓòÉΓòÉΓòÉ 8.2.63. number_list4 ΓòÉΓòÉΓòÉ
  9774.  
  9775. number_list4 ::=  number  [spaces  number  [ spaces  number  [spaces  number] ] 
  9776.  
  9777.  
  9778. ΓòÉΓòÉΓòÉ 9. Summary of Keywords, Procedures, Variables, and Keys ΓòÉΓòÉΓòÉ
  9779.  
  9780. Summary of keywords, procedures, variables and keys. 
  9781.  
  9782.  
  9783. ΓòÉΓòÉΓòÉ 9.1. Built-in Statement and Procedure Summary ΓòÉΓòÉΓòÉ
  9784.  
  9785. In this section all of E's internal procedure and statements are listed 
  9786. followed by a brief description.  See Built-in Statements and Procedures for 
  9787. more complete descriptions and parameters.  Procedures are followed by 
  9788. parentheses and can return values. Statements have no parentheses, return 
  9789. nothing, and generally perform some operation on the screen. Both statements 
  9790. and procedures can be followed by arguments.  Procedure arguments must within 
  9791. the parentheses. 
  9792.  
  9793. ABBREV() 
  9794.                     returns 1 if one string is an abbreviation of another 
  9795. ACTIVATEFILE 
  9796.                     makes a file the current file 
  9797. ADDRESS() 
  9798.                     returns the address of a variable 
  9799. ADJUSTBLOCK 
  9800.                     moves a marked area by overlaying 
  9801. ADJUST_BLOCK 
  9802.                     same as ADJUSTBLOCK 
  9803. ADJUSTMARK 
  9804.                     same as ADJUSTBLOCK for any marked type 
  9805. ADJUST_MARK 
  9806.                     same as ADJUSTMARK 
  9807. ARG() 
  9808.                     returns an argument 
  9809. ASC() 
  9810.                     determins an ASCII value 
  9811. ATOI() 
  9812.                     converts a string to integer 
  9813. ATOL() 
  9814.                     converts a string to a long integer 
  9815. ATTRIBUTE_ACTION 
  9816.                     does an attribute action 
  9817. BACKTAB 
  9818.                     moves cursor to previous tab 
  9819. BACKTABWORD 
  9820.                     moves cursor to beginning of last word 
  9821. BACKTAB_WORD 
  9822.                     same as BACKTABWORD 
  9823. BEEP() 
  9824.                     emits a noise 
  9825. BEGINLINE 
  9826.                     moves cursor to beginning of line 
  9827. BEGIN_LINE 
  9828.                     same as BEGINLINE 
  9829. BOT 
  9830.                     goes to the bottom of the file 
  9831. BOTTOM 
  9832.                     same as BOT 
  9833. BEGINLINE 
  9834.                     moves cursor to beginning of the line 
  9835. BEGIN_LINE 
  9836.                     same as BEGIN_LINE 
  9837. BROWSE() 
  9838.                     turns browse mode on/off 
  9839. BUFFER() 
  9840.                     allows shared buffers 
  9841. BUILDMENUITEM 
  9842.                     builds an action bar menu item 
  9843. BUILDSUBMENU 
  9844.                     builds an action bar sub menu item 
  9845. CALL 
  9846.                     executes a procedure 
  9847. CENTER 
  9848.                     centers a string in a given length field 
  9849. CENTRE 
  9850.                     centers a string in a given length field 
  9851. CHR() 
  9852.                     finds the character from an ASCII value 
  9853. COMPARE 
  9854.                     compares two strings; returns the character position of the 
  9855.                     first difference 
  9856. COPIES 
  9857.                     returns n copies of the given string 
  9858. COPYMARK 
  9859.                     copies marked to text to the cursor pos. 
  9860. COPY_MARK 
  9861.                     same as COPYMARK 
  9862. COUNT() 
  9863.                     returns the number of occurrances of one string in another 
  9864. C2X() 
  9865.                     returns the printable hex representation of a binary string 
  9866. DELETE 
  9867.                     deletes the line the cursor is on 
  9868. DELETECHAR 
  9869.                     deletes the character under the cursor 
  9870. DELETE_CHAR 
  9871.                     same as DELETECHAR 
  9872. DELETELINE 
  9873.                     deletes a line of text 
  9874. DELETEMARK 
  9875.                     removes marked text 
  9876. DELETE_MARK 
  9877.                     same as DELETEMARK 
  9878. DELETEMENU 
  9879.                     removes an action bar menu item or subitem 
  9880. DELSTR 
  9881.                     deletes a substring of a string 
  9882. DELWORD 
  9883.                     deletes a phrase from a string 
  9884. DIRECTORY( [path]) 
  9885.                     returns current directory; if path is given, changes 
  9886.                     current directory first 
  9887. DISPLAY 
  9888.                     allows screen updating etc. to be toggled 
  9889. DO 
  9890.                     start of an iteration routine 
  9891. DO_ARRAY 
  9892.                     handles arrays in E 
  9893. DO_OVERLAYWINDOWS 
  9894.                     is undisclosed 
  9895. DOWN 
  9896.                     moves the cursor down a line 
  9897. DYNAFREE() 
  9898.                     releases a dynalink library 
  9899. DYNALINK() 
  9900.                     allows PM calls thru C code 
  9901. DYNALINKC() 
  9902.                     same as DYNALINK but in C format 
  9903. DYNALINK32() 
  9904.                     same as DYNALINKC but for calling 32-bit code 
  9905. ECHO() 
  9906.                     performs a command execution trace 
  9907. ENDLINE 
  9908.                     moves the cursor to the end of line 
  9909. END_LINE 
  9910.                     same as ENDLINE 
  9911. ERASEENDLINE 
  9912.                     erases text to the end of line 
  9913. ERASE_END_LINE 
  9914.                     same as ERASEENDLINE 
  9915. EXECUTE 
  9916.                     executes the command dialog box 
  9917. EXECUTEKEY 
  9918.                     executes the key specified 
  9919. EXIT 
  9920.                     exits from the current macro 
  9921. FILESINRING 
  9922.                     returns the number of files in the ring 
  9923. FILESIZE 
  9924.                     returns the sum of the lengths of all lines in the file 
  9925. FILLMARK 
  9926.                     fills the marked area 
  9927. FILL_MARK 
  9928.                     same as FILLMARK 
  9929. FINDFILE 
  9930.                     finds a file path 
  9931. FOR 
  9932.                     begining of an iterative loop 
  9933. GETFILEID 
  9934.                     gets a file id number 
  9935. GETKEYSTATE() 
  9936.                     gets the shift state of keys 
  9937. GET_KEY_STATE 
  9938.                     same as GETKEYSTATE 
  9939. GETLINE 
  9940.                     returns the current text line 
  9941. GETMARK 
  9942.                     gets the type of mark 
  9943. GETPMINFO() 
  9944.                     returns PM information 
  9945. GETSEARCH 
  9946.                     saves the last search string 
  9947. GET_SEARCH 
  9948.                     same as SETSEARCH 
  9949. HEX() 
  9950.                     returns the hex value of a char. 
  9951. IF - THEN - ELSE 
  9952.                     the beginning of a conditional stmt. 
  9953. INCLUDE 
  9954.                     includes another E file 
  9955. INSERT 
  9956.                     inserts a blank line 
  9957. INSERT_ATTRIBUTE 
  9958.                     inserts an attribute 
  9959. INSERTLINE 
  9960.                     inserts a line at a specified location 
  9961. INSERTSTATE() 
  9962.                     returns insert/replace mode 
  9963. INSERT_STATE() 
  9964.                     same as INSERTSTATE() 
  9965. INSERTSTR 
  9966.                     inserts a string into another string 
  9967. INSERTTOGGLE 
  9968.                     toggles the insert/replace modes 
  9969. INSERT_TOGGLE 
  9970.                     same as INSERTTOGGLE 
  9971. ISADEFC() 
  9972.                     tells if a given command has been defined 
  9973. ISADEFPROC() 
  9974.                     tells if a given procedure has been defined 
  9975. ISADIRTYLINE() 
  9976.                     tells if the current line has been modified and not yet 
  9977.                     "checked in" 
  9978. ITERATE 
  9979.                     part of a repeat loop 
  9980. ITOA() 
  9981.                     converts a integer to string 
  9982. JOIN 
  9983.                     joins two lines 
  9984. KEY 
  9985.                     executes the key specified 
  9986. KEYIN 
  9987.                     enters text into the file 
  9988. KEYS 
  9989.                     actives a keyset name 
  9990. LASTERROR() 
  9991.                     returns the last error code 
  9992. LAST_ERROR() 
  9993.                     same as LASTERROR 
  9994. LASTKEY() 
  9995.                     returns the last key hit 
  9996. LASTPOS() 
  9997.                     finds text in the file 
  9998. LEAVE 
  9999.                     leaves a repetitive loop 
  10000. LEFT 
  10001.                     moves the cursor one column left 
  10002. LEFTSTR() 
  10003.                     returns the leftmost n characters of a string 
  10004. LENGTH() 
  10005.                     retuns the length of a string 
  10006. LEXAM() 
  10007.                     access the dictionary functions 
  10008. LINK 
  10009.                     links an .EX module into EPM 
  10010. LINKED() 
  10011.                     returns if a module is linked 
  10012. LONGESTLINE() 
  10013.                     returns the length of the longest line in the file 
  10014. LOOP 
  10015.                     a iterative looping command 
  10016. LOWCASE() 
  10017.                     lowers the case on a string 
  10018. LTOA() 
  10019.                     converts a string to a long integer 
  10020. MACHINE() 
  10021.                     returns the type of Operating System 
  10022. MARKBLOCK 
  10023.                     issues a block-type mark 
  10024. MARK_BLOCK 
  10025.                     same as a MARKBLOCK 
  10026. MARKCHAR 
  10027.                     issues a character-type mark 
  10028. MARK_CHAR 
  10029.                     same as a MARKCHAR 
  10030. MARKLINE 
  10031.                     issues a line-type mark 
  10032. MARK_LINE 
  10033.                     same as a MARKLINE 
  10034. MARKTYPE() 
  10035.                     returns the marktype set 
  10036. MEMCPYX() 
  10037.                     copies information from one memory location to another 
  10038. MOUSE_SETPOINTER 
  10039.                     sets the mouse pointer 
  10040. MOVEMARK 
  10041.                     moves marked text to the cursor pos. 
  10042. MOVE_MARK 
  10043.                     same as MOVEMARK 
  10044. NEXTFILE 
  10045.                     actives the next file in the ring 
  10046. NEXT_FILE 
  10047.                     same as NEXTFILE 
  10048. OFFSET() 
  10049.                     returns the offset in binary 
  10050. OFS() 
  10051.                     returns the offset in a string format 
  10052. OVERLAY 
  10053.                     allows the overlay of strings 
  10054. OVERLAYBLOCK 
  10055.                     copies marked text without inserting 
  10056. OVERLAY_BLOCK 
  10057.                     same as OVERLAY_BLOCK 
  10058. PAGEDOWN 
  10059.                     moves the cursor one page down 
  10060. PAGE_DOWN 
  10061.                     same as PAGEDOWN 
  10062. PAGEUP 
  10063.                     moves the cursor one page up 
  10064. PAGE_UP 
  10065.                     same as PAGEUP 
  10066. PARSE 
  10067.                     parses a string 
  10068. PEEK() 
  10069.                     looks up a memory location value 
  10070. PEEKZ() 
  10071.                     returns an ASCIIZ string from memory 
  10072. POKE() 
  10073.                     inserts a value into a memory location 
  10074. PREVFILE 
  10075.                     moves to the previous file 
  10076. QUERY_ATTRIBUTE 
  10077.                     determines the attribute type set 
  10078. QUERYMENUSTRING 
  10079.                     get the command associated with an menu option 
  10080. QUERYPROFILE() 
  10081.                     gets a string from OS2.INI 
  10082. QUIETSHELL 
  10083.                     allows an OS/2 command to be executed 
  10084. REFLOW 
  10085.                     reformats text 
  10086. REFRESH 
  10087.                     updates the screen 
  10088. RELINK 
  10089.                     compiles and links .E modules 
  10090. REPEATFIND 
  10091.                     finds the next occurrence of a search 
  10092. REPEAT_FIND 
  10093.                     same as REPEATFIND 
  10094. REPLACELINE 
  10095.                     replaces a line with new text 
  10096. RETURN 
  10097.                     returns an expression to the caller 
  10098. REVERSE() 
  10099.                     returns the reverse of a string 
  10100. RIGHT 
  10101.                     moves the cursor one column right 
  10102. RIGHTSTR() 
  10103.                     returns the rightmost n characters of a string 
  10104. RUBOUT 
  10105.                     deletes the character to the left 
  10106. SAYAT 
  10107.                     writes text at a location on the screen 
  10108. SAY_AT 
  10109.                     same as SAYAT 
  10110. SAYERROR 
  10111.                     displays an error code or a message 
  10112. SAYERROR() 
  10113.                     displays a message 
  10114. SAYERRORTEXT() 
  10115.                     returns the error message associated with a given error 
  10116.                     code 
  10117. SCREENHEIGHT() 
  10118.                     returns the screen height 
  10119. SCREENWIDTH() 
  10120.                     returns the screen width 
  10121. SEG() 
  10122.                     returns the segment address as a string 
  10123. SELECTOR() 
  10124.                     returns the segment address in binary 
  10125. SETPROFILE() 
  10126.                     sets a string in OS2.INI 
  10127. SETSEARCH 
  10128.                     sets the search command string 
  10129. SET_SEARCH 
  10130.                     same as SETSEARCH 
  10131. SHIFTLEFT 
  10132.                     shifts marked text one position left 
  10133. SHIFT_LEFT 
  10134.                     same as SHIFTLEFT 
  10135. SHIFTRIGHT 
  10136.                     shifts marked text one position right 
  10137. SHIFT_RIGHT 
  10138.                     same as SHIFTRIGHT 
  10139. SHOWMENU 
  10140.                     displays a newly built action bar menu 
  10141. SPLIT 
  10142.                     splits a line of text into two lines 
  10143. STOP 
  10144.                     stops execution of a macro 
  10145. STOPONRC 
  10146.                     stops only if RC is non-zero 
  10147. STOP_ON_RC 
  10148.                     same as STOPONRC 
  10149. STRIP() 
  10150.                     strips away extra spaces 
  10151. SUBSTR() 
  10152.                     returns a sub-string from within a string 
  10153. SUBWORD 
  10154.                     returns a phrase from a string 
  10155. TAB 
  10156.                     moves to the next tab stop 
  10157. TABWORD 
  10158.                     moves to the beginning of the next word 
  10159. TAB_WORD 
  10160.                     same as TABWORD 
  10161. TEXTLINE() 
  10162.                     gets the contents of the indicated line 
  10163. TOP 
  10164.                     moves to the top of the file 
  10165. TRANSLATE() 
  10166.                     translates a string according to a given translate table 
  10167. TRYINCLUDE 
  10168.                     attempts to include a .E file 
  10169. UNDO 
  10170.                     undoes changes on a line 
  10171. UNLINK 
  10172.                     removes a .EX module from EPM 
  10173. UNMARK 
  10174.                     unmarks text 
  10175. UP 
  10176.                     moves the cursor up one key 
  10177. UPCASE() 
  10178.                     converts a string to upper case 
  10179. VER() 
  10180.                     returns the version number 
  10181. VERIFY() 
  10182.                     makes sure a string is valid in a set 
  10183. WINMESSAGEBOX() 
  10184.                     does a Dynalink call to the PM WinMessageBox function 
  10185. WORD() 
  10186.                     returns the nthe word of a string 
  10187. WORDINDEX() 
  10188.                     returns the character position of a word in a string 
  10189. WORDLENGTH() 
  10190.                     returns the length of a word in a string 
  10191. WORDPOS() 
  10192.                     returns the position of a phrase in a string 
  10193. WORDS() 
  10194.                     returns the number of words in a string 
  10195. WHILE 
  10196.                     a conditional repetitive statement 
  10197.  
  10198.  
  10199. ΓòÉΓòÉΓòÉ 9.2. Command Summary ΓòÉΓòÉΓòÉ
  10200.  
  10201. These commands can be issued from within the command line dialog box or from 
  10202. within a program. When used within the E language they must be surrounded by 
  10203. quotation marks. For example: 
  10204.  
  10205.   `CD'
  10206. or
  10207.   `CD C:\EPM\FILES'
  10208. or
  10209.   `CD` mypath
  10210.  
  10211. In the first example the macro command CD will be executed as if the user typed 
  10212. it in on the command line dialog. In the second example CD was issued with an 
  10213. argument. And in the third example, the argument was a variable name. For more 
  10214. information on the commands and their syntax see The EPM User's Guide and 
  10215. Commands Omitted From the User's Guide in this manual. 
  10216.  
  10217. #### 
  10218.                     goes to line number #### 
  10219. + [####] 
  10220.                     moves cursor forward #### lines. 
  10221. -  [####] 
  10222.                     moves cursor backward #### lines. 
  10223. /find_string/[options] 
  10224.                     same as 'L' command 
  10225. ACTIVATEFILEID 
  10226.                     activates the file specified 
  10227. ADD 
  10228.                     adds a marked block of numbers 
  10229. ALL 
  10230.                     if included, it finds all occurrences of a given string in 
  10231.                     the current file 
  10232. APP 
  10233.                     appends marked text to a file 
  10234. APPEND 
  10235.                     same as APP 
  10236. ASC 
  10237.                     determines the ASCII value of a char. 
  10238. AUTOSAVE 
  10239.                     sets the AUTOSAVE field value 
  10240. AUTOSAVEDLG 
  10241.                     brings up the AUTOSAVE dialog box 
  10242. AUTOSHELL 
  10243.                     turns AUTOSHELLing on or off 
  10244. BOT 
  10245.                     goes to the bottom of the file 
  10246. BOTTOM 
  10247.                     same as BOT 
  10248. BOX 
  10249.                     draws a box of specified style around block mark. (See 
  10250.                     BOX.E) 
  10251. BROWSE 
  10252.                     make the file read-only or read-write 
  10253.                     changes text strings 
  10254. CD 
  10255.                     changes the default drive/path 
  10256. CENTER 
  10257.                     centers marked text 
  10258. CHANGE 
  10259.                     same as C 
  10260. CHANGEDLG 
  10261.                     brings up the change dialog box 
  10262. CHR 
  10263.                     displays the character associated 
  10264. CLEARSHARBUFF 
  10265.                     clears the shared buffer 
  10266. CLOSE 
  10267.                     closes files in the ring 
  10268. COMMANDLINE 
  10269.                     brings up the command line dialog box 
  10270. COPY2DMBUFF 
  10271.                     copies marked area to "Delete Mark" buffer 
  10272. COPY2SHARBUFF 
  10273.                     copies marked area to shared buffer 
  10274. CURSOROFF 
  10275.                     turns the cursor off 
  10276. CUT 
  10277.                     moves marked text to the shared buffer 
  10278. DIR 
  10279.                     lists the directory in a temp. file 
  10280. DOLINES 
  10281.                     executes the current line or marked lines 
  10282. DPATH 
  10283.                     shows the DPATH setting 
  10284. DRAW 
  10285.                     enters draw mode 
  10286. DUPMARK 
  10287.                     executes a mark action specified 
  10288. ECHO 
  10289.                     turns command trace on 
  10290.                     edit a file 
  10291. ED 
  10292.                     same as E 
  10293. EDIT 
  10294.                     same as E and ED 
  10295. ET 
  10296.                     invoke the compiler 
  10297. ETPM 
  10298.                     same as ET 
  10299. EXPAND 
  10300.                     turns syntax expansion on/off 
  10301.                     saves and quit the current file 
  10302. FILE 
  10303.                     same as F 
  10304. FILEFIND 
  10305.                     attempts to find a file 
  10306. FILL 
  10307.                     fills the marked block with a character 
  10308. FINDDLG 
  10309.                     invokes the find dialog box 
  10310. FINDFILE 
  10311.                     same as FILEFIND 
  10312. GET 
  10313.                     gets the file into the current file 
  10314. GETDMBUFF 
  10315.                     gets text from the delete mark buffer 
  10316. GETSHARBUFF 
  10317.                     gets text from the shared buffer 
  10318. HELP 
  10319.                     brings up EPM help 
  10320. KEY 
  10321.                     allows the repeat of a key or macro 
  10322.                     searches for text 
  10323. LINK 
  10324.                     links an .EX module into EPM 
  10325. LIST 
  10326.                     same as FILEFIND and FINDFILE 
  10327. LOADDEFAULTMENU 
  10328.                     loads the default action bar menu 
  10329. LOCK 
  10330.                     prevents other users from updating a file 
  10331. LOOPKEY 
  10332.                     repeats a key in a vertical direction 
  10333. LOWERCASE 
  10334.                     converts marked text into lowercase 
  10335. MA 
  10336.                     sets/displays the margin settings 
  10337. MARGINS 
  10338.                     same as MA 
  10339. MARGINSDLG 
  10340.                     brings up the margins dialog box 
  10341. MARKWORD 
  10342.                     marks the word under the mouse pointer 
  10343. MATCHTAB 
  10344.                     sets tab stops to the words in the line above 
  10345. MATH 
  10346.                     computes an expression in base 10 
  10347. MATHO 
  10348.                     computes an expression in base 8 
  10349. MATHX 
  10350.                     computes an expression in base 16 
  10351. MESSAGEBOX 
  10352.                     brings up the message review dialog box 
  10353. MH_BEGIN_MARK 
  10354.                     mouse handler begin mark 
  10355. MH_CANCEL_MARK 
  10356.                     mouse hander cancel mark 
  10357. MH_END_MARK 
  10358.                     mouse handler end mark 
  10359. MH_GOTOPOSITION 
  10360.                     mouse handler go to position 
  10361. MULT 
  10362.                     multiplies the numbers in a marked area 
  10363.                     renames the current file 
  10364. NAME 
  10365.                     same as N 
  10366.                     loads a file into a new window 
  10367. OPEN 
  10368.                     same as O 
  10369. OPENDLG 
  10370.                     brings up the OPEN dialog box 
  10371. OS2 
  10372.                     executes an OS/2 command 
  10373. PASTE 
  10374.                     copies text from the shared buffer 
  10375. PATH 
  10376.                     displays the path settings 
  10377. PRINT 
  10378.                     prints a marked area or whole file 
  10379. PROCESSBREAK 
  10380.                     stops a macro in progress 
  10381. PROOF 
  10382.                     initiates spell checking 
  10383. PROOFWORD 
  10384.                     spell checks the current word 
  10385. PUT 
  10386.                     writes the marked text to a file 
  10387. QCONTROL 
  10388.                     determines the status of windows 
  10389. QD 
  10390.                     returns the current date 
  10391. QDATE 
  10392.                     same as QD 
  10393. QL 
  10394.                     determines if a module is linked 
  10395. QLINK 
  10396.                     same as QL 
  10397. QLINKED 
  10398.                     same as QL and QLINK 
  10399. QS 
  10400.                     executes an OS/2 command w/ no results 
  10401. QUIETSHELL 
  10402.                     same as QS 
  10403. QT 
  10404.                     displays the time 
  10405. QTIME 
  10406.                     same as QT 
  10407.                     quits the current file 
  10408. QUIT 
  10409.                     same as Q 
  10410. RC 
  10411.                     returns the error code of a command 
  10412. RELINK 
  10413.                     compiles and links and E module 
  10414.                     saves a file to disk 
  10415. SAVE 
  10416.                     same as S 
  10417. SET 
  10418.                     displays all SET parameters in a temp. file 
  10419. SETSCROLLS 
  10420.                     turns the scroll bars on/off 
  10421. SORT 
  10422.                     sorts marked text or the whole file 
  10423. SORTDLL 
  10424.                     same as SORT 
  10425. STAY 
  10426.                     sets whether to move on a find & replace 
  10427. STDFILE_READ 
  10428.                     reads in from standard input stream 
  10429. STDFILE_WRITE 
  10430.                     writes out the the standard output stream 
  10431. TABS 
  10432.                     sets the tabs stops 
  10433. TOGGLECONTROL 
  10434.                     toggles the window on/off 
  10435. TOGGLEFONT 
  10436.                     toggles between large/small fonts 
  10437. TOP 
  10438.                     goes to the top of the current file 
  10439. UNLINK 
  10440.                     removes an .EX module from EPM 
  10441. UNLOCK 
  10442.                     allows other users to update a file 
  10443. UPPERCASE 
  10444.                     makes text in a marked area uppercased 
  10445. VER 
  10446.                     displays the EPM version 
  10447. VOL 
  10448.                     displays the current drive's volume info 
  10449. XCOM 
  10450.                     executes a built in command 
  10451.  
  10452.  
  10453. ΓòÉΓòÉΓòÉ 9.3. E Language Keywords ΓòÉΓòÉΓòÉ
  10454.  
  10455. AND 
  10456.                 Boolean AND function.  That is, a logical AND like REXX, not a 
  10457.                 bit operator. 
  10458. ARG 
  10459.                 is used in parse constructs 
  10460. BASE 
  10461.                 is used in defkeys construct 
  10462. BY 
  10463.                 is used in loop constructs 
  10464. CLEAR 
  10465.                 is used in defkeys construct 
  10466. COMPILE 
  10467.                 conditional compilation instruction, followed by 
  10468.                 IF/ELSE/ELSEIF/ENDIF 
  10469. CONST 
  10470.                 defines constants that the E translator uses during translation 
  10471.                 of the E procs 
  10472. DEF 
  10473.                 defines a key or pseudo-key that belongs to the current keyset 
  10474. DEFC 
  10475.                 defines new commands 
  10476. DEFINIT 
  10477.                 allows initialization of variables for use by other E 
  10478.                 procedures 
  10479. DEFKEYS 
  10480.                 names a keyset 
  10481. DEFLOAD 
  10482.                 is executed whenever a new file is loaded 
  10483. DEFMAIN 
  10484.                 allows the user to take control of the command dialog box 
  10485.                 arguments of the editor 
  10486. DEFMODIFY 
  10487.                 is executed when .modify passes certain threshold values 
  10488. DEFPROC 
  10489.                 is used to define new procedures (functions) 
  10490. DEFSELECT 
  10491.                 is executed whenever you switch to a different file 
  10492. DO 
  10493.                 is used in loop constructs 
  10494. ELSE 
  10495.                 indicates action to take place when an IF statement proves 
  10496.                 false 
  10497. ELSEIF 
  10498.                 executes a secondary IF when an IF statement proves false 
  10499. END or ENDDO 
  10500.                 is used in loop constructs, to terminate a DO block (DO WHILE, 
  10501.                 DO (FOR), or DO FOREVER) 
  10502. ENDFOR 
  10503.                 is used in loop constructs 
  10504. ENDIF 
  10505.                 marks the end of an IF block 
  10506. ENDLOOP 
  10507.                 is used in loop constructs 
  10508. ENDWHILE 
  10509.                 is used in loop constructs 
  10510. FOR 
  10511.                 is used in loop constructs 
  10512. FOREVER 
  10513.                 is used in loop constructs 
  10514. IF 
  10515.                 changes the flow of statements depending upon a condition 
  10516. INCLUDE 
  10517.                 includes another file into the current file for compilation. 
  10518. ITERATE 
  10519.                 iterates a loop, while, or do 
  10520. LEAVE 
  10521.                 exits loop, while, or do 
  10522. LOOP 
  10523.                 is used in loop constructs 
  10524. NEW 
  10525.                 is used in defkeys construct 
  10526. NOT 
  10527.                 Boolean NOT function 
  10528. OR 
  10529.                 Boolean OR function 
  10530. OVERLAY 
  10531.                 is used in defkeys construct 
  10532. PARSE 
  10533.                 is used to extract information from a string 
  10534. RETURN 
  10535.                 returns from a defined procedure or command, with an 
  10536.                 expression. 
  10537. SAY 
  10538.                 writes a line to terminal when shelled to OS/2 
  10539. SAYS 
  10540.                 writes a line to terminal when shelled to OS/2, no CR-LF 
  10541. SET 
  10542.                 defines configuration options.  Only a few options are still 
  10543.                 set in this way:  cursors and insertstate. 
  10544. THEN 
  10545.                 indicates action to take place when an IF statement proves true 
  10546. TO 
  10547.                 is used in loop constructs 
  10548. TRYINCLUDE 
  10549.                 includes another file into the current file for compilation, 
  10550.                 similar to INCLUDE, but does not stop compilation if the file 
  10551.                 cannot be found. 
  10552. UNIVERSAL 
  10553.                 specifies that a variable is available to all procs, is not 
  10554.                 local to the current one. 
  10555. VALUE 
  10556.                 is used in Parse constructs 
  10557. VAR 
  10558.                 is used in DEFPROC definitions.  Specifies that the following 
  10559.                 variable is passed by reference.  If the procedure modifies the 
  10560.                 variable its value is also changed in the caller.  Otherwise 
  10561.                 the caller's value for the variable is not modifiable by the 
  10562.                 called procedure. 
  10563. WHILE 
  10564.                 is used in loop constructs 
  10565. WITH 
  10566.                 is used in Parse constructs 
  10567.  
  10568.  
  10569. ΓòÉΓòÉΓòÉ 9.4. Field Attributes ΓòÉΓòÉΓòÉ
  10570.  
  10571. Field attributes are variables that are unique to each file. They can be 
  10572. accessed by specifying the fileid and the attribute name separated by a period. 
  10573. If the fileid is omitted, the current file is assumed. Some are able to be 
  10574. assigned and all are able to be referenced. For example: 
  10575.  
  10576.         .line = 1
  10577.         sayerror "The current line is: "||.line
  10578.         tmpfileid.line = 1
  10579.  
  10580. The first is an assignment statement. The second is reference statement. In the 
  10581. third a fileid (in the form of the variable tmpfileid) is used. For a more 
  10582. complete description of field variables see Field Variables Listed. Valid field 
  10583. variables are: 
  10584.  
  10585. .AUTOSAVE 
  10586.                     number of changes before autosaving 
  10587. .COL 
  10588.                     the cursor column position 
  10589. .CURSORX 
  10590.                     the cursor x coordinate 
  10591. .CURSORY 
  10592.                     the cursor y coordinate 
  10593. .DRAGCOLOR 
  10594.                     the drag color 
  10595. .DRAGSTYLE 
  10596.                     the drag style 
  10597. .DRAGTHRESHHOLDX 
  10598.                     how far (in x dir.) mouse must move for a drag 
  10599. .DRAGTHRESHHOLDY 
  10600.                     how far (in y dir.) mouse must move for a drag 
  10601. .FILENAME 
  10602.                     the current file's filename 
  10603. .FONTHEIGHT 
  10604.                     the font height 
  10605. .FONTWIDTH 
  10606.                     the font width 
  10607. .KEYSET 
  10608.                     the current active keyset 
  10609. .LAST 
  10610.                     the maximum file line number 
  10611. .LINE 
  10612.                     the cursor's line number 
  10613. .LOCKHANDLE 
  10614.                     determines if the file is LOCKed 
  10615. .MARGINS 
  10616.                     contains the margin settings 
  10617. .MARKCOLOR 
  10618.                     contains the mark color 
  10619. .MESSAGECOLOR 
  10620.                     contains the message color 
  10621. .MESSAGELINE 
  10622.                     the contents of the messageline 
  10623. .MODIFY 
  10624.                     the number of modifications made 
  10625. .MOUSEX 
  10626.                     the mouse's x coordinate 
  10627. .MOUSEY 
  10628.                     the mouse's y coordinate 
  10629. .STATUSCOLOR 
  10630.                     the status bar color 
  10631. .STATUSLINE 
  10632.                     the contents of the status line 
  10633. .TABS 
  10634.                     the tab settings 
  10635. .TEXTCOLOR 
  10636.                     the text color 
  10637. .USERSTRING 
  10638.                     a user definable variable 
  10639. .VISIBLE 
  10640.                     determines if the file is visible 
  10641. .WINDOWHEIGHT 
  10642.                     contains the window height 
  10643. .WINDOWWIDTH 
  10644.                     contains the window width 
  10645. .WINDOWX 
  10646.                     the window x coordinate 
  10647. .WINDOWY 
  10648.                     the window y coordinate 
  10649.  
  10650.  
  10651. ΓòÉΓòÉΓòÉ 9.5. E-Definable Keys ΓòÉΓòÉΓòÉ
  10652.  
  10653. The following keys may be defined using E.  In all cases, the prefix A_ means 
  10654. that the Alt key must be depressed at the same time as the key to get the 
  10655. desired function.  Similarly, the prefix C_ means the Ctrl key must be used, 
  10656. and S_ means the shift key must be used. For information on the format of 
  10657. defining these keys, refer to section Key Definitions (DEF and DEFKEYS) or E 
  10658. Language Syntax. 
  10659.  
  10660. A - Z 
  10661. A_A - A_Z 
  10662. A_EQUAL 
  10663. A_F1 - A_F12 
  10664. A_LEFTBRACKET 
  10665. A_MINUS 
  10666. A_RIGHTBRACKET 
  10667. A_TAB 
  10668. A_0 - A_9 
  10669. BACKSPACE 
  10670. C_A - C_Z 
  10671. C_BACKSLASH 
  10672. C_BACKSPACE 
  10673. C_DEL 
  10674. C_DOWN 
  10675. C_END 
  10676. C_ENTER 
  10677. C_F1 - C_F10 
  10678. C_HOME 
  10679. C_INS 
  10680. C_LEFT 
  10681. C_LEFTBRACKET 
  10682. C_MINUS 
  10683. C_PGDN 
  10684. C_PGUP 
  10685. C_PRTSC 
  10686. C_RIGHT 
  10687. C_RIGHTBRACKET 
  10688. C_TAB 
  10689. C_UP 
  10690. C_2, C_6 
  10691. DEL 
  10692. DOWN 
  10693. END 
  10694. ENTER 
  10695. ESC 
  10696. F1 - F10 
  10697. HOME 
  10698. INS 
  10699. LEFT 
  10700. PGDN 
  10701. PGUP 
  10702. RIGHT 
  10703. S_F1 - S_F10 
  10704. S_PAD5 
  10705. S_TAB 
  10706. TAB 
  10707. UP 
  10708. any printable character whose ASCII value is 0 to 255. 
  10709. The following name may be defined in the same manner as keys, but is used as a 
  10710. pseudo-key: 
  10711.  
  10712. ENTRY 
  10713. The following keys are available only on enhanced keyboards, which come with 
  10714. the PS/2 and AT models: 
  10715.  
  10716. A_ENTER 
  10717.  
  10718. A_F11, A_F12 
  10719.  
  10720. A_PADENTER 
  10721.  
  10722. C_F11, C_F12 
  10723.  
  10724. C_PADENTER 
  10725.  
  10726. F11, F12 
  10727.  
  10728. PADENTER 
  10729.  
  10730. S_F11, S_F12 
  10731.  
  10732.  
  10733. ΓòÉΓòÉΓòÉ 9.5.1. PM Keys ΓòÉΓòÉΓòÉ
  10734.  
  10735. The keys listed below are used be Presentation Manager to accomplish certain 
  10736. functions standard to all PM applications (set by CUA standards). To maintain 
  10737. consistency between PM applications, these keys cannot be redefined. 
  10738.  
  10739. Key            PM Function 
  10740.   F1 
  10741.                Help 
  10742.   F10 
  10743.                Goto action bar. 
  10744.   A_F7 
  10745.                Move a PM window. 
  10746.   A_F8 
  10747.                Size a PM window. 
  10748.   A_F9 
  10749.                Minimize a PM window. 
  10750.   A_F10 
  10751.                Maximize a PM window. 
  10752.   A_Esc 
  10753.                Switch application. 
  10754.   C_Esc 
  10755.                Goto Task List. 
  10756.  
  10757.  
  10758. ΓòÉΓòÉΓòÉ 10. General Structure of E-Macro Files ΓòÉΓòÉΓòÉ
  10759.  
  10760. ALL.E               Procedure for including the ALL command and the ctrl-Q key 
  10761.                     setup for paging between ALL occurrences. This file is only 
  10762.                     included if the variable WANT_ALL is TRUE. 
  10763.  
  10764. BOX.E               Procedure for the BOX command. This is compiled separately 
  10765.                     into a BOX.EX file. The file is loaded when the user issues 
  10766.                     a BOX command. When the command finished, BOX is unlinked 
  10767.                     from EPM, thereby saving memory space. 
  10768.  
  10769. BUFF.E              Test procedures for the buffer() opcode. 
  10770.  
  10771. CHAROPS.E           Procedures for block fill, copy, delete and mark, for 
  10772.                     character-marked text. 
  10773.  
  10774. CKEYS.E             Syntax aids for C files. 
  10775.  
  10776. CKEYSEL.E           A small file which selects the C keyset.  This is a 
  10777.                     separate file to allow easy omission of the 
  10778.                     syntax-expansion feature by erasing CKEYS*.E. As of version 
  10779.                     4.12, this file is no longer needed.  The selection of the 
  10780.                     keyset is done in CKEYS.E where the keyset is defined. This 
  10781.                     is made possible by the new DEFLOAD feature.  Similarly, 
  10782.                     EKEYSEL.E and PKEYSEL.E are unnecessary. 
  10783.  
  10784. CLIPBRD.E           Contains procedures and commands that: 
  10785.  
  10786.    o allow a user to pass lines of text between edit windows 
  10787.    o allow text to be placed in the PM clipboard. 
  10788.  
  10789. COLORS.E            Defines default colors. 
  10790.  
  10791. DOSUTIL.E           Procedures interfacing to the operating system. 
  10792.  
  10793.                     Note:  No longer used under OS/2. 
  10794.  
  10795. DRAW.E              Includes the procedures for the DRAW command. This is 
  10796.                     compiled separately into a DRAW.EX file. The file is loaded 
  10797.                     when the user issues a DRAW command. The code is then 
  10798.                     unlinked when the DRAW command is finished. 
  10799.  
  10800. DRAWKEY.E           Includes the key definition for F6 to trigger the draw 
  10801.                     command. 
  10802.  
  10803. DYNATEST.E          An example program showing how to program in E using the 
  10804.                     DYNALINK command. 
  10805.  
  10806. E.E                 The main file containing all the include statements that 
  10807.                     create EPM. Do not compile this module, however. Compile 
  10808.                     the EPM.E file. 
  10809.  
  10810. E3EMUL.E            Includes the procedures and commands to enable E3EMUL host 
  10811.                     support. See The EPM User's Guide for more information on 
  10812.                     the E3EMUL package support. 
  10813.  
  10814. EKEYS.E             Key definitions for E syntax support. 
  10815.  
  10816. EKEYSEL.E           A small file which selects the E keyset.  This is a 
  10817.                     separate file to allow easy omission of the 
  10818.                     syntax-expansion feature by erasing EKEYS*.E. 
  10819.  
  10820. EPM.E               The main file for compilation. See The EPM User's Guide for 
  10821.                     information on compiling this file. 
  10822.  
  10823. EPMLEX.E            Includes spell checking and synonym support for the EPM 
  10824.                     editor. 
  10825.  
  10826. EXIT.E              Asks the user if he really wants to leave EOS2. No longer 
  10827.                     used in EPM. 
  10828.  
  10829. GET.E               Procedures for the GET command. This is an external package 
  10830.                     created to save memory space. When the user issues a GET 
  10831.                     command, EPM loads the GET.EX file. Once the GET command is 
  10832.                     completed, GET will unlink itself from memory to free up 
  10833.                     memory space. 
  10834.  
  10835. HELP.E              Procedure for the HELP command. This is an external package 
  10836.                     created to save memory space. When the user issues a HELP 
  10837.                     command, EPM loads the HELP.EX file. Once the user has 
  10838.                     finished viewing the EPMHELP.HLP file, HELP automatically 
  10839.                     unlinks itself from memory to free up memory space. 
  10840.  
  10841. LINKCMDS.E          Contains procedures and commands related to the linking of 
  10842.                     editor modules (ie. LINK, ETPM, RELINK and UNLINK). 
  10843.  
  10844. LOAD.E              This file is executed immediately after a file is loaded. 
  10845.                     It will be invoked after loading an existing file from 
  10846.                     disk, or opening a new file, but not after an error such as 
  10847.                     "Not enough memory".  In other words, a new file must be 
  10848.                     entered into the ring. 
  10849.  
  10850.                     This is the place to select a keyset (like c_keys for .C 
  10851.                     files) since keysets now stay bound to a file once 
  10852.                     assigned.  This is also a good place to do other one-time 
  10853.                     processing like returning to a saved bookmark. 
  10854.  
  10855. MAIN.E              Contains the DEFMAIN procedure, which is where E begins 
  10856.                     execution after all DEFINITs.  Processes the OS/2 command 
  10857.                     dialog box. 
  10858.  
  10859. MARKFILT.E          Defines procedures to extract and replace strings from 
  10860.                     marked text. 
  10861.  
  10862. MATH.E              Definitions for ADD and MULT commands. Also refer to the 
  10863.                     file MATHLIB.E for more math command definitions. 
  10864.  
  10865. MATHLIB.E           An extension of MATH.E created for EOS/2 to allow the 
  10866.                     components to compile only if needed. See MATH.E for more 
  10867.                     math command definitions. 
  10868.  
  10869. MODIFY.E            This file contains the procedures and commands executed 
  10870.                     when a DEMODIFY event is triggered. The DEMODIFY event 
  10871.                     occurs when a file's number of modifications (.modify): 
  10872.  
  10873.    o goes from zero to nonzero (first modification, so we can change the 
  10874.      textcolor or title to indicate that the file needs to be saved; 
  10875.    o goes from nonzero to zero (so we can return to the safe textcolor, usually 
  10876.      after a save); 
  10877.    o goes from less than .autosave to greater than or equal to .autosave. 
  10878.  
  10879.                     The DEMODIFY.E file is new as of EPM. 
  10880.  
  10881. MOUSE.E             Contains the commands and procedures associated with the 
  10882.                     MOUSE movements and actions. This file is new as of EPM. 
  10883.  
  10884. PKEYS.E             Syntax aids for Pascal files. 
  10885.  
  10886. PKEYSEL.E           A small file which selects the Pascal keyset.  This is a 
  10887.                     separate file to allow easy omission of the 
  10888.                     syntax-expansion feature by erasing PKEYS*.E. 
  10889.  
  10890. PUT.E               Contains the procedures and statements for the PUT command. 
  10891.                     This was made an external module to save space. 
  10892.  
  10893. RETREIVE.E          Used to retrieve commands from a hidden file in E3. This 
  10894.                     file is no longer used under EPM. 
  10895.  
  10896. SAVELOAD.E          Things common to loading and saving files (host file 
  10897.                     support). 
  10898.  
  10899. SELECT.E            Contains the procedure select_edit_keys() which selects 
  10900.                     options (like keysets) whenever you switch to a new file. 
  10901.  
  10902. SHELL.E             Presents an E interface to the internal shell command. 
  10903.  
  10904. SLNOHOST.E          Substitute for SAVELOAD.E, without host file support. 
  10905.  
  10906. SMALL.E             A version of E.E with several features removed to save 
  10907.                     memory. 
  10908.  
  10909. SORTDLL.E           Provides the link between the E's SORT command and the 
  10910.                     QISRTMEM sort DLL. 
  10911.  
  10912. SORTE.E             Definitions for the sorting using the E language. 
  10913.  
  10914. STDCMDS.E           Definitions of standard E commands. 
  10915.  
  10916. STDCNF.E            Mode settings and default values for the standard E 
  10917.                     configuration. 
  10918.  
  10919. STDCONST.E          Contains EPM's standard constants. 
  10920.  
  10921. STDCTRL.E           Adds LISTBOX and MENU support.  Routines to interface with 
  10922.                     EPM and PM controls are defined here. 
  10923.  
  10924. STDKEYS.E           Standard E command-key definitions. 
  10925.  
  10926. STDMENU.E           The default action bar is defined here. 
  10927.  
  10928. STDPROCS.E          Standard procedural support for other files. 
  10929.  
  10930. WINDOW.E            Definitions for tiled window support. No longer used in 
  10931.                     EPM. 
  10932.  
  10933.  
  10934. ΓòÉΓòÉΓòÉ 11. Descriptions of Procedures in Standard EPM ΓòÉΓòÉΓòÉ
  10935.  
  10936. This section lists in alphabetical order all of the procedures in the *.E files 
  10937. and gives a brief description of how they function and what they are used for. 
  10938. For more detailed information, please study the comments in the .E code itself. 
  10939.  
  10940.  
  10941. ΓòÉΓòÉΓòÉ 11.1. ALREADY_IN_RING(filename, var tryid) ΓòÉΓòÉΓòÉ
  10942.  
  10943. Attempts to find the filename in the current ring. If successful tryid returns 
  10944. the file id for the filename. This function returns a one if the filename is in 
  10945. the ring and a zero if not. 
  10946.  
  10947.  
  10948. ΓòÉΓòÉΓòÉ 11.2. APPEND_PATH(filename) ΓòÉΓòÉΓòÉ
  10949.  
  10950. For use with DOS 3.30 or higher: searches the path listed in the APPEND path 
  10951. string for filename and returns the path (ended by a trailing backslash) where 
  10952. it was found; otherwise it returns null. Only included if requested with the 
  10953. USE_APPEND option variable. 
  10954.  
  10955.  
  10956. ΓòÉΓòÉΓòÉ 11.3. ASKYESNO() ΓòÉΓòÉΓòÉ
  10957.  
  10958. Displays the message: 'Are you sure (Y/N)' and returns an uppercase keystroke 
  10959. to the caller. If called with a string parameter, the string is displayed 
  10960. before the message: 'Are you sure (Y/N)'. An optional second argument is a flag 
  10961. to prevent the 'Are you sure (Y/N)' message from appearing. For example: 
  10962.  
  10963. usersays = askyesno("About to erase")
  10964.  
  10965. The user's response would be placed in the variable usersays. 
  10966.  
  10967.  
  10968. ΓòÉΓòÉΓòÉ 11.4. BEEP(pitch,duration) ΓòÉΓòÉΓòÉ
  10969.  
  10970. Emits a tone of pitch (range 25Hz - 7FFFHz) and a duration of duration in 
  10971. milliseconds. 
  10972.  
  10973.  
  10974. ΓòÉΓòÉΓòÉ 11.5. BREAKOUT_MVS(filename,lastqual) ΓòÉΓòÉΓòÉ
  10975.  
  10976. Breaks out a filetype from a MVS filename.  PASCAL will return PAS and C will 
  10977. return C. Only included if requested with HOST_SUPPORT. 
  10978.  
  10979.  
  10980. ΓòÉΓòÉΓòÉ 11.6. CHECK_FOR_HOST_FILE() ΓòÉΓòÉΓòÉ
  10981.  
  10982. Parses arg(1) in the host filename form:  fname ftype fmode; gives an error 
  10983. message and returns zero if not in correct format; returns one if in correct 
  10984. format. Included only if HOST_SUPPORT is requested. 
  10985.  
  10986.  
  10987. ΓòÉΓòÉΓòÉ 11.7. CHECK_FOR_PRINTER(name) ΓòÉΓòÉΓòÉ
  10988.  
  10989. Tests whether name is actually a printer device. Returns zero if not a valid 
  10990. printer device and the printer number if valid. 
  10991.  
  10992.  
  10993. ΓòÉΓòÉΓòÉ 11.8. CHECK_MARK_ON_SCREEN() ΓòÉΓòÉΓòÉ
  10994.  
  10995. Tells if a mark is visible on the screen. Returns a one if the mark is on the 
  10996. visible screen and a zero if not. Use checkmark() to see if a mark exists 
  10997. anywhere in the file. 
  10998.  
  10999.  
  11000. ΓòÉΓòÉΓòÉ 11.9. checkmark() ΓòÉΓòÉΓòÉ
  11001.  
  11002. Checks if a marked area exists in the current file. Returns a one if a mark is 
  11003. set; zero if no mark exists. 
  11004.  
  11005.  
  11006. ΓòÉΓòÉΓòÉ 11.10. CURSOROFF() ΓòÉΓòÉΓòÉ
  11007.  
  11008. Turns the cursor off. 
  11009.  
  11010.  
  11011. ΓòÉΓòÉΓòÉ 11.11. DEC2HEX() ΓòÉΓòÉΓòÉ
  11012.  
  11013. Converts a decimal number, arg(1), to a number of base arg(2) (default is 
  11014. hexadecimal). Example usage is: 
  11015.  
  11016.         HexStringOut=Dec2Hex(DecimalIn)
  11017.  
  11018.  
  11019. ΓòÉΓòÉΓòÉ 11.12. DOS_COMMAND() ΓòÉΓòÉΓòÉ
  11020.  
  11021. Executes the DOS (OS/2) command specified in the arg(1) and redirects the 
  11022. output to the file specified in vTEMP_FILENAME. Used by commands like the DIR 
  11023. command. 
  11024.  
  11025.  
  11026. ΓòÉΓòÉΓòÉ 11.13. DOS_VERSION() ΓòÉΓòÉΓòÉ
  11027.  
  11028. Returns DOS version number, multiplied by 100 so it can be treated as an 
  11029. integer string.  For example DOS 3.2 is reported as "320". 
  11030.  
  11031.  
  11032. ΓòÉΓòÉΓòÉ 11.14. EINSERT_LINE() ΓòÉΓòÉΓòÉ
  11033.  
  11034. Inserts a line after current line and positions the cursor on the same column 
  11035. number of the first nonblank character of preceding line. 
  11036.  
  11037.  
  11038. ΓòÉΓòÉΓòÉ 11.15. ENTRY_BOX(title) ΓòÉΓòÉΓòÉ
  11039.  
  11040. Creates a System-Modal Dialog Box with an entry field and two push buttons. The 
  11041. format for entry_box is: 
  11042.  
  11043. userstext = entrybox(title,buttons,entrytext,cols,
  11044.             maxchars)
  11045.  
  11046. with the following field definitions: 
  11047.  
  11048. userstext is the variable that will contain the user's text entered. 
  11049. title     the text to be displayed in the title bar. 
  11050. buttons   the labels on the buttons separated by delimiting characters. If this 
  11051.           entry is null, the EPM defaults to Enter and Cancel. 
  11052. entrytext contains the text to be entered into the user's text entry area. This 
  11053.           is useful for displaying defaults for change. 
  11054. cols      is the width of the dialog box. 
  11055. maxchars  is the maximum number of characters allowed for entry. 
  11056.  
  11057. An example of a procedure (called testit) that uses the entrybox command 
  11058. follows: 
  11059.  
  11060. defc testit
  11061.   k=entrybox('This is a test box.', '/one/two/',
  11062.              'Hi!',30, 10)
  11063.     message("The character returned was = "||k)
  11064.  
  11065. In the procedure, a dialog box with the title This is a test box will appear. 
  11066. The two buttons will be labeled one and two. Initially the word Hi! will be 
  11067. entered in the text input area. This is useful for displaying current values 
  11068. and allowing the user to change them. The dialog box will be thirty characters 
  11069. wide and allow the user to input up to ten characters. The input will be stored 
  11070. in the variable k and the command message will display the input. 
  11071.  
  11072. Also see the LISTBOX procedure in this section for an alternative means of 
  11073. getting user input. 
  11074.  
  11075.  
  11076. ΓòÉΓòÉΓòÉ 11.16. ERASETEMP(filename) ΓòÉΓòÉΓòÉ
  11077.  
  11078. Erases a file quietly (no "File not found" message) on both DOS and OS/2; 
  11079. returns 0 if successful erase, and the error code (if on DOS) which is usually 
  11080. 2 for 'file not found'. 
  11081.  
  11082.  
  11083. ΓòÉΓòÉΓòÉ 11.17. EXIST(filename) ΓòÉΓòÉΓòÉ
  11084.  
  11085. Determines whether filename exists. Returns a one if it does exist; a zero if 
  11086. it doesn't. 
  11087.  
  11088.  
  11089. ΓòÉΓòÉΓòÉ 11.18. FILETYPE() -- in SLNOHOST.E ΓòÉΓòÉΓòÉ
  11090.  
  11091. Returns the extension (everything after '.') of the current filename or fileid 
  11092. specified in arg(1). 
  11093.  
  11094.  
  11095. ΓòÉΓòÉΓòÉ 11.19. FILETYPE() -- in SAVELOAD.E ΓòÉΓòÉΓòÉ
  11096.  
  11097. Returns the 'ftype' portion of the host filename. 
  11098.  
  11099.  
  11100. ΓòÉΓòÉΓòÉ 11.20. FIND_ROUTINE(utility) ΓòÉΓòÉΓòÉ
  11101.  
  11102. Used to both verify that the external utility program exists, and to get its 
  11103. path. 
  11104.  
  11105.  
  11106. ΓòÉΓòÉΓòÉ 11.21. GET_CHAR() ΓòÉΓòÉΓòÉ
  11107.  
  11108. Returns the character at the current cursor position. 
  11109.  
  11110.  
  11111. ΓòÉΓòÉΓòÉ 11.22. GET_ENV(varname) ΓòÉΓòÉΓòÉ
  11112.  
  11113. Returns whether the variable name (varname) is found in the environment. 
  11114. Returns the setting if found; zero if not found. For example: 
  11115.  
  11116.         res=get_env('DPATH')
  11117.  
  11118. In this case the contents of the DPATH environment variable would be returned 
  11119. into the variable res. 
  11120.  
  11121.  
  11122. ΓòÉΓòÉΓòÉ 11.23. GETDATE() ΓòÉΓòÉΓòÉ
  11123.  
  11124. Returns the date in the form: Weekday Month Day, Year; MonthNum. 
  11125.  
  11126.  
  11127. ΓòÉΓòÉΓòÉ 11.24. GETTIME() ΓòÉΓòÉΓòÉ
  11128.  
  11129. Returns the time in the form: hh:mm:ss xm;hour24:hund. 
  11130.  
  11131.  
  11132. ΓòÉΓòÉΓòÉ 11.25. HEX2DEC() ΓòÉΓòÉΓòÉ
  11133.  
  11134. Converts the number in arg(1) to a decimal number; arg(1) is assumed to be a 
  11135. number of base arg(2) (hexadecimal by default). See the dec2hex() procedure for 
  11136. an example. 
  11137.  
  11138.  
  11139. ΓòÉΓòÉΓòÉ 11.26. ISA_MVS_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11140.  
  11141. Returns a zero and the error message (in error_msg) if it is not a valid MVS 
  11142. filename; and returns a one and the rest of the information if the candidate is 
  11143. a valid MVS filename. 
  11144.  
  11145.  
  11146. ΓòÉΓòÉΓòÉ 11.27. ISA_PC_FILENAME(candidate, var tempfile, var error_msg) ΓòÉΓòÉΓòÉ
  11147.  
  11148. Returns a zero and the error message (in error_msg) if it is not a valid PC 
  11149. filename; and returns a one and the rest of the information if the candidate 
  11150.  
  11151.  
  11152. ΓòÉΓòÉΓòÉ 11.28. ISA_VM_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  11153.  
  11154. Returns a zero and the error message (in error_msg) if it is not a valid VM 
  11155. filename; and returns a one and the rest of the information if the candidate 
  11156.  
  11157.  
  11158. ΓòÉΓòÉΓòÉ 11.29. ISHOST(candidate, verb, var hostfile, var tempfile, var thisLT, var bin) ΓòÉΓòÉΓòÉ
  11159.  
  11160. Determines a filename's type and returns: 
  11161.  
  11162. 0 = PC filename 
  11163. 1 = VM filename 
  11164. 2 = MVS filenme 
  11165.  
  11166.  
  11167. ΓòÉΓòÉΓòÉ 11.30. ISNUM() ΓòÉΓòÉΓòÉ
  11168.  
  11169. Returns true if parameter given is a number, ignores leading and trailing 
  11170. spaces. 
  11171.  
  11172.  
  11173. ΓòÉΓòÉΓòÉ 11.31. ISOPTION(var cmdline, optionletter) ΓòÉΓòÉΓòÉ
  11174.  
  11175. Eliminates optionletter from cmdline; if optionletter occurred in the 
  11176. commandline, returns 1; returns 0 otherwise. 
  11177.  
  11178.  
  11179. ΓòÉΓòÉΓòÉ 11.32. JOINLINES() ΓòÉΓòÉΓòÉ
  11180.  
  11181. Joins the line below the cursor line with the cursor line. 
  11182.  
  11183.  
  11184. ΓòÉΓòÉΓòÉ 11.33. LISTBOX(params) ΓòÉΓòÉΓòÉ
  11185.  
  11186. Enables the dynamic creation of modal PM list boxes. A macro can pop up a list 
  11187. of items and have the user's selection returned to the macro. The entry chosen 
  11188. (with a mouse double click or enter from the keyboard) is returned. If ESC was 
  11189. hit then a null string is returned. Parameters are: 
  11190.  
  11191. param1  the list of items, separated by a common separator.  The common 
  11192.         separator is the first character in the string. 
  11193.  
  11194.                 example:     /cat/dog/fish
  11195.                              separator='/'
  11196.                              list=cat, dog, fish
  11197.                 example:     $cat/ground$fish/water
  11198.                              separator='$'
  11199.                              list=cat/ground, fish/water
  11200.  
  11201.         These lists will be displayed like the past commands are displayed in 
  11202.         the command line dialog box. If one of elements in the box is 
  11203.         double-clicked on, it will be returned. For instance, if the second 
  11204.         element of the first example list was chosen by the user, the string 
  11205.         DOG would be returned. 
  11206. param2  (optional) button names.  A maximum of four button names can be 
  11207.         specified to allow multiple buttons. If button one is clicked on, the 
  11208.         highlighted value from the list is returned and so should probably be 
  11209.         entitled ENTER. If the second button is chosen, a null string will be 
  11210.         returned as so should have a title something equivalent to Cancel. If 
  11211.         included the third and fourth boxes return the numbers 3 and 4 
  11212.         respectively. The meanings of these buttons can be defined by the 
  11213.         programmer. If no button names are given, buttons one and two will 
  11214.         default to ENTER and CANCEL respectively. 
  11215. param3  (optional) row of text in which list box will go under. If this 
  11216.         parameter is not specified or if a parameter of zero (0) is specified, 
  11217.         the box will be placed under the cursor. 
  11218. param4  (optional) column of text in which list box will go under. If this 
  11219.         parameter is not specified or if a parameter of zero (0) is specified, 
  11220.         the box will be placed under the cursor. 
  11221.  
  11222.         Note:  If the row parameter is selected the column parameter must be 
  11223.         selected as well. 
  11224. param5  (optional) height of the listbox in characters 
  11225.  
  11226.         Note:  Since the default PM font is proportional the character height 
  11227.         and width are approximate values. 
  11228. param6  (optional) width of listbox in characters. 
  11229.  
  11230. An example of listbox usage is: 
  11231.  
  11232. retvalue = listbox("/one/two/three",
  11233.                    "/Enter/Cancel/None")
  11234.  
  11235. In this example there would be three entries in the list: one, two, and three. 
  11236. There would also be three buttons entitled: Enter, Cancel, and None. Since the 
  11237. last three parameters were omitted, the box would be located at the cursor 
  11238. position and would be wide enough to accommodate the longest element of the 
  11239. list and three buttons. 
  11240.  
  11241. Also see the ENTRYBOX procedure in this section for an alternative method of 
  11242. getting user input. 
  11243.  
  11244.  
  11245. ΓòÉΓòÉΓòÉ 11.34. LOADFILE(files, options) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  11246.  
  11247. Issues edit command on the specified files with the specified options. 
  11248.  
  11249.  
  11250. ΓòÉΓòÉΓòÉ 11.35. LOADFILE(files,options) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11251.  
  11252. Issues edit command on the specified files with the specified options, after 
  11253. checking for host file specification ('H:'). 
  11254.  
  11255.  
  11256. ΓòÉΓòÉΓòÉ 11.36. LOCK(filename) ΓòÉΓòÉΓòÉ
  11257.  
  11258. Locks a file from other users in a LAN situation. Returns a zero if successful; 
  11259. one if unsuccessful. This procedure is only available if requested with the 
  11260. WANT_LAN_SUPPORT option variable. 
  11261.  
  11262.  
  11263. ΓòÉΓòÉΓòÉ 11.37. MakeTempName() ΓòÉΓòÉΓòÉ
  11264.  
  11265. Creates a temporary filename using the optional arguments filename and fileid. 
  11266. If no arguments are specified, the current filename and current fileid are 
  11267. used. For example, if filename = `origname' and its fileid is 2, then the 
  11268. temporary filename returned will be origname.$$2. 
  11269.  
  11270.  
  11271. ΓòÉΓòÉΓòÉ 11.38. MATHCOMMON(input, suffix) ΓòÉΓòÉΓòÉ
  11272.  
  11273. Is responsible for math computations (dec, hex, or oct) done at commandline in 
  11274. E, where input is the expression to be calculated and suffix is either 'x', 'o' 
  11275. or '' depending upon the base of the number to be returned. 
  11276.  
  11277.  
  11278. ΓòÉΓòÉΓòÉ 11.39. MAX(a,b) ΓòÉΓòÉΓòÉ
  11279.  
  11280. Returns the number which has the maximum value of those numbers in the 
  11281. arguments list. As many arguments as needed can be listed. 
  11282.  
  11283.  
  11284. ΓòÉΓòÉΓòÉ 11.40. MESSAGE(mymsg) ΓòÉΓòÉΓòÉ
  11285.  
  11286. Prints the message specified by the string mymsg on the messageline. This 
  11287. procedure is a carry-over from earlier versions of E and effectively does the 
  11288. same thing as a SAYERROR statement, except this MESSAGE() procedure takes up 
  11289. more code. 
  11290.  
  11291.  
  11292. ΓòÉΓòÉΓòÉ 11.41. MESSAGENWAIT() ΓòÉΓòÉΓòÉ
  11293.  
  11294. Prints the message passed to it in the editor messages dialog box and waits for 
  11295. Cancel or ESC. 
  11296.  
  11297.  
  11298. ΓòÉΓòÉΓòÉ 11.42. MIN(a,b) ΓòÉΓòÉΓòÉ
  11299.  
  11300. Returns the number which has the minimum value of those numbers in the list of 
  11301. parameters. As many parameters as needed can be included for comparison. 
  11302.  
  11303.  
  11304. ΓòÉΓòÉΓòÉ 11.43. MY_C_ENTER() ΓòÉΓòÉΓòÉ
  11305.  
  11306. Applies to c_enter key the appropriate action defined in C_ENTER_ACTION 
  11307. constant. 
  11308.  
  11309.  
  11310. ΓòÉΓòÉΓòÉ 11.44. MY_ENTER() ΓòÉΓòÉΓòÉ
  11311.  
  11312. Applies to enter key the appropriate action defined in ENTER_ACTION constant. 
  11313.  
  11314.  
  11315. ΓòÉΓòÉΓòÉ 11.45. NAMEFILE() -- in SLNOLOAD.e ΓòÉΓòÉΓòÉ
  11316.  
  11317. Issues name command using arg(1) as the new filename. 
  11318.  
  11319.  
  11320. ΓòÉΓòÉΓòÉ 11.46. NAMEFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11321.  
  11322. Issues name command using arg(1) as the new filename, after checking whether 
  11323. file is a host file. 
  11324.  
  11325.  
  11326. ΓòÉΓòÉΓòÉ 11.47. NO_CHAR_MARK() ΓòÉΓòÉΓòÉ
  11327.  
  11328. Checks if WANT_CHAR_OPS option was set in STDCNF.e. 
  11329.  
  11330.  
  11331. ΓòÉΓòÉΓòÉ 11.48. OPENSHELLWINDOW() ΓòÉΓòÉΓòÉ
  11332.  
  11333. Opens a edit window under a temporary filename for output. (i.e. like the DIR 
  11334. command does) 
  11335.  
  11336.  
  11337. ΓòÉΓòÉΓòÉ 11.49. PARSE_FILE_N_OPTS(argstr) ΓòÉΓòÉΓòÉ
  11338.  
  11339. Parses argstr which contains a mix of options and DOS file specs. The DOS file 
  11340. specs can contain an '=' for the path or fileid, which will be replaced by the 
  11341. corresponding part of the previous file. 
  11342.  
  11343.  
  11344. ΓòÉΓòÉΓòÉ 11.50. PARSE_FILENAME(var filename) ΓòÉΓòÉΓòÉ
  11345.  
  11346. Parses a DOS filename.  Optional second argument gives source for '=' when used 
  11347. for path of fileid.  Rc is 0 if successful, or rc is the position of '=' in 
  11348. first argument if no second argument given but was needed. 
  11349.  
  11350.  
  11351. ΓòÉΓòÉΓòÉ 11.51. PARSE_LEADING_OPTIONS(var rest, var options) ΓòÉΓòÉΓòÉ
  11352.  
  11353. Parses options portion of the edit command. It does not assume that all options 
  11354. are specified before filenames. It is called by DEFC EDIT. 
  11355.  
  11356.  
  11357. ΓòÉΓòÉΓòÉ 11.52. PBEGIN_MARK() ΓòÉΓòÉΓòÉ
  11358.  
  11359. Moves the cursor to the first character of the mark area.  If the mark area is 
  11360. not in the active file, the marked file is activated. 
  11361.  
  11362.  
  11363. ΓòÉΓòÉΓòÉ 11.53. PBEGIN_WORD() ΓòÉΓòÉΓòÉ
  11364.  
  11365. Moves the cursor to the beginning of the word if the cursor is on this word. 
  11366. If its not on a word, its moved to the beginning of the first word on the left. 
  11367. If there is no word on the left its moved to the beginning of the word on the 
  11368. right.  If the line is empty the cursor doesn't move. 
  11369.  
  11370.  
  11371. ΓòÉΓòÉΓòÉ 11.54. PBLOCK_REFLOW(option, var space, var tempofid) ΓòÉΓòÉΓòÉ
  11372.  
  11373. Reflows the text in the marked area; then the destination block area must be 
  11374. selected and a second call to this procedure to reflow the source block in the 
  11375. destination block.  The source block is filled with spaces. Option=0 saves the 
  11376. marked block in temp file; option=1 reflows temp file text and copies it to 
  11377. marked area 
  11378.  
  11379.  
  11380. ΓòÉΓòÉΓòÉ 11.55. PCENTER_MARK() ΓòÉΓòÉΓòÉ
  11381.  
  11382. Centers the strings inside a block mark. If a line mark exists, the text in the 
  11383. marked lines is centered within the current margins. If no mark exists, the 
  11384. text on the current line is centered within the current margins. 
  11385.  
  11386.  
  11387. ΓòÉΓòÉΓòÉ 11.56. PCOMMON_ADJUST_OVERLAY(letter) ΓòÉΓòÉΓòÉ
  11388.  
  11389. Implements adjust and overlay commands for character and line marks (previously 
  11390. only block marks enjoyed these privileges); parameter letter specifies 'A' for 
  11391. adjust and 'O' for overlay. This procedure is only included if requested with 
  11392. the WANT_CHAR_OPS option variable. 
  11393.  
  11394.  
  11395. ΓòÉΓòÉΓòÉ 11.57. PCOPY_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  11396.  
  11397. Implements the copymark statement for character marks; parameters specify the 
  11398. marked area. 
  11399.  
  11400.  
  11401. ΓòÉΓòÉΓòÉ 11.58. PDELETE_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  11402.  
  11403. Implements the deletemark statement for character marks; parameters specify the 
  11404. marked area. 
  11405.  
  11406.  
  11407. ΓòÉΓòÉΓòÉ 11.59. PDISPLAY_MARGINS() ΓòÉΓòÉΓòÉ
  11408.  
  11409. Puts the margin settings on the current line. 
  11410.  
  11411.  
  11412. ΓòÉΓòÉΓòÉ 11.60. PDISPLAY_TABS() ΓòÉΓòÉΓòÉ
  11413.  
  11414. Puts the tab stops on the current line. 
  11415.  
  11416.  
  11417. ΓòÉΓòÉΓòÉ 11.61. PEND_MARK() ΓòÉΓòÉΓòÉ
  11418.  
  11419. Moves the cursor to the end of the marked area. 
  11420.  
  11421.  
  11422. ΓòÉΓòÉΓòÉ 11.62. PEND_WORD() ΓòÉΓòÉΓòÉ
  11423.  
  11424. Moves the cursor to the end of the word if the cursor is on this word.  If it's 
  11425. not on a word, it's moved to the end of the first word on the right.  If there 
  11426. is no word on the right it's moved to the end of the word on the left.  If the 
  11427. line is empty the cursor doesn't move. 
  11428.  
  11429.  
  11430. ΓòÉΓòÉΓòÉ 11.63. PFILE_EXISTS() ΓòÉΓòÉΓòÉ
  11431.  
  11432. Checks if file already exists in ring. 
  11433.  
  11434.  
  11435. ΓòÉΓòÉΓòÉ 11.64. PFILL_MARK() ΓòÉΓòÉΓòÉ
  11436.  
  11437. Implements the fillmark statement for character marks; checks arg() to see if a 
  11438. character for fill was specified, otherwise prompts for a character. This 
  11439. procedure is available only if requested with the WANT_CHAR_OPS option 
  11440. variable. 
  11441.  
  11442.  
  11443. ΓòÉΓòÉΓòÉ 11.65. PFIND_BLANK_LINE() ΓòÉΓòÉΓòÉ
  11444.  
  11445. Finds first blank line starting from current line. 
  11446.  
  11447.  
  11448. ΓòÉΓòÉΓòÉ 11.66. PFIRST_NONBLANK() ΓòÉΓòÉΓòÉ
  11449.  
  11450. Finds first nonblank character in the current line. 
  11451.  
  11452.  
  11453. ΓòÉΓòÉΓòÉ 11.67. PLOWERCASE() ΓòÉΓòÉΓòÉ
  11454.  
  11455. Changes all alphabetic characters in the marked area to lowercase. 
  11456.  
  11457.  
  11458. ΓòÉΓòÉΓòÉ 11.68. PMARGINS() ΓòÉΓòÉΓòÉ
  11459.  
  11460. Returns the current margins setting.  Uses pcommon_tab_margin(). 
  11461.  
  11462.  
  11463. ΓòÉΓòÉΓòÉ 11.69. PMARK(mt) ΓòÉΓòÉΓòÉ
  11464.  
  11465. Marks at the cursor position; receives the mark type as an argument. 
  11466.  
  11467.  
  11468. ΓòÉΓòÉΓòÉ 11.70. PMARK_WORD() ΓòÉΓòÉΓòÉ
  11469.  
  11470. Marks the word pointed at by the cursor.  If the cursor is on a space the word 
  11471. at the right is marked.  If there is no word on the right, the word on the left 
  11472. is marked. 
  11473.  
  11474.  
  11475. ΓòÉΓòÉΓòÉ 11.71. PMOVE_MARK() ΓòÉΓòÉΓòÉ
  11476.  
  11477. Implements the movemark statement for character marks by calling pcopy_mark() 
  11478. and pcopy_delete(). 
  11479.  
  11480.  
  11481. ΓòÉΓòÉΓòÉ 11.72. PPUT_STRING_BACK(string) ΓòÉΓòÉΓòÉ
  11482.  
  11483. Puts string back into marked area on current line. 
  11484.  
  11485.  
  11486. ΓòÉΓòÉΓòÉ 11.73. PRESTORE_MARK(savemark) ΓòÉΓòÉΓòÉ
  11487.  
  11488. Marks the area specified in savemark, where savemark  is a concatenated string 
  11489. composed of the components: first_line, last_line, first_col, last_col, fileid, 
  11490. marktype. 
  11491.  
  11492.  
  11493. ΓòÉΓòÉΓòÉ 11.74. PRESTORE_POS(save_pos) ΓòÉΓòÉΓòÉ
  11494.  
  11495. Resets the cursor position according to save_pos, a string composed of the 
  11496. concatenation of the fields:  .col, .line, .cursorx, and .cursory. 
  11497.  
  11498.  
  11499. ΓòÉΓòÉΓòÉ 11.75. PRINTER_READY() ΓòÉΓòÉΓòÉ
  11500.  
  11501. In EPM this procedure will always return ready. It remains for compatibility 
  11502. with previous E macros. 
  11503.  
  11504.  
  11505. ΓòÉΓòÉΓòÉ 11.76. PROOF1(word) ΓòÉΓòÉΓòÉ
  11506.  
  11507. Calls Lexam to spell check for the word specified by word. 
  11508.  
  11509.  
  11510. ΓòÉΓòÉΓòÉ 11.77. PROOF2() ΓòÉΓòÉΓòÉ
  11511.  
  11512. Calls Lexam to begin spell-checking at the current word. 
  11513.  
  11514.  
  11515. ΓòÉΓòÉΓòÉ 11.78. PSAVE_MARK(var savemark) ΓòÉΓòÉΓòÉ
  11516.  
  11517. Saves the specifications of the currently marked area in savemark, a string 
  11518. composed of the concatenation of: first_line, last_line, first_col, last_col, 
  11519. fileid, and marktype. 
  11520.  
  11521.  
  11522. ΓòÉΓòÉΓòÉ 11.79. PSAVE_POS(var save_pos) ΓòÉΓòÉΓòÉ
  11523.  
  11524. Saves the cursor position according to save_pos, a string composed of the 
  11525. concatenation of the fields:  .line, .col, .cursorx, and .cursory. 
  11526.  
  11527.  
  11528. ΓòÉΓòÉΓòÉ 11.80. PSET_MARK(firstline, lastline, firstcol, lastcol, mt, fileid) ΓòÉΓòÉΓòÉ
  11529.  
  11530. Marks the area designated by the parameters.  The firstline, lastline, firstcol 
  11531. and lastcol refer to position of the text in the file.  The mt is the mark type 
  11532. (block, line, or character).  The fileid is the id number of the file to be 
  11533. marked. 
  11534.  
  11535.  
  11536. ΓòÉΓòÉΓòÉ 11.81. PTABS() ΓòÉΓòÉΓòÉ
  11537.  
  11538. Calls pcommon_tab_margin() to return tab settings. 
  11539.  
  11540.  
  11541. ΓòÉΓòÉΓòÉ 11.82. PUPPERCASE() ΓòÉΓòÉΓòÉ
  11542.  
  11543. Converts all alphabetic characters in the marked area to uppercase letters. 
  11544.  
  11545.  
  11546. ΓòÉΓòÉΓòÉ 11.83. QUITFILE() -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  11547.  
  11548. Issues quit command after checking windowing and modify status. 
  11549.  
  11550.  
  11551. ΓòÉΓòÉΓòÉ 11.84. QUITFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11552.  
  11553. Issues quit command after checking windowing and modify status. 
  11554.  
  11555.  
  11556. ΓòÉΓòÉΓòÉ 11.85. REGISTER_MOUSEHANDLER(IsGlobal, event, mcommand) ΓòÉΓòÉΓòÉ
  11557.  
  11558. Allows the binding of mouse actions to commands. Mouse actions can be global or 
  11559. local. Mouse actions will be processed as follows: 
  11560.  
  11561.  1. local mouse action definition 
  11562.  2. global mouse action definition 
  11563.  3. mouse action ignored 
  11564.  
  11565. The variable IsGlobal determines whether the mouse action described is local or 
  11566. global. The variable event determines the mouse action to be bound with the 
  11567. command listed in the variable mcommand. Event should be in the following 
  11568. format: 
  11569.  
  11570.         'key action state'
  11571.  
  11572. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  11573. following: 
  11574.  
  11575. BEGINDRAG           activates at the beginning of the drag 
  11576. ENDDRAG             activates at the end of a drag 
  11577. CANCELDRAG          activates if a drag is cancelled 
  11578. CLICK               activates if a button (specified by key) is single clicked 
  11579. SECONDCLK           activates if a button (specified by key) is double clicked 
  11580.  
  11581. These actions must be capitalized and have exactly one space between the key 
  11582. and the state numbers. The state should be the sum of the following: 
  11583.  
  11584. 0 = no states active 
  11585. 1 = shift key active 
  11586. 2 = control key active 
  11587. 4 = alternate key active 
  11588.  
  11589. An example of a mouse action definition is: 
  11590.  
  11591. register_mousehandler(0,'2 SECONDCLK 3','quit')
  11592.  
  11593. This would set the second click of button two on the mouse with the shift and 
  11594. control states activated to do a QUIT command. This key action would be bound 
  11595. locally to a particular file. 
  11596.  
  11597.  
  11598. ΓòÉΓòÉΓòÉ 11.86. REMOVE_TRAILING_SPACES() ΓòÉΓòÉΓòÉ
  11599.  
  11600. Calls strip() to remove all trailing blanks; no longer used by standard EPM, 
  11601. but left in for compatibility --> use strip() directly. 
  11602.  
  11603.  
  11604. ΓòÉΓòÉΓòÉ 11.87. SAVEFILE(name) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  11605.  
  11606. Issues save command with file specified in name parameter. 
  11607.  
  11608.  
  11609. ΓòÉΓòÉΓòÉ 11.88. SAVEFILE(name) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  11610.  
  11611. Issues save command with file specified, after checking whether the file is a 
  11612. host file. 
  11613.  
  11614.  
  11615. ΓòÉΓòÉΓòÉ 11.89. SAYATBOX() ΓòÉΓòÉΓòÉ
  11616.  
  11617. Use the messageNwait command instead. 
  11618.  
  11619.  
  11620. ΓòÉΓòÉΓòÉ 11.90. SCROLL_LOCK() ΓòÉΓòÉΓòÉ
  11621.  
  11622. Determines whether or not the Scroll Lock key has been set on; if so, returns 
  11623. 1; otherwise returns 0. 
  11624.  
  11625.  
  11626. ΓòÉΓòÉΓòÉ 11.91. SEARCH_PATH(AppendPath, FileName) ΓòÉΓòÉΓòÉ
  11627.  
  11628. Searches a path specifed in AppendPath for the file specified in FileName. 
  11629. Returns the pathname, if successful; a null string if unsuccessful. 
  11630.  
  11631.  
  11632. ΓòÉΓòÉΓòÉ 11.92. SELECT_EDIT_KEYS() ΓòÉΓòÉΓòÉ
  11633.  
  11634. Calls filetype() which returns the extension of the file whose fileid is 
  11635. specified in arg(1), then activates the default keyset edit_keys. In EPM this 
  11636. function is defunct. 
  11637.  
  11638.  
  11639. ΓòÉΓòÉΓòÉ 11.93. SETLT(var LT_to_use) ΓòÉΓòÉΓòÉ
  11640.  
  11641. Sets the logical terminal to use. This procedure is only active if host editing 
  11642. is included. 
  11643.  
  11644.  
  11645. ΓòÉΓòÉΓòÉ 11.94. SET_FTO(hostfile, bin var fto) ΓòÉΓòÉΓòÉ
  11646.  
  11647. Sets the file transfer options. This procedure is only active if host editing 
  11648. is included. 
  11649.  
  11650.  
  11651. ΓòÉΓòÉΓòÉ 11.95. SetMouseSet (IsGlobal, NewMSName) ΓòÉΓòÉΓòÉ
  11652.  
  11653. Sets the current mouse action definition keys to the NewMSName. If IsGlobal is 
  11654. true then the effects will be global, if IsGlobal if false then the new 
  11655. settings will only affect the local file and not the rest of the files in the 
  11656. ring. 
  11657.  
  11658.  
  11659. ΓòÉΓòÉΓòÉ 11.96. SetTitleText() ΓòÉΓòÉΓòÉ
  11660.  
  11661. Sets the text in the editor's active title bar. 
  11662.  
  11663.  
  11664. ΓòÉΓòÉΓòÉ 11.97. SHOWWINDOW() ΓòÉΓòÉΓòÉ
  11665.  
  11666. Allows the edit window to be invisible or visible. 
  11667.  
  11668.  
  11669. ΓòÉΓòÉΓòÉ 11.98. SKIP_SPACES() ΓòÉΓòÉΓòÉ
  11670.  
  11671. Performs upon universal variables input (a string) and i (a position in the 
  11672. string) set by next_sym(); increments i beyond any blank spaces. 
  11673.  
  11674.  
  11675. ΓòÉΓòÉΓòÉ 11.99. SORT(firstline, lastline, firstcol, lastcol, fileid) ΓòÉΓòÉΓòÉ
  11676.  
  11677. Sorts the text in the area specified by the parameters. The first four 
  11678. arguements outlines the area of the text to be sorted and the fifth is the id 
  11679. number of the file to be sorted. 
  11680.  
  11681.  
  11682. ΓòÉΓòÉΓòÉ 11.100. SPELLWORD() ΓòÉΓòÉΓòÉ
  11683.  
  11684. Checks the word at the cursor position, removing punctuation characters.  It is 
  11685. assumed that the cursor is positioned at the beginning of the word.  (Used by 
  11686. proof2 and proofword.)  If it's a valid word then check the spelling of the 
  11687. word using the lexam opcode.  If a valid result is returned place it in a PM 
  11688. list box using the 'listbox' procedure. Returns the length of the word found. 
  11689. The optional argument is a string containing a button name.  E.g., '/Next' 
  11690.  
  11691.  
  11692. ΓòÉΓòÉΓòÉ 11.101. SPLITLINES() ΓòÉΓòÉΓòÉ
  11693.  
  11694. Inserts a line; moves the text from the cursor position to the end of line onto 
  11695. the new line; and indents the new line to the column of the first non-blank 
  11696. character of the line preceding it. 
  11697.  
  11698.  
  11699. ΓòÉΓòÉΓòÉ 11.102. SUBDIR() ΓòÉΓòÉΓòÉ
  11700.  
  11701. Uses SUBDIR if in DOS; uses FILEFIND if in OS/2 protect mode; then calls 
  11702. find_routine() to verify that the external utility program exists, and to get 
  11703. its path. 
  11704.  
  11705.  
  11706. ΓòÉΓòÉΓòÉ 11.103. SYNONYM() ΓòÉΓòÉΓòÉ
  11707.  
  11708. Checks the next word on the line for its possible synonyms. If synonyms are 
  11709. found a PM list box is displayed showing the possible new words. 
  11710.  
  11711.  
  11712. ΓòÉΓòÉΓòÉ 11.104. TRUNC(num) ΓòÉΓòÉΓòÉ
  11713.  
  11714. Truncates that part (if any) of num after a decimal point. 
  11715.  
  11716.  
  11717. ΓòÉΓòÉΓòÉ 11.105. UNLOCK(file) ΓòÉΓòÉΓòÉ
  11718.  
  11719. Attempts to unlock a previously locked file in a LAN situation. Returns a zero 
  11720. if successful; a one if unsuccessful. This procedure is only available if 
  11721. requested with the WANT_LAN_SUPPORT option variable. 
  11722.  
  11723.  
  11724. ΓòÉΓòÉΓòÉ 11.106. VMFILE(var name, var cmdline) ΓòÉΓòÉΓòÉ
  11725.  
  11726. Checks to make sure that a host filename (name) is of the correct form. 
  11727.  
  11728.  
  11729. ΓòÉΓòÉΓòÉ 11.107. WINDOWSIZE1(row,col,x,y) ΓòÉΓòÉΓòÉ
  11730.  
  11731. Sizes a window row high and col wide based at the lower left hand corner 
  11732. coordinates of x and y. An optional fifth argument sets: 
  11733.  
  11734. 1 = size window 
  11735. 2 = move window 
  11736. 3 = both (default) 
  11737.  
  11738.  
  11739. ΓòÉΓòÉΓòÉ 12. Return Codes ΓòÉΓòÉΓòÉ
  11740.  
  11741.   RC    Error strings
  11742.  ----  -----------------
  11743.    -1  Unable to Initialize interpreter object
  11744.    -2  File not found
  11745.    -3  Path not found
  11746.    -4  Too many open files
  11747.    -5  Access denied
  11748.    -6  DOS ERROR: Message not available
  11749.    -7  Memory control blocks destroyed. Save files and reboot.
  11750.    -8  Insufficient memory
  11751.    -9  Error Building SubMenu
  11752.   -10  Error Building Menu Item
  11753.  
  11754.   -11  Error Showing Menu
  11755.   -12  Error Deleting Menu
  11756.   -13  Too Many AVIO window
  11757.   -14  DOS ERROR: Message not available
  11758.   -15  Invalid drive
  11759.   -16  DOS ERROR: Message not available
  11760.   -17  DIS ERROR: Message not available
  11761.   -18  No more files
  11762.   -19  Disk is write-protected
  11763.   -20  Unknown unit
  11764.  
  11765.   -21  Drive not ready
  11766.   -22  Unknown command
  11767.   -23  Data error (CRC)
  11768.   -24  Bad request structure length
  11769.   -25  Seek error
  11770.   -26  Unknown media type
  11771.   -27  Sector not found
  11772.   -28  Printer out of paper
  11773.   -29  Write fault
  11774.   -30  Read fault
  11775.  
  11776.   -31  General failure
  11777.   -32  ERROR: Message not available
  11778.  ...   ERROR: Message not available
  11779.  -253  ERROR: Message not available
  11780.  -254  Numeric overflow or underflow
  11781.  -255  Invalid number of arguments
  11782.  -256  Recursion too deep
  11783.  -257  Invalid number of parameters
  11784.  -258  Out of string space
  11785.  -259  Expression stack overflow
  11786.  -260  Invalid fileid
  11787.  
  11788.  -261  Illegal opcode
  11789.  -262
  11790.  -263  Invalid argument
  11791.  -264  For loops nested too deep
  11792.  -265  Divide by zero
  11793.  -266  Unable to shrink
  11794.  -267  Invalid call by reference
  11795.  -268  Procedure needs more arguments
  11796.  -269  User Break. Command halted
  11797.  -270  Not enough memory
  11798.  
  11799.  -271  Error in margin settings
  11800.  -272  Error in tab settings
  11801.  -273  String not found
  11802.  -274  Unknown command
  11803.  -275  Missing filename
  11804.  -276  Line too long to join
  11805.  -277  Too many files
  11806.  -278  Line(s) truncated
  11807.  -279  Text already marked
  11808.  -280  Text not marked
  11809.  
  11810.  -281  Source destination conflict
  11811.  -282  New file
  11812.  -283  Line mark required
  11813.  -284  Error opening file
  11814.  -285  Error writing file
  11815.  -286  Error reading file
  11816.  -287  Insufficient disk space
  11817.  -288  Block mark required
  11818.  -289  Too many rings
  11819.  -290  Invalid EX file or incorrect version.
  11820.  
  11821.  -291  No main entry point
  11822.  -292  Error closing file
  11823.  -293  has been modified
  11824.  -294  Quit without saving?
  11825.  -295
  11826.  -296
  11827.  -297
  11828.  -298
  11829.  -299
  11830.  -300  Command dialog box too long to shell
  11831.  
  11832.  -301  Cannot unlink module in use
  11833.  -302  Cannot unlink base keyset module
  11834.  -303  Internal error: unlink invalid mod
  11835.  -304  Linking module error
  11836.  -305  DEFMAIN not found
  11837.  -306  DEFINIT not found
  11838.  -307  Link: file not found
  11839.  -308  Link: invalid filename
  11840.  -309  File already linked
  11841.  -310  Unlink: unknown module
  11842.  
  11843.  -311  Unlink: bad module filename
  11844.  -312  Call: duplicated proc
  11845.  -313  Call: unknown proc
  11846.  -314  Grep: memory error
  11847.  -315  Grep: missing ]
  11848.  -316  Grep: bad range in [a-z]
  11849.  -317  Grep: empty []
  11850.  -318  Grep: regular expression too long
  11851.  -319  Dynalink: incorrect number of parameters
  11852.  -320
  11853.  
  11854.  -321  Cannot find keyset
  11855.  -322  Dynalink: unrecognized library name
  11856.  -323  Line number invalid or too large for file
  11857.  -324  Keyboard status failed
  11858.  -325  Buffer creation size too large
  11859.  -326  Dynalink: unrecognized procedure name
  11860.  -327  Too many keysets
  11861.  -328
  11862.  -328  Invalid first parameter
  11863.  -329  Invalid second parameter
  11864.  -330  Invalid third parameter
  11865.  
  11866.  -331  Invalid fourth parameter
  11867.  -332  Invalid fifth parameter
  11868.  -333  Invalid sixth parameter
  11869.  -334  Invalid seventh parameter
  11870.  -335  Invalid Subcommand
  11871.  -336  Invalid column number
  11872.  -337  Invalid array identifier
  11873.  -338  Array already exists:
  11874.  -339  ERROR: Message not available
  11875.   ...  ERROR: Message not available
  11876.   etc.
  11877.  
  11878.  
  11879. ΓòÉΓòÉΓòÉ 13. ET Compilation Error Message Explanations ΓòÉΓòÉΓòÉ
  11880.  
  11881. If you have made changes to the configuration or have programmed your own 
  11882. macros in the E language, this section is important to you. Any syntactic or 
  11883. semantic errors in your programming, will be noted by the ET compiler. The 
  11884. following section describes each compilation error in simple terms. When you 
  11885. receive an error from ET, note the error message and look it up in the 
  11886. following list. The messages appear in alphabetic order. 
  11887.  
  11888.  
  11889. ΓòÉΓòÉΓòÉ 13.1. Column specification out of range. ΓòÉΓòÉΓòÉ
  11890.  
  11891. The value specified for a column position exceeds the compiler's maximum line 
  11892. length of 255. 
  11893.  
  11894.  
  11895. ΓòÉΓòÉΓòÉ 13.2. Comment not terminated. ΓòÉΓòÉΓòÉ
  11896.  
  11897. You have begun a comment with the '/*' string but never ended it with a 
  11898. matching '*/'. This means that all code after the comment has been ignored by 
  11899. the compiler.  Reaching an end of file has alerted the compiler to the fact 
  11900. that the comment was not terminated. 
  11901.  
  11902.  
  11903. ΓòÉΓòÉΓòÉ 13.3. DEFMAIN already defined. ΓòÉΓòÉΓòÉ
  11904.  
  11905. You have defined more than one main procedure using the DEFMAIN statement. Only 
  11906. one can be defined at a time. See User's Manual section Definition Primitives 
  11907. for more information. 
  11908.  
  11909.  
  11910. ΓòÉΓòÉΓòÉ 13.4. EX code too big. ΓòÉΓòÉΓòÉ
  11911.  
  11912. The code that ET is producing after compiling your input file is taking up more 
  11913. space than allowable. The maximum amount of memory available for a .EX file is 
  11914. 65,500 bytes. 
  11915.  
  11916.  
  11917. ΓòÉΓòÉΓòÉ 13.5. Expecting '('. ΓòÉΓòÉΓòÉ
  11918.  
  11919. The compiler was expecting a left parenthesis.  Possible reasons for this are 
  11920. that you have called a procedure and omitted the parentheses after the 
  11921. procedure name. The syntax for procedure calls is either: 
  11922.  
  11923.      proc_name([parameters])
  11924.  OR  call proc_name([parameters])
  11925.  
  11926.  
  11927. ΓòÉΓòÉΓòÉ 13.6. Expecting ')'. ΓòÉΓòÉΓòÉ
  11928.  
  11929. The compiler was expecting a right parenthesis to match a left parenthesis 
  11930. which was read in earlier.  Perhaps you have not matched each parenthesis in a 
  11931. procedure call or complex expression.  For example, if the following expression 
  11932. was typed in YOUR_FILE.E:           call proc_test( k=( (a*b)+ 8 ),  you would 
  11933. have received such an error message because there are three left parentheses 
  11934. and only two right parentheses. 
  11935.  
  11936.  
  11937. ΓòÉΓòÉΓòÉ 13.7. Expecting ';'. ΓòÉΓòÉΓòÉ
  11938.  
  11939. The compiler's newline symbol is the semi-colon (';'). Therefore, they are 
  11940. often interchangeable. A statement was encountered whose syntax requires either 
  11941. a semi-colon or a new line in a specific place, but no such semi-colon or new 
  11942. line was found. For example, each INCLUDE statement is required to end with 
  11943. either a semi-colon or a new line. All of the following examples are 
  11944. syntactically correct: 
  11945.  
  11946. include 'mystuff.e' ; include 'mykeys.e'
  11947.  
  11948. AND
  11949.  
  11950. include 'mystuff.e'
  11951. include 'mykeys.e'
  11952.  
  11953. AND
  11954.  
  11955. include 'mystuff.e' ; x = 1
  11956. However, you could not have multiple INCLUDE statements on one line without a 
  11957. semi-colon as separator. 
  11958.  
  11959.  
  11960. ΓòÉΓòÉΓòÉ 13.8. Expecting ','. ΓòÉΓòÉΓòÉ
  11961.  
  11962. A statement has been found whose syntax dictates that there should be a comma 
  11963. in a specific position, yet no comma was found there. The most likely cause of 
  11964. this error message is that you have called some built-in procedure, but have 
  11965. not given the correct number of parameters.  The compiler is looking for a 
  11966. comma which would indicate that there are more parameters still to come. 
  11967.  
  11968.  
  11969. ΓòÉΓòÉΓòÉ 13.9. Expecting '='. ΓòÉΓòÉΓòÉ
  11970.  
  11971. A statement was found whose syntax dictates that an assignment operator must 
  11972. occur at some specific place in the statement, but no such assignment symbol 
  11973. was found.  One example of such a statement is the FOR statement.  As shown in 
  11974. section Conditional and Loop Statements, there must be a '=' symbol immediately 
  11975. after the loop variable name. The other likely causes of this error are syntax 
  11976. errors in: (1) the FUNCTIONKEYTEXT statement (see Built-in Statements and 
  11977. Procedures for correct syntax) and (2) a CONST declaration (see Constants). 
  11978.  
  11979.  
  11980. ΓòÉΓòÉΓòÉ 13.10. Expecting an identifier. ΓòÉΓòÉΓòÉ
  11981.  
  11982. A statement has been found whose syntax dictates that there should be an 
  11983. identifier in a specific position, yet no such identifier was found. One 
  11984. possible cause of this error message is that you have defined a keyset with the 
  11985. DEFKEYS keyword, but forgot to name the keyset. See section Key Definitions 
  11986. (DEF and DEFKEYS) for the syntax of the DEFKEYS statement. 
  11987.  
  11988. Another less obvious reason for this error is that you have used a keyword or 
  11989. procedure name in place of an identifier. For example, if you try to declare: 
  11990.  
  11991. UNIVERSAL function_key_text
  11992. Since function_key_text is a predefined universal variable, it is a reserved 
  11993. word, and therefore is not considered an identifier. 
  11994.  
  11995.  
  11996. ΓòÉΓòÉΓòÉ 13.11. Expecting constant expression. ΓòÉΓòÉΓòÉ
  11997.  
  11998. You have begun a constant definition statement by using the CONST keyword, but 
  11999. you have not assigned a constant expression (an expression involving only 
  12000. arithmetic operators, numbers and previously defined constants) to an 
  12001. identifier. Please use the following syntax: 
  12002.  
  12003. CONST
  12004.    max_id=7
  12005.    max_len=max_id * 10
  12006.  
  12007.  
  12008. ΓòÉΓòÉΓòÉ 13.12. Expecting DEFinition primitive. ΓòÉΓòÉΓòÉ
  12009.  
  12010. The compiler is expecting a definition primitive, i.e. one of the DEFxxxx 
  12011. statements, a SET statement, an INCLUDE statement or a CONST statement. 
  12012. Unfortunately, this error message can be triggered at inappropriate times when 
  12013. the compiler is confused by the syntax it has read. This error message often 
  12014. complains about a statement in the middle of a DEF construct. Do not 
  12015. necessarily assume that you need to add a DEF. Each of these cases must be 
  12016. evaluated individually. 
  12017.  
  12018. However, this error message does have value when it reports on a statement that 
  12019. has been issued outside a DEF construct. Remember that you cannot have 
  12020. statements outside a DEFxxxx block. All statements must be contained within a 
  12021. DEFxxxx primitive. Often a statement issued outside a DEF is not reported 
  12022. because since there is no keyword or statement to terminate the DEF, the 
  12023. compiler assumes that the statement belongs to the last DEF. However, there are 
  12024. cases when it will correctly report this error. For example, assume the 
  12025. following statements occur in some file TEST.E: 
  12026.  
  12027. CONST
  12028.    stuff = 1
  12029.  
  12030. sayerror "stuff is " stuff
  12031.  
  12032. defproc test1()
  12033.    temp = 45 * 36
  12034. During compilation of TEST.E, the user would receive an "Expecting DEF" error 
  12035. message with an arrow pointing to the sayerror statement. Since a CONST 
  12036. statement is a DEF primitive, it ends all previous DEFS, and since sayerror is 
  12037. not accepted as part of a CONST construct, an error is reported. 
  12038.  
  12039.  
  12040. ΓòÉΓòÉΓòÉ 13.13. Expecting DO ΓòÉΓòÉΓòÉ
  12041.  
  12042. A WHILE construct has been started, i.e. a WHILE keyword has been found, but 
  12043. the keyword DO is missing from the statement.  Please check the section on 
  12044. Conditional and Loop Statements for the syntax of the WHILE DO statement. 
  12045.  
  12046.  
  12047. ΓòÉΓòÉΓòÉ 13.14. Expecting DO WHILE or DO FOREVER ΓòÉΓòÉΓòÉ
  12048.  
  12049. One of the DO constructs has been started, i.e.  a DO keyword was found, but 
  12050. the rest of the statement's syntax does not fit any of the DO constructs ( DO 
  12051. WHILE, DO FOREVER, and/or DO (FOR) ).  See section Conditional and Loop 
  12052. Statements for the syntax of the DO construct. 
  12053.  
  12054.  
  12055. ΓòÉΓòÉΓòÉ 13.15. Expecting END to DO loop. ΓòÉΓòÉΓòÉ
  12056.  
  12057. One of the DO constructs ( DO-WHILE, DO FOREVER or DO (FOR) ) has been started, 
  12058. but no 'END' or 'ENDDO' statement has been found to end the loop. Please refer 
  12059. to section Conditional and Loop Statements for the syntax of the DO constructs. 
  12060.  
  12061.  
  12062. ΓòÉΓòÉΓòÉ 13.16. Expecting ENDFOR. ΓòÉΓòÉΓòÉ
  12063.  
  12064. A FOR construct has been started, i.e.  a FOR keyword has been found, but no 
  12065. ENDFOR keyword has been found to end the loop. Please check the section on 
  12066. Conditional and Loop Statements for the syntax of the FOR statement. 
  12067.  
  12068.  
  12069. ΓòÉΓòÉΓòÉ 13.17. Expecting ENDIF to terminate IF statement. ΓòÉΓòÉΓòÉ
  12070.  
  12071. An IF keyword has been read, but no ENDIF statement has been found to end the 
  12072. block of statements encased by the IF condition.  See the section on 
  12073. Conditional and Loop Statements for the syntax of the IF statement. 
  12074.  
  12075.  
  12076. ΓòÉΓòÉΓòÉ 13.18. Expecting ENDLOOP to terminate LOOP. ΓòÉΓòÉΓòÉ
  12077.  
  12078. A LOOP construct has been started, but no ENDLOOP statement has been found to 
  12079. end the loop.  See section Conditional and Loop Statements for the syntax of 
  12080. the LOOP construct. 
  12081.  
  12082.  
  12083. ΓòÉΓòÉΓòÉ 13.19. Expecting ENDWHILE to terminate WHILE. ΓòÉΓòÉΓòÉ
  12084.  
  12085. A WHILE construct has been started, but no ENDWHILE statement has been found to 
  12086. end the loop. Please refer to section Conditional and Loop Statements for the 
  12087. syntax of the WHILE construct. 
  12088.  
  12089.  
  12090. ΓòÉΓòÉΓòÉ 13.20. Expecting procedure name. ΓòÉΓòÉΓòÉ
  12091.  
  12092. A procedure definition has been started, i.e. a DEFPROC keyword has been found, 
  12093. but no procedure name appeared after it to identify the procedure. Please see 
  12094. the section on Definition Primitives for the syntax of a DEFPROC statement. 
  12095.  
  12096.  
  12097. ΓòÉΓòÉΓòÉ 13.21. Expecting quoted string. ΓòÉΓòÉΓòÉ
  12098.  
  12099. A statement was found whose syntax dictates that a quoted string must occur at 
  12100. some specific place in the statement, but no such quoted string was found. An 
  12101. example of such a statement is the SAY statement. As shown in section Built-in 
  12102. Statements and Procedures, there must be a quoted string immediately after the 
  12103. SAY keyword. 
  12104.  
  12105.  
  12106. ΓòÉΓòÉΓòÉ 13.22. Expecting THEN. ΓòÉΓòÉΓòÉ
  12107.  
  12108. An IF construct has been started, i.e.  an IF keyword was found, but no THEN 
  12109. keyword can been found.  See section Conditional and Loop Statements for the 
  12110. syntax of the IF-THEN-ELSE statement. 
  12111.  
  12112.  
  12113. ΓòÉΓòÉΓòÉ 13.23. Expecting TO. ΓòÉΓòÉΓòÉ
  12114.  
  12115. A FOR construct has been started, i.e. a FOR keyword has been found, but the 
  12116. keyword TO is missing from the statement.  Please check the section Conditional 
  12117. and Loop Statements for the syntax of the FOR statement. 
  12118.  
  12119.  
  12120. ΓòÉΓòÉΓòÉ 13.24. Expecting VALUE. ΓòÉΓòÉΓòÉ
  12121.  
  12122. A PARSE statement has been started, i.e. the keyword PARSE was found, but 
  12123. neither a VALUE nor an ARG keyword can been found.  See the User's Manual 
  12124. section The Parse Statement for the syntax of the PARSE statement. 
  12125.  
  12126.  
  12127. ΓòÉΓòÉΓòÉ 13.25. Expecting variable name. ΓòÉΓòÉΓòÉ
  12128.  
  12129. A statement was found whose syntax dictates that a variable name must occur at 
  12130. some specific place in the statement, but no such variable name was found. An 
  12131. example of such a statement is the FOR statement. As shown in the section on 
  12132. Conditional and Loop Statements, there must be a variable name (the loop 
  12133. variable to be incremented) immediately after the FOR keyword. 
  12134.  
  12135.  
  12136. ΓòÉΓòÉΓòÉ 13.26. Expecting WITH. ΓòÉΓòÉΓòÉ
  12137.  
  12138. A PARSE-VALUE statement has been started, i.e.  the keywords PARSE and VALUE 
  12139. were found, but a WITH keyword cannot be found.  See the section on The Parse 
  12140. Statement for the syntax of the PARSE statement. 
  12141.  
  12142.  
  12143. ΓòÉΓòÉΓòÉ 13.27. Expression not assignment compatible. ΓòÉΓòÉΓòÉ
  12144.  
  12145. The compiler has detected an assignment in which the expression on the right 
  12146. side of the assignment operator can not be assigned to the expression or 
  12147. identifier on the left side.  The most common cause of this is that you have 
  12148. tried to assign a value to something other than a variable, i.e. a constant or 
  12149. procedure. 
  12150.  
  12151.  
  12152. ΓòÉΓòÉΓòÉ 13.28. Expression too complex. ΓòÉΓòÉΓòÉ
  12153.  
  12154. An expression is any combination of identifiers (variables, constants, and/or 
  12155. procedures), numbers and operators that fit the syntax of a language. A complex 
  12156. expression is one that contains expressions within itself. For example, the 
  12157. following is an expression: 
  12158.  
  12159. test_var + 6.
  12160. An example of a complex expression would be: 
  12161.  
  12162. ( (test_var + 6) * 8).
  12163. Each of the innermost expressions must be evaluated before the entire 
  12164. expression can be assigned a value.  The specified expression in your input 
  12165. file is too complicated, i.e.  has too many expressions within itself, for the 
  12166. compiler to evaluate it.  Please break the expression into several less complex 
  12167. expressions.  For example, let us assume that the following expression was too 
  12168. complex: 
  12169.  
  12170. call proc_test( k=( (a*b)+ 8 ) ),
  12171. You could simplify the call to proc_test by assigning some of the inner 
  12172. expressions to temporary variables.  One solution would be: 
  12173.  
  12174. temp1 = a*b
  12175. k = temp1 + 8
  12176. call proc_test(k)
  12177. Note: The above expression is a simple example. It is not too complex for the 
  12178. compiler. ET allows for 40 expressions within an expression. 
  12179.  
  12180.  
  12181. ΓòÉΓòÉΓòÉ 13.29. Extraneous parameters. ΓòÉΓòÉΓòÉ
  12182.  
  12183. You have specified too many parameters in the command dialog box.  The syntax 
  12184. is:      ET [options] inputfile[.e] [outputfile[.ex]]  Remember that any 
  12185. options MUST PRECEDE the input and output filenames! 
  12186.  
  12187.  
  12188. ΓòÉΓòÉΓòÉ 13.30. FUNCTION_KEY_TEXT exceed max number of characters. ΓòÉΓòÉΓòÉ
  12189.  
  12190. You have attempted to change the text displayed at the bottom of the screen 
  12191. which describes what function each function key performs. The text that you 
  12192. have chosen is longer than the maximum number of characters allowed, which is 
  12193. 80. 
  12194.  
  12195.  
  12196. ΓòÉΓòÉΓòÉ 13.31. Identifier already defined as same or different type. ΓòÉΓòÉΓòÉ
  12197.  
  12198. You are trying to use an identifier to name a variable, constant or procedure 
  12199. uniquely, yet the identifier has already been used in the same scope for 
  12200. another purpose. Check over your program and rename the appropriate 
  12201. identifiers. 
  12202.  
  12203.  
  12204. ΓòÉΓòÉΓòÉ 13.32. Identifier too long. ΓòÉΓòÉΓòÉ
  12205.  
  12206. The number of characters in the name of the specified variable, constant, 
  12207. procedure, etc. exceeds the maximum allowance of 255 characters. Please rename 
  12208. it with fewer letters and/or numbers. 
  12209.  
  12210.  
  12211. ΓòÉΓòÉΓòÉ 13.33. Illegal character. ΓòÉΓòÉΓòÉ
  12212.  
  12213. This character does not make sense or is not allowed in the E language. One 
  12214. example of E code which would yield this error message is if a unary minus or 
  12215. plus operator is used preceding an alphabetic character rather than a digit. 
  12216. For example, 
  12217.  
  12218. temp = +c
  12219. These unary operators make sense only with numeric operands. 
  12220.  
  12221.  
  12222. ΓòÉΓòÉΓòÉ 13.34. Illegal operator. ΓòÉΓòÉΓòÉ
  12223.  
  12224. An operator is some function to be performed on its operands. Operands are 
  12225. identifiers or constant values that are acted upon by operators.  Examples of 
  12226. operators are: '+' (addition), '=' (assignment), 'NOT' (logical negation), and 
  12227. '<=' (less than or equal). The operator you have specified does not exist in 
  12228. the E language. Please check the Operators section for a complete list of 
  12229. operators. 
  12230.  
  12231.  
  12232. ΓòÉΓòÉΓòÉ 13.35. INCLUDES nested too deep. ΓòÉΓòÉΓòÉ
  12233.  
  12234. A nested INCLUDE statement means that a file, for example FILE1.E, contains a 
  12235. statement:           include 'file2.e'  and that file2.e also contains an 
  12236. INCLUDE statement, which includes a third file. ET only allows for 5 levels of 
  12237. nested include files. You have exceeded this limit. Please reorganize your 
  12238. files. 
  12239.  
  12240.  
  12241. ΓòÉΓòÉΓòÉ 13.36. Internal error in POPS. ΓòÉΓòÉΓòÉ
  12242.  
  12243. This error is internal to the workings of the ET compiler. It has nothing to do 
  12244. with user input. Please send a note to the userid EOS2 at YORKTOWN with 
  12245. information regarding the error. 
  12246.  
  12247.  
  12248. ΓòÉΓòÉΓòÉ 13.37. Invalid argument. ΓòÉΓòÉΓòÉ
  12249.  
  12250. The argument specified in the procedure call is incorrect. Specifically, the 
  12251. string argument in the SAYERROR() procedure call does not match any of the 
  12252. strings associated with error messages known to the compiler. Read the 
  12253. description of the usage of the SAYERROR() procedure in section Built-in 
  12254. Statements and Procedures for more information. 
  12255.  
  12256.  
  12257. ΓòÉΓòÉΓòÉ 13.38. Invalid color. ΓòÉΓòÉΓòÉ
  12258.  
  12259. You are trying to redefine the colors of the E editor; however the syntax of 
  12260. your statement is incorrect.  Possible explanations of this are that: (1) you 
  12261. have not used an identifier to name the constant, (2) you have not used a valid 
  12262. color value name, or (3) you have not separated each assignment with either a 
  12263. semi-colon or a new line. An example of the syntax is:    /* color example */ 
  12264. TEXTCOLOR   = BLUE  For more information on usage, see section Changing the 
  12265. Default Configuration in The EPM User's Guide. For a list of valid color value 
  12266. names, see the top of the COLORS.E file which contains the values of the 
  12267. defaults. 
  12268.  
  12269.  
  12270. ΓòÉΓòÉΓòÉ 13.39. Invalid cursor setting. ΓòÉΓòÉΓòÉ
  12271.  
  12272. You are trying to set the default cursor sizes, but the values you have given 
  12273. in the set cursors statement are not valid. Valid values are 1 through 15. 
  12274.  
  12275.  
  12276. ΓòÉΓòÉΓòÉ 13.40. Invalid expression. ΓòÉΓòÉΓòÉ
  12277.  
  12278. This expression is not a valid expression in the E language. Please refer to E 
  12279. Language Syntax for a list of all valid expressions. 
  12280.  
  12281.  
  12282. ΓòÉΓòÉΓòÉ 13.41. Invalid field name. ΓòÉΓòÉΓòÉ
  12283.  
  12284. You have attempted to manipulate a field in the fileid structure; however the 
  12285. field you have named does not exist. Check section Fileid Structure for a list 
  12286. of all field names. 
  12287.  
  12288.  
  12289. ΓòÉΓòÉΓòÉ 13.42. Invalid key name. ΓòÉΓòÉΓòÉ
  12290.  
  12291. A KEY keyword has been found, but no valid keyname followed the keyword. There 
  12292. are a limited number of keys on the keyboard that can be redefined. For a 
  12293. complete list of those keys, see E Language Syntax. 
  12294.  
  12295.  
  12296. ΓòÉΓòÉΓòÉ 13.43. Invalid margin setting. ΓòÉΓòÉΓòÉ
  12297.  
  12298. You are trying to reset the margins for the E editor, but the column values of 
  12299. your desired margin settings are invalid. Possible causes of this error are 
  12300. that you have tried: (1) to set a margin past E's maximum margin column (254), 
  12301. (2) to set a margin in a zero or negative column, or (3) to set the left margin 
  12302. in a column greater than the right margin. Please refer to The EPM User's Guide 
  12303. for examples of the correct syntax. 
  12304.  
  12305.  
  12306. ΓòÉΓòÉΓòÉ 13.44. Invalid number of parameters. ΓòÉΓòÉΓòÉ
  12307.  
  12308. You have called a procedure with fewer parameters than it is defined to have. 
  12309. For example, in the section Built-in Statements and Procedures, look at the 
  12310. description of the procedure SUBSTR(). SUBSTR() is defined to have two, three 
  12311. or four parameters, but it requires AT LEAST two parameters to perform its 
  12312. function.  If the user invokes the function with only one argument, for example 
  12313. SUBSTR('abc'), an error will occur. 
  12314.  
  12315.  
  12316. ΓòÉΓòÉΓòÉ 13.45. Invalid numeric. ΓòÉΓòÉΓòÉ
  12317.  
  12318. You have attempted to perform some arithmetic function on variables that are 
  12319. not numeric; or you have mixed other characters in with some digits. For 
  12320. example, 35.x or 3temp_var are not valid expressions. The compiler expects 
  12321. identifiers to BEGIN WITH AN ALPHABETIC CHARACTER, and expects numbers to 
  12322. consist solely of digits and certain special characters (for example, the 
  12323. decimal point "."). 
  12324.  
  12325.  
  12326. ΓòÉΓòÉΓòÉ 13.46. Invalid option. ΓòÉΓòÉΓòÉ
  12327.  
  12328. You have specified an option in the command dialog box which does not exist. 
  12329. Check The EPM User's Guide or section Command Summary for all possible command 
  12330. dialog box options. 
  12331.  
  12332.  
  12333. ΓòÉΓòÉΓòÉ 13.47. Invalid set name. ΓòÉΓòÉΓòÉ
  12334.  
  12335. You are trying to set a configurable option for the E editor, but the option 
  12336. you have named in the SET statement does not exist. Please check The EPM User's 
  12337. Guide for a complete list of options. 
  12338.  
  12339.  
  12340. ΓòÉΓòÉΓòÉ 13.48. Invalid tab setting. ΓòÉΓòÉΓòÉ
  12341.  
  12342. You are trying to reset the tabs for the E editor, but the column values of 
  12343. your desired tab settings are invalid. Possible causes of this error are that: 
  12344. (1) you have tried to set a tab past E's maximum column (255), (2) you have 
  12345. tried to set a tab in a negative column, or (3) you have not typed the tab 
  12346. settings in ascending order. Tab settings CANNOT be listed in a mixed order, 
  12347. for example:           tabs 5 10 20 15 30 25 ...  They must be written in 
  12348. ascending order. In the above example, the statement must be rewritten as 
  12349. follows:           tabs 5 10 15 20 25 30 ... 
  12350.  
  12351.  
  12352. ΓòÉΓòÉΓòÉ 13.49. ITERATE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  12353.  
  12354. An ITERATE statement has been issued outside one of the loop constructs (WHILE, 
  12355. LOOP, or DO).  Since the ITERATE statement only makes sense in combination with 
  12356. a loop, this is an error. See section Conditional and Loop Statements for the 
  12357. rules governing and syntax of the ITERATE statement. 
  12358.  
  12359.  
  12360. ΓòÉΓòÉΓòÉ 13.50. Keyset not defined. ΓòÉΓòÉΓòÉ
  12361.  
  12362. You have issued a KEYS statement to change the keyset to a predefined keyset; 
  12363. however the named keyset has not been defined in the current scope. In order to 
  12364. use a KEYS keyset_name statement, you must have issued a DEFKEYS keyset_name 
  12365. statement to define the named keyset and then issued a series of DEF statements 
  12366. to define the new function of the desired keys.  A sample keyset definition can 
  12367. be found in section Key Definitions (DEF and DEFKEYS). 
  12368.  
  12369.  
  12370. ΓòÉΓòÉΓòÉ 13.51. LEAVE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  12371.  
  12372. A LEAVE statement has been issued outside one of the loop constructs (WHILE, 
  12373. LOOP, or DO).  Since the LEAVE statement only makes sense in combination with a 
  12374. loop, this is an error.  See section on Conditional and Loop Statements for the 
  12375. rules governing and syntax of the LEAVE statement. 
  12376.  
  12377.  
  12378. ΓòÉΓòÉΓòÉ 13.52. Line too long. ΓòÉΓòÉΓòÉ
  12379.  
  12380. The number of characters in this line exceeds the maximum. The maximum line 
  12381. length is 255 characters. Please break-up the line using the technique 
  12382. discussed in section Line Continuations. 
  12383.  
  12384.  
  12385. ΓòÉΓòÉΓòÉ 13.53. More than max number of global variables. ΓòÉΓòÉΓòÉ
  12386.  
  12387. You have defined more global variables than the compiler allows. The maximum 
  12388. number of global variables is 8200.  Note Any variable preceded by the 
  12389. UNIVERSAL keyword is considered global, i.e. any procedure can access it. 
  12390.  
  12391.  
  12392. ΓòÉΓòÉΓòÉ 13.54. More than max number of local variables. ΓòÉΓòÉΓòÉ
  12393.  
  12394. Your procedure has been defined with more than the compiler's maximum number of 
  12395. allowable local variables, i.e. variables defined within the procedure.  The 
  12396. maximum number of locals is 1038. 
  12397.  
  12398.  
  12399. ΓòÉΓòÉΓòÉ 13.55. Not enough core. ΓòÉΓòÉΓòÉ
  12400.  
  12401. Your computer does not have enough core memory (primary memory not disk space) 
  12402. to compile the specified input file and write compiled code to an output file. 
  12403. Typically, 320K of memory is required; however if you have added a great amount 
  12404. of code to the e.e file, more memory may be necessary. 
  12405.  
  12406.  
  12407. ΓòÉΓòÉΓòÉ 13.56. Number out of range or expecting number. ΓòÉΓòÉΓòÉ
  12408.  
  12409. This error could occur for a few different reasons. The first possible cause of 
  12410. the error is incorrect syntax or semantics in a parse statement. If a '+' or 
  12411. '-' was encountered in the template portion of a PARSE statement, a number is 
  12412. expected to follow it. Either a number did not follow one of these operators or 
  12413. the number that did follow exceeded 255. Remember that the numbers in the 
  12414. template represent column specifications and therefore cannot exceed the 
  12415. maximum column. Please see section The Parse Statement for the exact syntax of 
  12416. the parse statement. 
  12417.  
  12418. Another possible cause of this error is that an arithmetic operator symbol was 
  12419. found in an expression, and yet all of the operands were either not numeric or 
  12420. exceeded the compiler's maximum number of 32,767. 
  12421.  
  12422.  
  12423. ΓòÉΓòÉΓòÉ 13.57. Number too large. ΓòÉΓòÉΓòÉ
  12424.  
  12425. This error occurs only when the compiler is translating ASCII codes preceded by 
  12426. the '\' operator. Values following such a '\' cannot exceed 255. See section 
  12427. String Expressions for a more detailed explanation of this use of the backslash 
  12428. character. 
  12429.  
  12430.  
  12431. ΓòÉΓòÉΓòÉ 13.58. Numeric overflow. ΓòÉΓòÉΓòÉ
  12432.  
  12433. You have attempted to perform some arithmetic function where the result has an 
  12434. exponent greater than 999999999. 
  12435.  
  12436.  
  12437. ΓòÉΓòÉΓòÉ 13.59. Out of symbol table space. ΓòÉΓòÉΓòÉ
  12438.  
  12439. The compiler allocates a certain amount of memory space for each variable. The 
  12440. space is needed to store necessary information relevant to that variable. 
  12441. There is not enough primary memory (not disk space) on your computer to allow 
  12442. any more variables to be used. 
  12443.  
  12444.  
  12445. ΓòÉΓòÉΓòÉ 13.60. Procedure not defined. ΓòÉΓòÉΓòÉ
  12446.  
  12447. You have called or made reference to a procedure which was never defined. 
  12448. Please define the procedure or delete the call to it.  Note: the compiler will 
  12449. not tell you where the call to the undefined procedure occurred or whether 
  12450. there are many such occurrences. 
  12451.  
  12452.  
  12453. ΓòÉΓòÉΓòÉ 13.61. String not terminated. ΓòÉΓòÉΓòÉ
  12454.  
  12455. The specified string was not enclosed with quote marks. The final quote was 
  12456. omitted. 
  12457.  
  12458.  
  12459. ΓòÉΓòÉΓòÉ 13.62. Too many arguments. ΓòÉΓòÉΓòÉ
  12460.  
  12461. You have defined a procedure or function with more than the compiler's maximum 
  12462. number of allowable arguments. The maximum number of arguments is 8. 
  12463.  
  12464.  
  12465. ΓòÉΓòÉΓòÉ 13.63. Unable to open input file. ΓòÉΓòÉΓòÉ
  12466.  
  12467. The compiler could not open the file which you listed in the command dialog box 
  12468. as the input file.  This is probably due to the fact that no such file exists. 
  12469. Check your spelling of the filename and make sure the file is in the current 
  12470. directory. 
  12471.  
  12472.  
  12473. ΓòÉΓòÉΓòÉ 13.64. Unable to open output file. ΓòÉΓòÉΓòÉ
  12474.  
  12475. The compiler cannot create the file you named in the command dialog box as the 
  12476. output file. This probably occurred because you gave a nonexistent path to the 
  12477. file. Check the spelling and accuracy of the pathname. (The default pathname is 
  12478. the current directory.) 
  12479.  
  12480.  
  12481. ΓòÉΓòÉΓòÉ 13.65. Unable to read input file. ΓòÉΓòÉΓòÉ
  12482.  
  12483. The compiler was unable to read from the input file you specified in the 
  12484. command dialog box. This maybe due to the fact that the file is locked or 
  12485. damaged. Please check the file. 
  12486.  
  12487.  
  12488. ΓòÉΓòÉΓòÉ 13.66. Unable to write output file. ΓòÉΓòÉΓòÉ
  12489.  
  12490. The compiler cannot write to the file you named in the command line as the 
  12491. output file.  This error could occur because the file is read-only or because 
  12492. no space is left on the disk. 
  12493.  
  12494.  
  12495. ΓòÉΓòÉΓòÉ 13.67. Variable not initialized. ΓòÉΓòÉΓòÉ
  12496.  
  12497. You have used a variable which was never initialized.  The variable has no 
  12498. value; therefore the expression containing it cannot be evaluated. 
  12499.  
  12500. Another common cause for this error is when a command has been issued within an 
  12501. E statement, but the command has not been quoted. Please read the section Using 
  12502. EPM Commands in E Statements for information on how to use commands in an E 
  12503. program. 
  12504.  
  12505.  
  12506. ΓòÉΓòÉΓòÉ 14. Ordinal Values of Functions Accessed via DOSCALLS.DLL ΓòÉΓòÉΓòÉ
  12507.  
  12508. This list shows the mapping between the DOS system function names and their 
  12509. ordinal values.  In order to access one of these system functions in OS/2, you 
  12510. must make a call to the function DYNALINK(), and include the function's ordinal 
  12511. value in the parameter list.  For more information, see the DYNALINK() entry in 
  12512. section Built-in Statements and Procedures. 
  12513.  
  12514. Function Name                   Ordinal Value
  12515. -------------                   -------------
  12516. DBGETKVAR                           109
  12517. DBGETOWNER                          117
  12518. DBMEMFREE                           116
  12519. DBMEMLOCK                           112
  12520. DBMEMREALLOC                        115
  12521. DBMEMUNLOCK                         113
  12522. DBPHYSINFO                          118
  12523. DBSEGALLOC                          114
  12524. DOSALLOCHUGE                         40
  12525. DOSALLOCSEG                          34
  12526. DOSALLOCSHRSEG                       35
  12527. DOSBEEP                              50
  12528. DOSBUFRESET                          56
  12529. DOSCALLBACK                         157
  12530. DOSCHDIR                             57
  12531. DOSCHGFILEPTR                        58
  12532. DOSCLIACCESS                         51
  12533. DOSCLOSE                             59
  12534. DOSCLOSESEM                          23
  12535. DOSCREATECSALIAS                     43
  12536. DOSCREATESEM                         24
  12537. DOSCWAIT                              2
  12538. DOSDELETE                            60
  12539. DOSDEVCONFIG                         52
  12540. DOSDEVIOCTL                          53
  12541. DOSDEVIOCTL2                         99
  12542. DOSDUPHANDLE                         61
  12543. DOSENTERCRITSEC                       3
  12544. DOSENUMATTRIBUTE                    204
  12545. DOSERROR                            120
  12546. DOSEXIT                               5
  12547. DOSEXITCRITSEC                        6
  12548. DOSEXITLIST                           7
  12549. DOSFILELOCKS                         62
  12550. DOSFINDCLOSE                         63
  12551. DOSFINDFIRST                         64
  12552. DOSFINDNEXT                          65
  12553.  
  12554. DOSFLAGPROCESS                       15
  12555. DOSFREEMODULE                        46
  12556. DOSFREESEG                           39
  12557. DOSGETCP                            130
  12558. DOSGETDATETIME                       33
  12559. DOSGETENV                            91
  12560. DOSGETHUGESHIFT                      41
  12561. DOSGETINFOSEG                         8
  12562. DOSGETMACHINEMODE                    49
  12563. DOSGETMODHANDLE                      47
  12564. DOSGETMODNAME                        48
  12565. DOSGETPID                            94
  12566. DOSGETPROCADDR                       45
  12567. DOSGETPRTY                            9
  12568. DOSGETSEG                           121
  12569. DOSGETSHRSEG                         36
  12570. DOSGETSTDA                          119
  12571. DOSGETVERSION                        92
  12572. DOSGIVESEG                           37
  12573. DOSGLOBALSEG                        132
  12574. DOSHOLDSIGNAL                        13
  12575. DOSHUGEINCR                         136
  12576. DOSHUGESHIFT                        135
  12577. DOSICANONICALIZE                    100
  12578. DOSICREATETHREAD                      1
  12579. DOSIEXECPGM                           4
  12580. DOSIRAMSEMWAKE                      125
  12581. DOSIREAD                             79
  12582. DOSISEMREQUEST                       18
  12583. DOSISEMWAIT                          21
  12584. DOSISETCP                           131
  12585. DOSISYSSEMCLEAR                      17
  12586. DOSISYSSEMSET                        19
  12587. DOSIWRITE                            87
  12588. DOSKILLPROCESS                       10
  12589. DOSLIBINIT                           96
  12590. DOSLOADMODULE                        44
  12591. DOSLOCKSEG                          122
  12592. DOSMAKEPIPE                          16
  12593. DOSMEMAVAIL                         127
  12594. DOSMKDIR                             66
  12595. DOSMOVE                              67
  12596. DOSMUXSEMWAIT                        22
  12597. DOSNEWSIZE                           68
  12598. DOSOPEN                              70
  12599. DOSOPEN2                             95
  12600. DOSOPENSEM                           25
  12601. DOSPHYSICALDISK                     129
  12602. DOSQPATHINFO                         98
  12603. DOSSETPATHINFO                      104
  12604. DOSPOKETESTDAEMON                   104
  12605. DOSPORTACCESS                        69
  12606. DOSPROFILE                          133
  12607. DOSPTRACE                            12
  12608. DOSQCURDIR                           71
  12609. DOSQCURDISK                          72
  12610. DOSQFHANDSTATE                       73
  12611. DOSQFILEINFO                         74
  12612. DOSQFILEMODE                         75
  12613. DOSQFSINFO                           76
  12614. DOSQHANDTYPE                         77
  12615. DOSQPROCSTATUS                      154
  12616. DOSQTRACEINFO                        93
  12617. DOSQVERIFY                           78
  12618. DOSREADPHYS                         103
  12619. DOSREALLOCHUGE                       42
  12620. DOSREALLOCSEG                        38
  12621. DOSRESUMETHREAD                      26
  12622. DOSRMDIR                             80
  12623. DOSSELECTDISK                        81
  12624. DOSSEMSETWAIT                        20
  12625. DOSSENDSIGNAL                       134
  12626. DOSSETCP                            153
  12627. DOSSETDATETIME                       28
  12628. DOSSETFGND                          101
  12629. DOSSETFHANDSTATE                     82
  12630. DOSSETFILEINFO                       83
  12631. DOSSETFILEMODE                       84
  12632. DOSSETFSINFO                         97
  12633. DOSSETINFOSEG                       128
  12634. DOSSETMAXFH                          85
  12635. DOSSETPRTY                           11
  12636. DOSSETSIGHANDLER                     14
  12637. DOSSETVEC                            89
  12638. DOSSETVERIFY                         86
  12639. DOSSGSWITCH                          54
  12640. DOSSGSWITCHME                        55
  12641. DOSSGSWITCHPROC                     124
  12642. DOSSICG                              95
  12643. DOSSIZESEG                          126
  12644. DOSSLEEP                             32
  12645. DOSSUSPENDTHREAD                     27
  12646. DOSSWAPTASKINIT                     102
  12647. DOSSYSTEMSERVICE                     88
  12648. DOSSYSTRACE                          90
  12649. DOSTIMERASYNC                        29
  12650. DOSTIMERSTART                        30
  12651. DOSTIMERSTOP                         31
  12652. DOSUNLOCKSEG                        123
  12653. GETADDR                             111
  12654. GETHEADERS                          108
  12655. GETSELADDR                          110
  12656. PANICWRITE                          105
  12657. STRUCHECK                           106
  12658. STRURESUPDATE                       107
  12659. UNUSEDA                              98
  12660. UNUSEDB                              99
  12661.  
  12662. The following Operating System entry points are defined in the library 
  12663. DOSCALL1. In this case, the procedures must be called by name rather than 
  12664. ordinal value. For an example of this usage, see the explanation of the 
  12665. DYNALINK() function. 
  12666.  
  12667. DOSREAD
  12668. DOSWRITE
  12669. DOSERRCLASS
  12670. DOSSEMREQUEST
  12671. DOSSEMCLEAR
  12672. DOSSEMWAIT
  12673. DOSSEMSET
  12674. DOSEXECPGM
  12675. DOSCREATETHREAD
  12676. DOSSUBSET
  12677. DOSSUBALLOC
  12678. DOSSUBFREE
  12679. DOSREADASYNC
  12680. DOSWRITEASYNC
  12681. DOSSEARCHPATH
  12682. DOSSCANENV
  12683.  
  12684.  
  12685. ΓòÉΓòÉΓòÉ 15. Advanced Compiler Features ΓòÉΓòÉΓòÉ
  12686.  
  12687. Advanced compiler features. 
  12688.  
  12689.  
  12690. ΓòÉΓòÉΓòÉ 15.1. Compile time variables ΓòÉΓòÉΓòÉ
  12691.  
  12692. Compile time variables. 
  12693.  
  12694.  
  12695. ΓòÉΓòÉΓòÉ 15.1.1. Definition ΓòÉΓòÉΓòÉ
  12696.  
  12697. E provides certain language extensions and configuration options by means of a 
  12698. single pass symbol table access facility. This means that the macro programmer 
  12699. can assign a compile time variable and later test the value of that variable. 
  12700.  
  12701.  
  12702. ΓòÉΓòÉΓòÉ 15.1.2. Advantages ΓòÉΓòÉΓòÉ
  12703.  
  12704. The usage of compile time variables can aid in the portability of the macro 
  12705. language. This means that one set of macros can be used in DOS, OS/2, and the 
  12706. Presentation Manager environments. For examples of this see the current 
  12707. E-macros. By testing the version, the compiler can know which code to include. 
  12708. This means later versions can make use of the newest features while still 
  12709. maintain compatibility with older versions of the E family of editors. 
  12710.  
  12711. The usage of compile time variables saves disk space.  The reason for this is 
  12712. that universal variables must be actually saved on the disk in the resultant 
  12713. .EX file.  Compile-time variables are saved in far memory while the translation 
  12714. process executes and are freed when the translation process ends. 
  12715.  
  12716.  
  12717. ΓòÉΓòÉΓòÉ 15.1.3. Compile-time variable assignment ΓòÉΓòÉΓòÉ
  12718.  
  12719. We allow a compile-time variable assignment by means of the define statement in 
  12720. the macro language. An example of such as assignment is the following: 
  12721.  
  12722.  
  12723.   define compile_variable = 'this is a compile-time variable'
  12724.  
  12725.  
  12726. ΓòÉΓòÉΓòÉ 15.1.4. Compile-time variable and conditional compilation ΓòÉΓòÉΓòÉ
  12727.  
  12728. Compile-time variables can be used in concert with the translator's compile if 
  12729. statements to provide a powerful conditional compilation facility.  An example 
  12730. of the usage of compile if is the following: 
  12731.  
  12732.  
  12733.   compile if compile_variable = 'this is a compile-time variable'
  12734.     sayerror 'compile_variable exists'
  12735.   compile else
  12736.     sayerror 'compile_variable does not exists'
  12737.   compile endif
  12738.  
  12739.  
  12740. ΓòÉΓòÉΓòÉ 15.1.5. Compile `defined' test ΓòÉΓòÉΓòÉ
  12741.  
  12742. In addition to the straightforward test of a compile-time variable value,  we 
  12743. can also test whether a variable is defined or not. This is useful in cases 
  12744. where the macro programmer does not wish to expressly assign a value to a 
  12745. compile-time variable, but simply would like to know if the variable has any 
  12746. value. For example: 
  12747.  
  12748.  
  12749.   compile if defined compile_variable
  12750.     sayerror 'compile_variable is defined'
  12751.   compile else
  12752.     sayerror 'compile_variable is not defined'
  12753.   compile endif
  12754.  
  12755.  
  12756. ΓòÉΓòÉΓòÉ 15.1.6. Text replacement ΓòÉΓòÉΓòÉ
  12757.  
  12758. A powerful text replacement function is part of the translator language. This 
  12759. text replacement option allows one to literally change the text upon which the 
  12760. translator is operating during the translation process. The text replacement 
  12761. option is initiated when the translator encounters a '$' (dollar sign). When 
  12762. the text replacement character is encountered the translator  places the value 
  12763. of the compile-time variable that follows the '$' into a text buffer and begins 
  12764. to use the that buffer as the input buffer to the translator. When the buffer 
  12765. is empty, we switch back to the previous translation buffer. For example: 
  12766.  
  12767.  
  12768.   define sayinformation = 'sayerror'
  12769.   $sayinformation 'this is information'
  12770.  
  12771. In the preceding example,  we have defined our own language extension. The 
  12772. example is equivalent to the standard E code of: 
  12773.  
  12774.  
  12775.   sayerror 'this is information'
  12776.  
  12777.  
  12778. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12779.  
  12780. An alternative approach might involve having a handle to an attribute record. 
  12781. In such an approach one can still refer to an attribute record by the same 
  12782. handle even if the attribute record changes location.  On the other hand, 
  12783. implementation of this approach is often inefficient because it often includes 
  12784. generation of new handles when text containing attributes is copied so that a 
  12785. handle only refers to a single attribute record.
  12786.  
  12787.  
  12788. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12789.  
  12790. Note in this diagram, the attribute records are delimited by brackets. 
  12791. Throughout this document I will only use brackets to delimit attribute records. 
  12792. To avoid confusion, I will refrain from using brackets as a textual character 
  12793. in my examples.  The use of capital letters here between brackets is only used 
  12794. in this example as a means of referring to individual attribute records.  In 
  12795. other examples in this document, I might actually put words or numbers between 
  12796. the brackets if I want to denote some characteristic of an attribute record.
  12797.  
  12798.  
  12799. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12800.  
  12801. The last character of line in the example is the "h". There is an attribute 
  12802. record located immediately to the right of that character.  Because it is at 
  12803. the end of the line there is no character to the right of it.  This is 
  12804. acceptable because there is a virtual character to the right of it.  (In the 
  12805. case of line mode, there is a virtual space, and in the case of stream mode 
  12806. there is a virtual CR/LF or questionably a soft linebreak.)  The F attribute 
  12807. record in the example is a slightly different situation.  It is similar in that 
  12808. its positional notation is derived from the assumed existence of virtual spaces 
  12809. beyond the end of line.  It differs from the previous attribute record in that 
  12810. its location is invalid in stream mode and may not be effectively supported by 
  12811. some operations.
  12812.  
  12813.  
  12814. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12815.  
  12816. The exception to this is the '/' (search) command. When this command is 
  12817. invoked, E searches for the 'L' command definition. 
  12818.  
  12819.  
  12820. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12821.  
  12822. DEFC's and DEFPROC's cannot be redefined.  CONSTants can be redefined (to the 
  12823. same value) without penalty. 
  12824.  
  12825.  
  12826. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12827.  
  12828. The ET compiler does a simple substitution for every occurrence of a constant. 
  12829. If you define a long string constant and reference it ten times, its value is 
  12830. included ten times and takes up ten times its length in the resulting EX file. 
  12831. You might prefer to make a long string value a universal variable rather than a 
  12832. constant. 
  12833.  
  12834.  
  12835. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12836.  
  12837. By "event" we mean a procedure that is automatically invoked when a certain 
  12838. condition becomes true.  Previous examples are DEFINIT (executed when you start 
  12839. the editor or a new module) and DEFEXIT (executed when you quit the editor or a 
  12840. module).  In a sense keystrokes are also events, and in the past we sometimes 
  12841. called events "pseudo-keys". 
  12842.  
  12843.  
  12844. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12845.  
  12846. Understand that the word var is only a notational convenience. Do not include 
  12847. the word literally in your program. 
  12848.  
  12849.  
  12850. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12851.  
  12852. AF_ constants:
  12853.    AF_CHAR        =   1  -- 'key' represents an ASCII value
  12854.    AF_VIRTUALKEY  =   2  -- 'key' is a VK_ constant
  12855.    AF_SCANCODE    =   4  -- 'key' represents a keyboard scan code
  12856.    AF_SHIFT       =   8  -- The Shift key must be pressed along with 'key'
  12857.    AF_CONTROL     =  16  -- The Control key must be pressed along with 'key'
  12858.    AF_ALT         =  32  -- The Alt key must be pressed along with 'key'
  12859.    AF_LONEKEY     =  64  -- 'key' is a shift key, but is used by itself
  12860.    AF_SYSCOMMAND  = 256  -- 'index' should be sent in a WM_SYSCOMMAND message
  12861.    AF_HELP        = 512  -- 'index' should be sent in a WM_HELP message
  12862.  
  12863.  
  12864. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12865.  
  12866. As described in the OS/2 Technical Reference Manual section 2.3.8.1 entitled 
  12867. Dynamic Linking. 
  12868.  
  12869.  
  12870. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12871.  
  12872. In the 'printable_char' cases, the keyname must be quoted in an E program. For 
  12873. example, the following example redefines the '~' key on the keyboard to toggle 
  12874. the cursor between the text and the command dialog box, and redefines some of 
  12875. the alphabetic keys to produce help information:      def '~' = command_toggle 
  12876. def 'a' - 'z' = 'help' However, the rest of the keynames need not be quoted, 
  12877. e.g. KEY c_end 
  12878.  
  12879.  
  12880. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12881.  
  12882. In all constructs which require a numeric_term, a numeric value is expected. 
  12883. The following can be substituted for a number: 
  12884.  
  12885. o the name of a variable representing a numeric value, or 
  12886. o a procedure call which returns a numeric value 
  12887.  
  12888.  
  12889. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12890.  
  12891. In all constructs which require a string_expression, a string value is 
  12892. expected. The following can be substituted for a string: 
  12893.  
  12894. o the name of a variable representing a string, or 
  12895. o a procedure call which returns a string 
  12896.  
  12897.  
  12898. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12899.  
  12900. In a constant_expression, any identifiers or designators must be the names of 
  12901. constants; no variables are permitted. 
  12902.  
  12903.  
  12904. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12905.  
  12906. There may not be spaces between the identifier and the '('. 
  12907.  
  12908.  
  12909. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12910.  
  12911. A macro-defined command is any command defined using a DEFC construct in the E 
  12912. macro code, whether it is part of the distributed macros written by the E 
  12913. developers or added later by a user. For an example of such a DEFC construct, 
  12914. see section Using EPM Commands in E Statements. 
  12915.  
  12916.  
  12917. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12918.  
  12919. Note: Two double quotes inside a double-quoted string will output one double 
  12920. quote character. For example, the string: "She said, ""Oh, that's 
  12921. fascinating."" " will yield the following output: She said, "Oh, that's 
  12922. fascinating." There can be no spaces between the two double quotes. 
  12923.  
  12924.  
  12925. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12926.  
  12927. Note: Two single quotes inside a single-quoted string will output one single 
  12928. quote character. For example, the string: 'I went to Jim Kennedy''s house' 
  12929. will yield the following output: I went to Jim Kennedy's house. There can be no 
  12930. spaces between the two single quotes. 
  12931.  
  12932.  
  12933. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12934.  
  12935. Any number to be interpreted or manipulated by the editor cannot exceed 32,767.