home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / os2 / epmbk.zip / EPMTECH.INF (.txt) next >
OS/2 Help File  |  1993-01-22  |  350KB  |  12,650 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. In future sections, the following symbolic
  113. conventions will be used to convey points of the
  114. language more clearly:
  115.  
  116. Symbol:
  117.                                         Meaning:
  118.  
  119. { }
  120.                                         Zero or more repetitions of what is inside.
  121.  
  122. [ ]
  123.                                         Zero or one of what is inside.
  124.  
  125. A | B
  126.                                         Substitution of A or B.
  127.  
  128. var
  129.                                         The word var indicates that a variable is required
  130.                                         and not an expression.
  131.  
  132. ...
  133.                                         More repetitions of the same syntactic pattern
  134.  
  135. Note:  For an example of a var variable being required instead of an
  136. expression, see the ACTIVATEFILE entry in section Built-in Statements and Procedures.
  137. After reading the following sections, users who wish to make extensive 
  138. customizations to the E macros should rely heavily on the following: 
  139.  
  140. o Field Variables Listed; 
  141. o Built-in Statements and Procedures; 
  142. o E Language Syntax; 
  143. o General Structure of E-Macro Files; 
  144. o Descriptions of Procedures in Standard EPM. 
  145.  
  146. Note how these sections are divided. 
  147.  
  148.  
  149. ΓòÉΓòÉΓòÉ 1.1. Fileid Structures ΓòÉΓòÉΓòÉ
  150.  
  151. The Field Variables Listed section contains field variables that can take 
  152. assignments or be be referenced. For example: 
  153.  
  154.  
  155.   if .messageline <> 14 then
  156.     .messageline=14
  157.   endif
  158.  
  159. The first reference to messageline checks the color of the message line (a 
  160. referenced field variable). If it is not equal to color 14 (yellow) then it 
  161. makes the message line color yellow (a field variable assignment). 
  162.  
  163.  
  164. ΓòÉΓòÉΓòÉ 1.2. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  165.  
  166. There are built-in statements and procedures. These are internal in the E code, 
  167. and therefore cannot be located in any of the .E files. These are listed in the 
  168. Built-in Statements and Procedures section. For example: 
  169.  
  170.  
  171.   asciivalue = ASC('A')
  172.   insert 'Written by the Yorktown E group',5
  173.  
  174. The first example is of the ASC() procedure. It will return the value 65 in the 
  175. variable asciivalue. Only procedures can return values (but don't always have 
  176. to). Procedures always take parentheses even if no arguments are passed. There 
  177. cannot be any spaces between the procedure name (in my example ASC) and the 
  178. left parenthesis, or E will think it is a statement. 
  179.  
  180. Statements, however, never take parentheses and don't return values. They can, 
  181. but don't have to, take arguments. The second example is of the insert 
  182. statement, shown here with arguments. It would insert on line five the text: 
  183. Written by the Yorktown E group. 
  184.  
  185.  
  186. ΓòÉΓòÉΓòÉ 1.3. Standard Procedures ΓòÉΓòÉΓòÉ
  187.  
  188. There are also defproc procedures that have been written in E-code and 
  189. therefore exist in one of the .E files. These are listed in Descriptions of 
  190. Procedures in Standard EPM.. They always take parentheses and can return 
  191. values, just like the built-in procedures. An example is: 
  192.  
  193.  
  194.   mymaxnum = MAX(4,5,98,6)
  195.  
  196. This E code will set the variable mymaxnum to 98, the maximum number in the 
  197. argument list. Again, the left parenthesis is flush with the procedure name. 
  198.  
  199.  
  200. ΓòÉΓòÉΓòÉ 1.4. EPM Commands ΓòÉΓòÉΓòÉ
  201.  
  202. Commands, defined with the defc and written in E-code can be invoked from the 
  203. command line dialog box, and are listed in the The EPM User's Guide and the 
  204. section Commands Omitted From the User's Guide in this manual. These can also 
  205. be called from within the E language if surrounded by quotation marks. For 
  206. example: 
  207.  
  208.  
  209.   'bottom'
  210.  
  211. will move the cursor position to the bottom of the file, as if the user had 
  212. typed bottom from the command line dialog box. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 1.5. Summary ΓòÉΓòÉΓòÉ
  216.  
  217. Understanding the differences between these commands, statements, and 
  218. procedures is critical when programming in the E programming language. When 
  219. looking for a specific result, remember to look in all these sections to help 
  220. find a command, statement, or procedure that may accomplish your goal. The 
  221. procedures defined with defproc and the commands defined with defc are good 
  222. sources of reference when programming in E. Examining the E-code of procedures 
  223. or commands can be helpful when trying to accomplish a goal close to an 
  224. existing procedure or command. 
  225.  
  226. Note:  E ignores case for procedure, statements, variable, and command names. 
  227. Capitalizing ASC and MAX in the examples above was done purely by whim. 
  228.  
  229. Although the discussion above may be slightly fuzzy to a novice, it should get 
  230. more clear as the manual progresses. It may help to refer back to these 
  231. distinctions as the various elements of E are described in detail. 
  232.  
  233.  
  234. ΓòÉΓòÉΓòÉ 2. Basic Tools of the E Language ΓòÉΓòÉΓòÉ
  235.  
  236. Basic tools of the E language. 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 2.1. Comparision with to the REXX Language:  Scoping ΓòÉΓòÉΓòÉ
  240.  
  241. Anyone familiar with the REXX language will notice that the E language has the 
  242. same look and feel. The string handling looks the same, and the control 
  243. structures are similar. You may well ask "Why not use REXX for the editor macro 
  244. language?" The answer is that there are some important differences, which we 
  245. will discuss. 
  246.  
  247. Unlike REXX, E makes all variables local by default.  You can specify that a 
  248. variable is to be global everywhere, i.e. available to any other procedure, not 
  249. only to the current caller, by using the universal keyword in the declaration. 
  250. A simple program will illustrate the scoping differences between REXX and E. 
  251.  
  252. REXX SAMPLE PROGRAM
  253.       /* REXX scoping example */
  254.       call starthere
  255.  
  256.       starthere: procedure
  257.          me='the old me'
  258.          call p1
  259.          say me                     /* says 'the old me' */
  260.          exit 0
  261.  
  262.       p1: procedure                 /* don't expose me here */
  263.          call p2
  264.  
  265.       p2: procedure expose me
  266.         me='the new me'             /* try to modify me down here */
  267.         return ''
  268.  
  269. E SAMPLE PROGRAM
  270.       /* E scoping example */
  271.       defmain
  272.          call starthere
  273.  
  274.       defproc starthere
  275.          universal me
  276.  
  277.          me='the old me'
  278.          call p1()
  279.          say me                     /* says 'the new me' */
  280.          exit 0
  281.  
  282.       defproc p1
  283.          call p2()
  284.  
  285.       defproc p2
  286.          universal me               /* make it really global */
  287.  
  288.          me='the new me'
  289.          return ''
  290.  
  291. For the REXX program to calculate the same results as the E program, procedure 
  292. p1 would have to expose the me variable. The REXX expose statement requires 
  293. that the symbol table be known at the time of the call. When a REXX procedure 
  294. is called, the current symbol table entries are removed except for those 
  295. entries that are exposed. This means that a symbol table must be maintained at 
  296. run time. When a variable is referenced, a lookup is performed to see if it is 
  297. already in the symbol table. If the variable is not in the symbol table a new 
  298. symbol table entry is created. 
  299.  
  300. In the E language, like MODULA-2, C and PASCAL, no symbol table is required at 
  301. run-time. The absence of variable lookup is one reason why E runs considerably 
  302. faster than REXX. However, REXX programs are more easily debugged for the same 
  303. reason. But the order of magnitude of improvement in performance was judged 
  304. critical for the programming environment. 
  305.  
  306.  
  307. ΓòÉΓòÉΓòÉ 2.2. E Variables and Identifiers ΓòÉΓòÉΓòÉ
  308.  
  309. Variable declarations are not needed except for universal variables. All other 
  310. variables are assumed to be local except for a few predefined, universal 
  311. variables to be discussed in Predefined Constants and Variables. 
  312.  
  313. Identifiers have the following syntax: 
  314.  
  315.  [a-z | A..Z]{a-z | A..Z | 0-9 | _}
  316. Identifiers are not case sensitive, and can consist of no more than 28 
  317. characters. 
  318.  
  319.  
  320. ΓòÉΓòÉΓòÉ 2.2.1. The Contents of Uninitialized Variables ΓòÉΓòÉΓòÉ
  321.  
  322. When a variable is referenced for the first time in a REXX program the variable 
  323. holds the name of itself in upper case (e.g., abc='ABC'). In an E program the 
  324. value of an uninitialized variable is undefined. This decision was made for the 
  325. following reasons: 
  326.  
  327.  1. No symbol table information is required at run time. A complete symbol 
  328.     table is needed to know when the variable is first defined at run time. 
  329.  
  330.  2. Speed. Local variables do not have to be assigned anything except what the 
  331.     user assigns to the variable. 
  332.  
  333. Some people prefer the REXX convention because it allows you to type in some 
  334. operating system commands without using quotes. For example, 
  335.  
  336.     type profile exec
  337.  
  338. But many operating system commands will still require quotation marks anyway. 
  339. Requiring quotation marks in all cases reduces confusion. 
  340.  
  341. Since uninitialized variables are truly uninitialized (random) in E, strange 
  342. behavior can occur if a programmer accidentally creates an unintended variable, 
  343. for instance, by misspellling a statement ('sayeror').  The ET compiler will 
  344. catch most uninitialized variables at compile time, and report "Variable not 
  345. initialized".  For example, the following will be caught: 
  346.  
  347.    defc foo=
  348.       insertline x   /* x was never given a value */
  349.  
  350. This feature will also catch several other previously obscure errors. Omitting 
  351. the commas between universal variable names: 
  352.  
  353.    universal a b c   /* wrong, should be   universal a,b,c  */
  354.                      /* ET reports b as not initialized     */
  355.  
  356. The omission of parentheses after a procedure call: 
  357.  
  358.    call myproc       /* ET will report myproc as not initialized */
  359.  
  360. And most misspellings that otherwise wouldn't be caught until the line was 
  361. executed: 
  362.  
  363.    sayeror 0
  364.  
  365. Limitation:  This will not catch some cases where a variable is referenced 
  366. twice, or where two variables are combined in an expression: 
  367.  
  368.    call p(a+b)   /* Won't catch uninitialized a.  Will catch b. */
  369.  
  370.    for i=i       /* These are not caught. */
  371.    x=x+1
  372.  
  373. It should be noted that this feature is a benefit of E's compilation approach. 
  374. The variable names are tokenized at compile time (unlike REXX), making it easy 
  375. to tell when a new variable is being created. 
  376.  
  377.  
  378. ΓòÉΓòÉΓòÉ 2.3. Arrays in EPM ΓòÉΓòÉΓòÉ
  379.  
  380. Arrays are handled like files in a ring. When creating an array, an array id is 
  381. returned as a "handle" for the array. This array id then can be used to get and 
  382. put items into the array. Indices do not have to be numeric but instead can be 
  383. any arbitrary string (like REXX stems). 
  384.  
  385. The following shows the format of the DO_ARRAY statement used to create, write 
  386. to, and read from an array: 
  387.  
  388. do_array 1, array_id, myarray 
  389.                                      This creates an array called MYARRAY and 
  390.                                      returns its array id in the ARRAY_ID 
  391.                                      variable. If an array called MYARRAY 
  392.                                      already exists, then its array id will be 
  393.                                      returned. 
  394. do_array 2, array_id, index, value 
  395.                                      This sets the entry INDEX in the array 
  396.                                      identified by the ARRAY_ID number to the 
  397.                                      value specified in VALUE. Both the index 
  398.                                      and value can contain arbitrary strings. 
  399. do_array 3, array_id, index, result 
  400.                                      This will look up the INDEX entry in the 
  401.                                      array ARRAY_ID and assign the result to 
  402.                                      the variable RESULT. 
  403. do_array 4, array_id, index 
  404.                                      This will delete an entry specified, by 
  405.                                      INDEX, from the array. 
  406. do_array 6, array_id, array_name 
  407.                                      Returns the array_id associated with the 
  408.                                      array name specified by array_name 
  409.  
  410. Due to the common interface, the second and fourth arguments in the DO_ARRAY 
  411. statement must be variables and not numeric or string constants or expressions. 
  412.  
  413.  
  414. ΓòÉΓòÉΓòÉ 2.4. Expressions and Operators ΓòÉΓòÉΓòÉ
  415.  
  416. Expressions and operators. 
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 2.4.1. Operators ΓòÉΓòÉΓòÉ
  420.  
  421.                     Add expressions 
  422.  
  423.                     subtract expressions 
  424.  
  425. ==, /== 
  426.                     exactly equal, not exactly equal forces exact string 
  427.                     comparison, taking all spaces and digits as a string. 
  428.  
  429. =, <>, <=, >=, <, > 
  430.                     These operators ignore leading and trailing spaces on 
  431.                     expressions being compared. If both operands are numbers a 
  432.                     number comparison is performed; otherwise a string 
  433.                     comparison is performed. 
  434.  
  435.                                          examples
  436.                                            'hi'='hi  '  is true
  437.                                            'hi'=='hi  ' is false
  438.  
  439. not, -, + 
  440.                     Boolean not, unary minus, unary plus 
  441.  
  442. and, &, or, | 
  443.                     Boolean and, Boolean and, Boolean or, Boolean or 
  444.  
  445. || 
  446.                     concatenates two strings 
  447.  
  448. *, /, % 
  449.                     integer multiply, divide, integer divide 
  450.  
  451. // 
  452.                     modulus (remainder) operator.  22 // 5 = 2. 
  453.  
  454. Note:  The percent sign % is to be used for integer division, while the slash / 
  455. is to be used for floating-point division. 
  456.  
  457.  
  458. ΓòÉΓòÉΓòÉ 2.4.2. Operator Precedence ΓòÉΓòÉΓòÉ
  459.  
  460. From lower to higher precedence:
  461.  
  462.      1. AND, OR, NOT, &, |
  463.  
  464.      2. >, <, =, ==, /==, <>, <=, >=
  465.  
  466.      3. ||
  467.  
  468.      4. +, -
  469.  
  470.      5. *, /, %, //
  471.  
  472.  
  473. ΓòÉΓòÉΓòÉ 2.5. String Expressions ΓòÉΓòÉΓòÉ
  474.  
  475. The rules for delimiting strings are shown below: 
  476.  
  477. o Double or single quotes may be used. 
  478.  
  479. o Two single quotes inside single quotes represent the single quote character. 
  480.  
  481. o Two double quotes inside double quotes represent the double quote character. 
  482.  
  483. o Strings may not extend across line boundaries. 
  484.  
  485. o A backslash can be used to represent awkward characters, in the same style as 
  486.   the C language.  \t (without quotes) represents the tab character. On a PC 
  487.   the ASCII value of the tab character is 9, so \9 represents the same thing. 
  488.  
  489.   Other special characters are \r and \l, which denote carrage return and line 
  490.   feed, repectively. 
  491.  
  492. Examples:
  493.  
  494.   'abc'== "abc"
  495.   ''''=="'"
  496.   """"=='"'
  497.   '1'\50==12        /* 50 is ASCII value for the character '2' */
  498.   3+ '1'\50==15     /* everything is a string! */
  499.   3+ '1'||2==42      /* Concat'n has lower precedence than + */
  500.   asc(\t)==9
  501.   asc(\r)==13
  502.   \r\n==''\r\n''
  503.                      /* Note that \r\n is a single string literal,    */
  504.                      /* generically the same as a single string of    */
  505.                      /* two characters "XY".  No concatenation here. */
  506.  
  507.  
  508. ΓòÉΓòÉΓòÉ 2.5.1. Catenation (Concatenation) ΓòÉΓòÉΓòÉ
  509.  
  510. Strings can be joined by catenation using the (con)catenation operator (||). 
  511. However, the operator can be omitted in most cases. When the operator is 
  512. omitted, E will place a single blank between the catenated results IF there is 
  513. at least one space between the operands. As the following examples illustrate, 
  514. one can completely avoid using the catenation operator. Suppose: 
  515.  
  516.      v1 = 'abc'
  517.      v2 = 'xyz'
  518.      r1 = v1 v2
  519.      r2 = v1 'def'
  520.      r3 = v1'ghi'
  521.      r4 = v1      'qrs'
  522.      r5 = v1/* comment */v2
  523. then: 
  524.  
  525.      r1 == 'abc xyz'
  526.      r2 == 'abc def'
  527.      r3 == 'abcghi'
  528.      r4 == 'abc qrs'
  529.      r5 == 'abcxyz'
  530.  
  531.  
  532. ΓòÉΓòÉΓòÉ 2.6. Comments ΓòÉΓòÉΓòÉ
  533.  
  534. E allows three ways to add comments:
  535.  
  536.      1. placing a semicolon in column one;
  537.  
  538.         ; this is a comment
  539.  
  540.      2. surrounding the comment with '/*  */'; and
  541.  
  542.         /* this is a /* nested */ comment */
  543.  
  544.         /* this is a leading comment */ followed by executable code
  545.  
  546.         /* this is a
  547.         two line comment */
  548.  
  549.      3. a double-dash at the start of a line comment.
  550.  
  551.         this is executable code -- followed by a rest-of-line comment
  552.  
  553. If a semicolon appears in the first column (that's column one, without 
  554. preceding spaces) the rest of the line is ignored.  This style is often handy 
  555. for quick commenting-out of existing source code. A comment in a REXX-style /* 
  556. */ enclosure does not cause the remainder of the line (if any) to be ignored. 
  557. These comments can be nested. A double-dash ("--") causes the remainder of the 
  558. line to be ignored. This is an easier way to type one-line comments, but does 
  559. not allow multi-line comments or nesting. 
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 2.7. Line Continuations ΓòÉΓòÉΓòÉ
  563.  
  564. This section was added to explain when statements can be continued across 
  565. lines.  In theory this information was already in the manual - the syntax 
  566. listing in E Language Syntax shows that a semicolon (which the compiler 
  567. considers to be the same as a new line) is often acceptable in mid-statement. 
  568. But this will provide better illustrations. 
  569.  
  570. E does not require an explicit statement continuation character as REXX does. 
  571. It automatically continues to the next line when it "knows" it needs more 
  572. information, such as after an operator in the middle of an expression.  This 
  573. differs from the REXX treatment.  REXX allows line continuations in more cases, 
  574. but EPM does not require the explicit comma. In REXX you could do this: 
  575.  
  576.    x = a ,
  577.         b               /* REXX result is   x = a b   */
  578. which concatenates the two strings a and b (implied concatenation). You can 
  579. achieve a similar (but not identical) effect by supplying an explicit operator 
  580. to make E aware that there must be more: 
  581.  
  582.    x = a ||   /* explicit concatenation operator */
  583.       b                 /* gives x = a||b, no intervening space */
  584.  
  585. A new line is allowed in all the following cases: 
  586.  
  587.  1. After an operator in an expression: 
  588.  
  589.            x = 1 +
  590.                    2
  591.  
  592.  2. After a comma in an expression list passed to a procedure: 
  593.  
  594.            call myproc( 'foobar' ,
  595.                         'axolotl' )
  596.  
  597.  3. After a comma in declarations of procedure parameters, constants or 
  598.     universal variables: 
  599.  
  600.            defproc myproc( a ,
  601.                            b  )
  602.  
  603.            const
  604.               x = 1,
  605.               y = 2
  606.  
  607.            universal a
  608.                      ,
  609.                      b
  610.  
  611.  4. After a comma in a DEF with a series of keynames: 
  612.  
  613.            def a_a, a_b, a_c,
  614.                a_d, a_e
  615.  
  616.  5. Between if and then: 
  617.  
  618.            if a=1
  619.               then b=a
  620.               else c=a
  621.            endif
  622.  
  623.  6. And after commas between parameters of several statements - getcommand, 
  624.     setcommand, getfileid, getline, replaceline, insertline, deleteline, and 
  625.     getmark: 
  626.  
  627.            replaceline 'this is a long new line'    ,
  628.                        linenumber ,
  629.                        fileid
  630.  
  631. As mentioned above, the semicolon can be used to separate statements on the 
  632. same line. For example: 
  633.  
  634.   x= 5+3; y= 9-7
  635.  
  636. will work and place the value of 8 in x and 5 in y Without a semicolon E 
  637. expects only one statement per line. For example: 
  638.  
  639.   x= 5+3  y= 9-7
  640.  
  641. will cause a compilation error of "Variable not initialized" on the y (it 
  642. attempts to concatenate 3 and y). 
  643.  
  644.  
  645. ΓòÉΓòÉΓòÉ 2.8. Fileid Structure ΓòÉΓòÉΓòÉ
  646.  
  647. The E editor must store information on each file in its rings. Therefore each 
  648. file is assigned a unique fileid, which acts as a handle for the file. The 
  649. fileid is actually a structure composed of many fields, such as .FILENAME, 
  650. .LINE, .DRAGCOLOR. Each field stores a value which identifies an attribute of 
  651. the file. By manipulating the values of these fields, macros can get and set 
  652. information about the files loaded, for example the modify status or the 
  653. contents of the message line. Because macros need the fileid to set the fileid 
  654. fields, E provides a GETFILEID statement to obtain the fileid. 
  655.  
  656. To access the structure of a file other than the active one, the GETFILEID 
  657. statement is provided to get an ID or "handle" on a file. 
  658.  
  659. GETFILEID  var fileid [,filename] 
  660.                     If filename is given, a search is performed for it in the 
  661.                     EPM rings. A match is considered to be found if the name 
  662.                     portion (without drive and path) of a filespec in the ring 
  663.                     matches filename. This could be ambiguous if two files of 
  664.                     the same name (from different directories) are in the ring; 
  665.                     if this is a concern, specify the full filespec, with path, 
  666.                     to force an exact match. 
  667.  
  668.                     This feature can also be used to find a temporary file with 
  669.                     a unique name, such as '.ALL' or '.DIR'. 
  670.  
  671.                     If a match is found, then the fileid will be a valid 
  672.                     integer handle for that file, where fileid >= 0. Otherwise 
  673.                     fileid='', a null string. 
  674.  
  675.                     If the filename is not given, then fileid will be a valid 
  676.                     handle for the current file, where fileid>=0. 
  677.  
  678. Examples:
  679.  
  680.  GETFILEID fileid               /* Set variable fileid to    */
  681.                                 /* correspond to active file */
  682.  
  683.  GETFILEID myid,'AUTOEXEC.BAT'  /* Set variable myid to             */
  684.                                 /* correspond to file AUTOEXEC.BAT. */
  685.                                 /* If AUTOEXEC.BAT is not already   */
  686.                                 /* loaded then myid will be null.   */
  687.  
  688. To assign values to the fileid fields: 
  689.  
  690. fileid.field = expression 
  691.                     fileid must be an integer handle corresponding to a valid 
  692.                     file. field must be one of the field names listed below. 
  693.                     For example, to set the current line of the active file to 
  694.                     one: 
  695.  
  696.     getfileid fileid    /* get the fileid of the active file */
  697.     fileid.line=1       /* set the current line to one */
  698.  
  699. The alternative syntax is: 
  700.  
  701. .field = expression 
  702.                     Since no fileid is specified, the current file is assumed. 
  703.  
  704.    .line=1     /* Make line 1 the current line of the */
  705.                /* current file.  Note that there is   */
  706.                /* no need to get a fileid to set a    */
  707.                /* field of the current (active) file. */
  708.  
  709. You can blank out any of the EPM information lines off with the following code: 
  710.  
  711.  
  712.     .messageline = ''   /* erases the message line */
  713.     .statusline = ''    /* erases the status line  */
  714.  
  715. A list of all the fileid fields and their meaning is presented here. In the 
  716. following list, remember that x refers to the horizontal axis and y refers to 
  717. the vertical axis. 
  718.  
  719.  
  720. ΓòÉΓòÉΓòÉ 2.8.1. Field Variables Listed ΓòÉΓòÉΓòÉ
  721.  
  722. The following is a list of the field (dot) variables and what information they 
  723. contain: 
  724.  
  725. Field Variable                Description 
  726. AUTOSAVE                      number of changes (0 to 65535) between autosaves; 
  727.                               this counts the true number of changes, not just 
  728.                               number of lines entered.  Changes within a single 
  729.                               line are counted as one modification when you 
  730.                               leave the line. 
  731. COL                           current column position, 1 to 255. 
  732. CURSORX                       cursor's x position relative to window origin. 
  733. CURSORY                       cursor's y position relative to window origin. 
  734. DRAGCOLOR                     is the color of the highlighted area within a 
  735.                               drag area. 
  736. DRAGSTYLE                     determines the type of mark done when a mouse 
  737.                               drag is used to mark text. Valid values are: 
  738.  
  739.    0 = don't show drag 
  740.    1 = show character mark 
  741.    2 = show block mark 
  742.    3 = show line mark 
  743. DRAGTHRESHHOLDX               determines how far (in pels) the mouse must be 
  744.                               pulled in the x direction with a button down held 
  745.                               before EPM recognizes the mouse activity as drag. 
  746.                               The default value is zero, which uses the PM 
  747.                               system value of SV_CXDBLCLK. -- Warning: 
  748.                               DragThreshholdX is not a true file variable 
  749.                               because any value assigned to it will apply to 
  750.                               ALL files in the ring. -- 
  751. DRAGTHRESHHOLDY               determines how far (in pels) the mouse must be 
  752.                               pulled in the y direction with a button down held 
  753.                               before EPM recognizes the mouse activity as drag. 
  754.                               The default value is zero, which uses the PM 
  755.                               system value of SV_CYDBLCLK. -- Warning: 
  756.                               DragThreshholdY is not a true file variable 
  757.                               because any value assigned to it will apply to 
  758.                               ALL files in the ring. -- 
  759. EAAREA                        pointer to OS/2 1.2 extended attribute area. 
  760. FILENAME                      name of current file. 
  761. FONTHEIGHT                    contains the current font height in pixels. 
  762. FONTWIDTH                     contains the current font height in pixels. 
  763. KEYSET                        the name of the keyset bound to the file, a 
  764.                               string like "EDIT_KEYS". 
  765. LAST                          the total number of lines in the current file. 
  766. LINE                          the line number of the cursor's position, ranging 
  767.                               from 0 to LAST. 
  768. LOCKHANDLE                    is a Boolean (0 or 1) variable determining 
  769.                               whether the current file is locked against other 
  770.                               user's access in a LAN situation. 
  771. MARGINS                       the margin settings for the file, a string like 
  772.                               "1 79 1". 
  773. MARKCOLOR                     contains the color for marked text. 
  774. MESSAGECOLOR                  contains the message display color. 
  775. MESSAGELINE                   contains the contents of the message line. This 
  776.                               variable can be assigned a string to force a 
  777.                               message onto the message line or read to 
  778.                               determine the contents of the current message 
  779.                               line. 
  780. MODIFY                        0 or 1, showing whether the text has been 
  781.                               modified. 
  782. MOUSEX                        the column of the mouse location. This variable 
  783.                               is only valid when processing a mouse message. 
  784. MOUSEY                        the row of the mouse location. This variable is 
  785.                               only valid when processing a mouse message. 
  786. STATUSCOLOR                   contains the color of the status line. 
  787. STATUSLINE                    contains the template for the status line. For 
  788.                               more information about the contents of this 
  789.                               variable see The EPM User's Guide. 
  790. TABS                          the tab settings for the file, a string like "1 4 
  791.                               7 10" of up to 32 values. The tabs settings is 
  792.                               not a single global setting, but is remembered 
  793.                               for each file. 
  794. TEXTCOLOR                     shows the current textcolor setting. 
  795. TITLETEXT                     contains text to be displayed in the title bar 
  796.                               when this file is the current file. By default, 
  797.                               this field is empty, in which case the .filename 
  798.                               field is used. 
  799. USERSTRING                    this is a temporary storage string for the E 
  800.                               programmer to use for file specific information. 
  801. VISIBLE                       contains a one if the file is displayable (ie. 
  802.                               not hidden) and a zero if the file is a hidden 
  803.                               file. 
  804. WINDOWHEIGHT                  contains the height of the current window. 
  805. WINDOWWIDTH                   contains the width of the current window. 
  806. WINDOWX                       gap between the right edge of the client windows 
  807.                               presentation space and the right edge of the 
  808.                               client window. 
  809. WINDOWY                       gap between the bottom end of the client windows 
  810.                               presentation space and the bottom end of the 
  811.                               client window. 
  812.  
  813. Some fields with numeric values also follow certain constraints about their 
  814. maximum and minimum values.  Some fields are dependent upon other fields.  The 
  815. following chart shows these dependencies and some of the fields' ranges of 
  816. values. 
  817.  
  818. Field name                Max value                          Min value
  819. ----------                ---------                          ---------
  820.  .AUTOSAVE                 65535                                  0
  821.  .COL                      255                                    1
  822.  .CURSORX                  .windowwidth                           1
  823.  .CURSORY                  .windowheight                          1
  824.  .FILENAME                 a string like 'C:\TESTFILE.DOC'
  825.  .KEYSET                   a string like 'EDIT_KEYS'
  826.  .LINE                     .last                                  0
  827.  .MARGINS                  a string like '1 254 1'
  828.  .MARKCOLOR                255                                    0
  829.  .MESSAGECOLOR             255                                    0
  830.  .MODIFY                   65535                                  0
  831.  .STATUSCOLOR              255                                    0
  832.  .TABS                     a string like '1 4 7 10' or '3'
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ 2.9. Attribute Pairs ΓòÉΓòÉΓòÉ
  836.  
  837. EPM provides one with the ability to associate information with positions and 
  838. regions of a file without modifying the content of the file.  This capability 
  839. is called attribute support and can be used to provide features like embedded 
  840. objects, hidden text, bookmarks, hypertext links, and structured text editing. 
  841.  
  842. In most editors files/buffers are treated as streams of characters.  EPM 
  843. differs from most editors in that a file/buffer is treated (for display) as a 
  844. stream of characters and attribute records.  Attribute support simply provides 
  845. an interface for managing files/buffers that contain attribute records. 
  846.  
  847. Attribute records themselves are essentially invisible, but because they can be 
  848. used to pass information to the rendering, live parsing, and formatting 
  849. components of the editor, a user of the editor can often ascertain the 
  850. existence and location of some attribute records based on the effect these 
  851. attribute records have on the rendering of the file/buffer. 
  852.  
  853. In order to manage attribute records, it is useful to have a notation system 
  854. for referencing individual attribute records within a file/buffer.  In EPM the 
  855. notation system is positional-- that is, one points to location of the 
  856. attribute record when one wants to reference it. 
  857.  
  858. In an ordinary text editor one can refer to any position in a file/buffer by 
  859. specifying a line number and column number.  This approach is not adequate for 
  860. an editor like EPM that has the dual goal of supporting attributes record 
  861. management and yet minimizing the impact of attribute support on 
  862. applications/macros that are not attribute-aware.  In order to best achieve 
  863. both goals, EPM has replaced the common line/column coordinate system with a 
  864. line/column/atoffset based coordinate system.  In this system each character of 
  865. a line occupies a unique column, but individual attribute records are denoted 
  866. by their attribute offset relative to the next character in the buffer/file. 
  867. The characters themselves always have an atoffset value of zero, so the 
  868. atoffset value is often omitted when referring to characters.  An attribute 
  869. record located immediately to the left of a character is said to be located at 
  870. the same column as that character but at an atoffset of -1.  An attribute 
  871. record immediately to the left of that is said to be at atoffset -2.  The 
  872. following diagram illustrates the notation for various characters and 
  873. attributes on a line: 
  874.  
  875.     abcd[A]efg[B][C][D]h[E]  [F]
  876.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöé
  877.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöé    Γöö col 11 atoffset -1
  878.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöé Γöö column 9  atoffset -1
  879.     Γöé  Γöé Γöé Γöé   Γöé     Γöé Γöö column 8  (atoffset 0)
  880.     Γöé  Γöé Γöé Γöé   Γöé     Γöö column 8  atoffset -1
  881.     Γöé  Γöé Γöé Γöé   Γöö column 8  atoffset -3
  882.     Γöé  Γöé Γöé Γöö column 5  (atoffset 0)
  883.     Γöé  Γöé Γöö column 5  atoffset -1
  884.     Γöé  Γöö column 4  (atoffset 0)
  885.     Γöö column 1  (atoffset 0)
  886.  
  887. Note:  The text in the example will simply appear as a sequence characters from 
  888.        "a" to "h" because attribute records are invisible.  An exception to 
  889.        this might be if the attributes effect the formatting, parsing, or 
  890.        rendering of the text.
  891.  
  892. As you can see in this first example, each of the characters resides at a 
  893. unique column number and has an implicit atoffset of zero.  You can also see 
  894. all attribute records reside at negative atoffsets and that it is possible for 
  895. more than one attribute record to reside between any two adjacent characters. 
  896. In this example, three attribute records reside between the "g" in column 7 and 
  897. the "h" in column 8. 
  898.  
  899. It should be noted that negative column numbers and positive at offset values 
  900. are invalid.  In previous versions of EPM it was possible to have positive 
  901. atoffsets.  This has been changed because it complicates the implementation 
  902. without providing a satisfactory solution to any problem.  It also be noted 
  903. that overly negative atoffset values have undefined semantics that may vary 
  904. depending on the operation requested.  Most operations will flag an error when 
  905. overly negative values are specified.  ((Footnote:  It is recognized by the 
  906. developers of EPM that people tend to deal with positive numbers better than 
  907. with negative. For this reason, we'd like to change the notation to be positive 
  908. and to represent the position of attributes relative to the character to the 
  909. left. Unfortunately, we are unlikely to find the time to make this change.)) 
  910.  
  911. When working with attributes records it is also important to have a notation 
  912. for the spaces between characters and attribute records.  The convention is 
  913. that each interstitial is reference by the same coordinate as the character or 
  914. attribute to its right.  In the first example, the position on the left side of 
  915. the "c" character is referred to column 3 atoffset 0. Similarly the 
  916. interstitial between the C and D attribute records is referred to as column 8 
  917. atoffset -1. 
  918.  
  919. In addition to positional information, attribute records also contain class, 
  920. value, and range information. 
  921.  
  922. Each attribute record has a class field that is used to categorize the 
  923. attribute record based on its purpose.  For example, one might be a member of a 
  924. bookmark class or sgml tag class.  Certain predetermined classes are supported 
  925. by the editor:  AC_FONT, AC_COLOR, AC_HSPACE.  Internal support for additional 
  926. classes will be added later, and applications can create and support additional 
  927. classes.  This is done by registering a class.  The editor provides C and E 
  928. macro API's for this. 
  929.  
  930. In addition to a class field, each attribute record has a four byte "value" 
  931. field whose interpretation is based on the class field of the attribute record. 
  932. For example, the value field of an SGML class attribute record might be a 
  933. pointer to meta information about the SGML element enclosed by the attribute 
  934. record.  The interpretation of the value fields of the internally supported 
  935. attribute classes are: 
  936.  
  937. AC_FONT   The value fields of AC_FONT attribute records is interpreted as a 
  938.           font ID. (See pregister_font for further info about font ID's.) 
  939.  
  940. AC_HSPACE This attribute records are always interpreted has having point range 
  941.           and their value field is interpreted as the amount of horizontal 
  942.           white space that should be added at this point in the file when 
  943.           rendered. 
  944.  
  945. AC_COLOR  The value fields of AC_COLOR attribute records is interpreted in the 
  946.           same fashion that the attribute byte of CGA monitors was interpreted. 
  947.           That is, the high nibble is the background color and the low nibble 
  948.           is the foreground color. In the future this class may be broken down 
  949.           into a foreground color class and a background color class so that 
  950.           support can be added for more than 16 colors. 
  951.  
  952. In the current implementation the class field is only one byte long.  In 
  953. addition, the classes below 64 are reserved for internal use.  This leaves only 
  954. 192 classes for application use.  This is a relatively small domain, so it 
  955. suggested that applications try to use as few classes as reasonable.  For 
  956. example, if one were to implement a SGML tag set where each tag type was a 
  957. class, one could easily consume most of the available classes.  In a situation 
  958. like this it is suggested that the application just register a single SGML tag 
  959. class and make the value field a pointer to a record that describes among other 
  960. things, the type of SGML tag being represented by the attribute record. 
  961.  
  962. Each attribute record has a range field.  The range field indicates over what 
  963. domain the attribute record rules.  That is, if the attribute record indicates 
  964. that text should be colored red, the range value indicates what text should be 
  965. colored red.  There are currently four types of range values supported in EPM: 
  966. point, set, push, and pop. 
  967.  
  968. The "point" range is simply used to remember a location.  Attributes with this 
  969. range might be used as book marks for example.  Attribute records with such a 
  970. range effect no text, they just mark a location.  For example if one put a 
  971. color attribute record with a point range into the document, no text would 
  972. change color. 
  973.  
  974. The "set" range simply indicates that it's attribute record rules over all the 
  975. text that follows until another set attribute record of the same class is 
  976. encountered.  Attribute records of this class can easily be used to simulate 
  977. character oriented attribute support much like that seen in most word 
  978. processors. 
  979.  
  980. The "push" range simply indicates that it's attribute record rules over the the 
  981. text that follows until suspended with another push attribute record of the 
  982. same class or until a matching "pop" attribute record is encountered. 
  983.  
  984. The "pop" range indicates that the text that follows should be ruled by the 
  985. attribute record (of the same class) that was suspended by "push" attribute 
  986. record that currently rules the text to the left of this pop attribute record. 
  987. Together the push and the pop attribute records are ideally suited implement a 
  988. structured text system or to do GML and SGML like text tagging. 
  989.  
  990. The above definitions of push, pop, and set attribute records are a bit 
  991. ambiguous on what is done if a file contains both push/pop and set attribute 
  992. records of the same class.  In actuality the behavior is undefined.  In the 
  993. current implementation, push and set are actually the same value so the editor 
  994. can not distinguish between them.  In the future this may change in order to 
  995. enable some optimizations.  Therefore one should stick to the AR_PUSH, AR_POP, 
  996. AR_SET, and AR_POINT constant definitions provided in ATTR.E and ATTRIB.H, and 
  997. one should not mix push/pop attributes with set attributes of the same class. 
  998. It is anticipated that when one uses several modules/utilties at the same time, 
  999. each utility might choose to use a different set a ranges for a given attribute 
  1000. class.  No solution to this problem has been adequately worked out at this 
  1001. point, but we don't expect this to be a major problem. 
  1002.  
  1003. Potential solutions might be to register each as being either push/pop or set 
  1004. and point. 
  1005.  
  1006.  
  1007. ΓòÉΓòÉΓòÉ 3. Definition Primitives ΓòÉΓòÉΓòÉ
  1008.  
  1009. The E language has a rich collection of primitives. These primitives are the 
  1010. building blocks of E programs since all E statements must occur within a 
  1011. definition construct. Definition primitives define procedures, commands, keys 
  1012. and initializations. Some definition primitives may be considered procedures. 
  1013. When distinguishing between these DEF procedures, one must consider three 
  1014. factors: how many of each type of definition may coexist in one program, when 
  1015. they are executed and what parameters they can be passed. The definition 
  1016. primitives are : 
  1017.  
  1018. o DEFINIT 
  1019.  
  1020.   These procedures may be multiply defined. All DEFINIT procedures are executed 
  1021.   first upon initialization of the EPM editor, one after another in the order 
  1022.   in which they were encountered during compilation.  (That's what we mean by 
  1023.   "may be multiply defined" - you can have several DEFINIT procedures and they 
  1024.   will be executed in sequence as if they were concatenated.) They take no 
  1025.   arguments and are typically used to initialize universal variables. 
  1026.  
  1027. o DEFEXIT 
  1028.  
  1029.   The converse of DEFINIT.  E executes all DEFEXIT procedures last, just before 
  1030.   it returns to the operating system.  DEFEXIT procedures are also called 
  1031.   during unlinking. Like DEFINITs, these procedures may be multiply defined and 
  1032.   take no arguments. 
  1033.  
  1034. o DEFMAIN 
  1035.  
  1036.   This procedure may be defined only once. DEFMAIN is executed after the 
  1037.   DEFINIT procedures are executed. This procedure is typically used to take 
  1038.   control of the editor's command dialog box arguments and options before the 
  1039.   editor. This can be particularly handy when you want the edit command to take 
  1040.   your own arguments or funky file names like "h:profile exec a". The 
  1041.   parameters that followed the epm command at the OS/2 prompt can be retrieved 
  1042.   by ARG(1), ARG(2), ARG(3), etc. function calls for as many arguments as are 
  1043.   passed. The number of arguments can be determined with the ARG() function. 
  1044.   This type of retrieval will be discussed in the next section. 
  1045.  
  1046. o DEFPROC 
  1047.  
  1048.   This kind of procedure is called by other procedures. It has a much more 
  1049.   sophisticated parameter passing capability to make the programming of other 
  1050.   procedures easier. Its capabilities include call by reference, call by value 
  1051.   and the ability to receive a variable number of arguments. 
  1052.  
  1053. o DEFC 
  1054.  
  1055.   This procedure allows the user to define new commands or redefine internal 
  1056.   editor commands as well as external commands. The command dialog box 
  1057.   arguments may be retrieved by an ARG(1) function call. 
  1058.  
  1059. o DEF 
  1060.  
  1061.   This defines the operation of a key.  It takes no arguments. 
  1062.  
  1063. o DEFKEYS 
  1064.  
  1065.   This is not a procedure and will be talked about in the key definitions 
  1066.   section of this document. This primitive allows KEY procedures to be grouped 
  1067.   into a keyset. 
  1068.  
  1069. o SET 
  1070.  
  1071.   This is not a procedure and will be talked about in the SET definitions 
  1072.   section of this document. This primitive is used for setting some of the 
  1073.   default configurations of the E editor. 
  1074.  
  1075. o CONST 
  1076.  
  1077.   This is not a procedure and will be talked about in the CONST section of this 
  1078.   document. This primitive is used for defining constants used by the E 
  1079.   translator. Constants do not change during execution of the E procs. 
  1080.  
  1081. o DEFMODIFY 
  1082.  
  1083.   DEFMODIFY, DEFLOAD and DEFSELECT are three "events". They are described more 
  1084.   fully later in this section.  DEFMODIFY is automatically triggered when the 
  1085.   file's number of modifications crosses certain threshold values. 
  1086.  
  1087. o DEFLOAD 
  1088.  
  1089.   DEFLOAD is invoked whenever a new file is created in the ring. 
  1090.  
  1091. o DEFSELECT 
  1092.  
  1093.   This event is automatically triggered whenever you switch files. 
  1094.  
  1095. The procedure definition primitives DEFINIT, DEFMAIN, DEFPROC, DEF and DEFC 
  1096. have no explicit termination keyword. Each definition is ended by the beginning 
  1097. of another DEFxxx. The rest of this chapter will explain each definition 
  1098. primitive in more detail. 
  1099.  
  1100.  
  1101. ΓòÉΓòÉΓòÉ 3.1. Parameter Retrieval using ARG(1) ΓòÉΓòÉΓòÉ
  1102.  
  1103. A DEFC or DEFMAIN receives only one argument/parameter: the command string. The 
  1104. command string consists of what was last typed at the command dialog box. The 
  1105. string may contain several words separated by spaces. In the case of DEFC, its 
  1106. sole argument will consist of all the characters typed at the E command dialog 
  1107. box after the name of the command. This argument is not declared as a parameter 
  1108. in the DEFC declaration. The DEFC construct does not allow for any parameter 
  1109. declarations. Instead, the argument can be retrieved via a function call, 
  1110. ARG(1). An example of this usage is: 
  1111.  
  1112.  
  1113.   defc test
  1114.     sayerror "arg(1) is " arg(1)
  1115.  
  1116. The user activates this command by typing test on the E command dialog box. 
  1117. This would result in the following being printed on the message area: arg(1) is 
  1118. . If the user added a parameter when calling test, for example test stuff, then 
  1119. the following string would be printed: arg(1) is stuff. 
  1120.  
  1121. In DEFMAIN, as with a DEFC, the only way to access the argument is to use an 
  1122. ARG(1) function call. DEFMAIN's argument/command string will consist of 
  1123. everything the user typed after the epm command at the OS/2 prompt. For 
  1124. example, assume that the following lines are added to the file MYMAIN.E: 
  1125.  
  1126.  
  1127.   defmain
  1128.     sayerror "arg(1) is " arg(1)
  1129.  
  1130. If the user invokes the editor with the command epm `list *.e', DEFMAIN will 
  1131. print arg(1) is  'list *.e' in the message area. 
  1132.  
  1133. A DEFPROC can receive multiple arguments separated by commas from the primitive 
  1134. that calls it. In a DEFPROC, ARG(1) is only the first parameter. An example of 
  1135. this usage is: 
  1136.  
  1137. defc test2
  1138.    call test2('actual param 1', 'actual param 2')
  1139.  
  1140. defproc test2(param1_decl, param2_decl)
  1141.    sayerror "arg(1) is " arg(1)
  1142. If the user types test2 at the command dialog box, the procedure will print 
  1143. arg(1) is actual param 1. 
  1144.  
  1145. For the exact syntax of the ARG() procedure, please refer to section Built-in 
  1146. Statements and Procedures. 
  1147.  
  1148.  
  1149. ΓòÉΓòÉΓòÉ 3.2. DEFINIT ΓòÉΓòÉΓòÉ
  1150.  
  1151. The DEFINIT keyword allows the initialization of variables for use by other E 
  1152. procedures. There is no limit to the number of DEFINIT definitions in an E 
  1153. source file. The order of execution of the DEFINIT definitions is the same as 
  1154. their compilation order. All DEFINIT definitions are executed before the 
  1155. DEFMAIN definition is executed. The general syntax is: 
  1156.  
  1157.   DEFINIT
  1158.   {UNIVERSAL variable  {,variable} }
  1159.   {statement}
  1160.  
  1161.  
  1162. ΓòÉΓòÉΓòÉ 3.3. DEFEXIT ΓòÉΓòÉΓòÉ
  1163.  
  1164. The DEFEXIT keyword allows for statements to be executed only when leaving the 
  1165. editor or unlinking a module. This is useful for any tasks the user wishes to 
  1166. perform once per session after any and all changes are made to a file. For 
  1167. example, this allows the user to keep files or communication channels open 
  1168. throughout the editing session for speed, and only close then when the user 
  1169. really exits from E. 
  1170.  
  1171. The syntax is the same as that of DEFINIT: 
  1172.  
  1173.   DEFEXIT
  1174.   {UNIVERSAL variable  {,variable} }
  1175.   {statement}
  1176.  
  1177.  
  1178. ΓòÉΓòÉΓòÉ 3.4. DEFMAIN ΓòÉΓòÉΓòÉ
  1179.  
  1180. The DEFMAIN construct allows the user to take control of the command line 
  1181. arguments, i.e. those arguments and options that the user specifies when 
  1182. invoking the editor at the OS/2 prompt. The command line arguments may be 
  1183. retrieved by an ARG(1) function call. The following example comes from the E 
  1184. editor's DEFMAIN in file MAIN.E: 
  1185.  
  1186. defmain
  1187.     os2cmdline = 'e 'arg(1)
  1188.  
  1189. The DEFMAIN definition is not required, and if present, it is executed after 
  1190. all DEFINIT definitions. To avoid an undefined state of the editor, a blank 
  1191. file is inserted in the top ring of the editor before DEFMAIN is executed. The 
  1192. general syntax is: 
  1193.  
  1194.   DEFMAIN
  1195.   {UNIVERSAL variable  {,variable} }
  1196.   statement  {statement}
  1197.  
  1198.  
  1199. ΓòÉΓòÉΓòÉ 3.5. Procedure Definitions (DEFPROC) ΓòÉΓòÉΓòÉ
  1200.  
  1201. The DEFPROC primitive is used to define new procedures (functions). The general 
  1202. syntax is: (See E language syntax for precise description). 
  1203.  
  1204.   DEFPROC  name [( [ [VAR] p1]  {, [VAR] p2})] [=]
  1205.      {UNIVERSAL variable  {,variable} }
  1206.      statement  {statement}
  1207.      [RETURN [expression] ].
  1208.  
  1209.    where name, p's and v's are valid E identifiers.
  1210.  
  1211. Procedures can return a string of 255 characters or less. If no string is 
  1212. returned, or if a simple RETURN statement with no value is issued, a null 
  1213. string is automatically returned when the procedure definition ends. 
  1214.  
  1215. The maximum number of DEFPROC arguments is 8. If parameters are specified (like 
  1216. p1 and p2 above) then the function is assumed to require a minimum of that many 
  1217. arguments. For example, if you've defined defproc myproc(x,y,z) but call it 
  1218. elsewhere with call myproc(a,b), you'll get an error when the call occurs (at 
  1219. run-time) "Procedure needs more arguments". But you can pass MORE than the 
  1220. minimum number of arguments. That is, call myproc(a,b,c,d) will work.  The 
  1221. number of arguments can be retrieved inside the procedure using arg(). You saw 
  1222. earlier how arg(1) retrieved the first parameter. Similarly, arg(2) retrieves 
  1223. the second parameter and arg(3) retrieves the third, etc. In the above example, 
  1224. the parameters c and d can be retrieved using the calls arg(3) and arg(4), 
  1225. respectively. For an illustration of this technique, see the file SORTE.E. 
  1226.  
  1227. If the keyword VAR prefaces a parameter name in the called procedure's 
  1228. parameter list, then the variable that the caller passes in the corresponding 
  1229. position may be changed (call by reference). If the caller passes a parameter 
  1230. in this position that is not a variable, the E interpreter will detect the 
  1231. error at run time and halt. 
  1232.  
  1233. In example 3, call by reference is demonstrated. If the user types test at the 
  1234. command dialog box, the defc test will call the defproc myproc() which will 
  1235. print: a and b are 1  2. After the procedure returns, defc test will print : a 
  1236. and b are 3  2. Variable b was permanently changed by the assignment in 
  1237. procedure myproc() because it had the var prefix. Variable a's value was 
  1238. unchanged once procedure myproc() returned. If defc test had made the following 
  1239. call: call myproc(a, 5*6), an invalid call by reference message would appear at 
  1240. run time. 
  1241.  
  1242.  
  1243. ΓòÉΓòÉΓòÉ 3.5.1. Example 1: ΓòÉΓòÉΓòÉ
  1244.  
  1245.      defproc  myproc               /* Define a new procedure */
  1246.        return  arg()               /* Return number of arguments */
  1247.                                    /* passed to procedure.*/
  1248.  
  1249.      def a_l                       /* Define the key Alt-L */
  1250.        call myproc()               /* Throw away 0 returned by myproc */
  1251.        Nofargs=myproc('a','b')     /* Sets Nofargs to 2 */
  1252.  
  1253.  
  1254. ΓòÉΓòÉΓòÉ 3.5.2. Example 2: ΓòÉΓòÉΓòÉ
  1255.  
  1256.      defproc  myproc               /* Define a new procedure */
  1257.        return  arg(1)              /* Return first argument  */
  1258.                                    /* passed to procedure.*/
  1259.  
  1260.      def a_l                       /* Define the key Alt-L */
  1261.        call myproc()               /* Throw away '' returned by myproc */
  1262.        Firstarg=myproc('a','b')    /* Sets Firstarg to 'a' */
  1263.        Firstarg=myproc()           /* Sets Firstarg to ''  */
  1264.  
  1265.  
  1266. ΓòÉΓòÉΓòÉ 3.5.3. Example 3: ΓòÉΓòÉΓòÉ
  1267.  
  1268.      definit
  1269.        universal  always_around    /* Define a global variable */
  1270.  
  1271.        always_around=0             /* set global variable to 0*/
  1272.  
  1273.  
  1274.      defc test
  1275.        a = 3
  1276.        b = 5
  1277.        call myproc(a, b)
  1278.        sayerror "a and b are " a b
  1279.  
  1280.      defproc  myproc(a,var b)      /* Define a new procedure */
  1281.        universal  always_around
  1282.  
  1283.        always_around=1             /* set global variable to 1*/
  1284.        a=1                         /* Change local parameter */
  1285.        b=2                         /* Change callers variable */
  1286.        i=10                        /* Set local variable */
  1287.        sayerror "a and b are " a b
  1288.  
  1289.  
  1290. ΓòÉΓòÉΓòÉ 3.6. Command Definitions (DEFC) ΓòÉΓòÉΓòÉ
  1291.  
  1292. The DEFC construct is used to define new commands. When a command is issued, E 
  1293. will search for the first word of the command as follows: 
  1294.  
  1295.  
  1296. ΓòÉΓòÉΓòÉ 3.6.1. Command search order: ΓòÉΓòÉΓòÉ
  1297.  
  1298.  1. Look for a DEFC command (i.e. one defined in a .E file) 
  1299.  2. Look for an internal editor command (e.g. MARGINS or EDIT) 
  1300.  3. Search the directories in the PATH environment variable for any executable 
  1301.     file, as follows: 
  1302.  
  1303.     a. a .EXE, .CMD, .EX file in current directory 
  1304.     b. a .EXE, .CMD, .EX file in the PATH or EPMPATH directories 
  1305.     c. a .EXE, .CMD, .EX file in the same directory as EPM.EXE. 
  1306.  
  1307. Because of the search order, user-defined commands with the same name as 
  1308. built-in commands can override internal editor commands. The XCOM command may 
  1309. be used to force execution of an internal editor command in the case of 
  1310. duplicates. 
  1311.  
  1312.  
  1313. ΓòÉΓòÉΓòÉ 3.6.2. Example: ΓòÉΓòÉΓòÉ
  1314.  
  1315.   defc   edit=              /* Redefine the edit command. */
  1316.     'xcom edit 'arg(1)      /* Pass command through to the editor  */
  1317. The general syntax is (See E language syntax for precise description): 
  1318.  
  1319.   DEFC  name {,name}  [=]
  1320.      {UNIVERSAL variable  {,variable} }
  1321.      statement  {statement}
  1322.      [RETURN [expression] ].
  1323.  
  1324.     where name is a valid E identifier.
  1325.  
  1326.  
  1327. ΓòÉΓòÉΓòÉ 3.7. Key Definitions (DEF and DEFKEYS) ΓòÉΓòÉΓòÉ
  1328.  
  1329. A keyset is a named collection of keys.  Typically, this collection defines a 
  1330. particular mode of editing. For example, you might want the keyboard to behave 
  1331. one way in a drawing mode and another way in an editing mode. Therefore, each 
  1332. of these modes would warrant its own keyset. You can have many keysets defined, 
  1333. but only one can be used at any time. 
  1334.  
  1335. The DEFKEYS keyword names the keyset. The KEYS statement activates a keyset. 
  1336. The DEF keyword defines a key or pseudo-key that belongs to the current keyset. 
  1337.  
  1338. Note:  Keys may be redefined.  If you create a DEF and the same DEF already 
  1339. exists in an earlier place in the compilation, the compiler will not issue an 
  1340. error.  It will forget the previous definition.  The penalty is that the 
  1341. previous code is not removed (difficult to do in a fast one-pass compiler), so 
  1342. a little memory will be wasted in the E.EX file. For a list of definable keys, 
  1343. see E-Definable Keys. 
  1344.  
  1345. DEF key_name|ch [-ch] {, key_name|ch [-ch]}[=] 
  1346.                     Define key. ch represents any printable character. A 
  1347.                     line-break (newline) is allowed after the comma, which can 
  1348.                     help readability if you're defining many keynames at once. 
  1349.  
  1350.                                         Example:
  1351.                                         /* Define 27 different keys to do same function,
  1352.                                                                                  pagedown. */
  1353.                                         def 'a'-'z', a_t = pagedown
  1354.  
  1355.                                         def '#' = 'add' /* define single key for add command */
  1356.  
  1357. DEFKEYS  name  [NEW | BASE | OVERLAY | CLEAR] 
  1358.                     Define keyset.  If the OVERLAY or no option is specified, 
  1359.                     then the last set of key definitions is copied onto the 
  1360.                     named set of keys.  The named keyset thus starts out with 
  1361.                     the same keys as the last one.  The NEW (or equivalent 
  1362.                     BASE) option starts a keyset with only the alphabetic, 
  1363.                     numeric and control characters. The CLEAR option starts an 
  1364.                     empty keyset. Please refer to section Keysets for more 
  1365.                     information on the BASE, OVERLAY and CLEAR options. 
  1366.  
  1367. A sample keyset named test_keys is defined below. This example shows the 
  1368. redefinition of the Enter and Space keys: 
  1369.  
  1370.                    defkeys test_keys
  1371.  
  1372.                    def ' '=
  1373.                       universal expand_on
  1374.                       if expand_on then
  1375.                          if  e_first_expansion()=0 then
  1376.                             keyin ' '
  1377.                          endif
  1378.                       else
  1379.                          keyin ' '
  1380.                       endif
  1381.  
  1382.                    def enter=
  1383.                       universal expand_on
  1384.  
  1385.                       if insertstate() then
  1386.                          insert
  1387.                       else
  1388.                          call maybe_autosave()
  1389.                          if expand_on then
  1390.                             if e_second_expansion()=0 then
  1391.                                call einsert_line()
  1392.                             endif
  1393.                          else
  1394.                             call einsert_line()
  1395.                          endif
  1396.                       endif
  1397.  
  1398.  
  1399. ΓòÉΓòÉΓòÉ 3.8. SET Definitions ΓòÉΓòÉΓòÉ
  1400.  
  1401. The E editor has a set of configuration options which may be reconfigured by a 
  1402. SET definition. SET definitions are executed before the DEFINIT procedure 
  1403. definitions are executed.  For examples of these configuration options, refer 
  1404. to The EPM User's Guide. 
  1405.  
  1406. It can be seen that there isn't much need for the SET definition primitive 
  1407. since most editor options can be set in DEFINIT and DEFMAIN. (We hope to do 
  1408. away with them in the future, in favor of straightforward commands like 'tabs' 
  1409. and 'margins'.) 
  1410.  
  1411. Most users will care to change only insert_state. 
  1412.  
  1413.  
  1414. ΓòÉΓòÉΓòÉ 3.9. Constants ΓòÉΓòÉΓòÉ
  1415.  
  1416. The CONST keyword allows a user to define constants that the E translator 
  1417. remembers during the translation of the E procs. ET substitutes the value 
  1418. whenever it sees the constant name. Constants serve no purpose at run-time. 
  1419.  
  1420. Constants may be redefined to the same value without causing an error or loss 
  1421. of memory space.  This is useful if you wish to develop a package for 
  1422. distribution, since you can define the constants you need without worrying 
  1423. about conflict with other files installed by the user.  The syntax for defining 
  1424. constants is: 
  1425.  
  1426.    CONST
  1427.       c1 = exp1 [,]
  1428.       c2 = exp2 [,]
  1429.       ...
  1430.  
  1431.  example
  1432.     CONST
  1433.        a=3
  1434.        b=a * 2
  1435.  
  1436.  
  1437. ΓòÉΓòÉΓòÉ 3.10. DEFMODIFY ΓòÉΓòÉΓòÉ
  1438.  
  1439. The DEFMODIFY event is executed when a file's number of modifications: 
  1440.  
  1441. o goes from zero to nonzero (the first modification - we might want to change 
  1442.   the screen color); 
  1443. o goes from nonzero to zero (after a save - we might want to change the screen 
  1444.   color back again); 
  1445. o goes from less than .autosave to greater than or equal to .autosave (so we 
  1446.   can autosave). 
  1447.  
  1448. See the file MODIFY.E for more details. 
  1449.  
  1450.  
  1451. ΓòÉΓòÉΓòÉ 3.11. DEFLOAD ΓòÉΓòÉΓòÉ
  1452.  
  1453. DEFLOAD is invoked whenever a new file is created in the ring, whether loaded 
  1454. from disk or created by 'edit /n' or 'edit /c'. 
  1455.  
  1456. It is invoked at the end of all processing, the last thing before returning 
  1457. control to the user, so as not to be fooled by the file moving around in the 
  1458. ring or being renamed. If a file is loaded from disk and renamed, DEFLOAD gets 
  1459. the right filename. 
  1460.  
  1461. After all new files are defload-processed, the expected current file is 
  1462. restored.  Thus the command 'e one two' loads both files, invokes defload on 
  1463. 'one', then on 'two', and finally re-activates 'one'; the user is left looking 
  1464. at the same file as in the old days.  This is done internally so the defload 
  1465. procs don't have to worry about restoring fileids.  Understand this example: 
  1466.  
  1467.    defc rcedit
  1468.       'edit 'arg(1)
  1469.       if rc=sayerror('New file') then
  1470.          sayerror "It's a new file"
  1471.       endif
  1472.  
  1473.    defload  -- this defload procedure need not be close to the defc.
  1474.       sayerror "DEFLOAD for ".filename
  1475.  
  1476. When you type 'rcedit nosuch', the file nosuch (which doesn't exist on disk) is 
  1477. created in the ring.  DEFLOAD is not triggered until after all other procs are 
  1478. done, so RCEDIT runs to completion with the proper RC value.  You'll see 'It's 
  1479. a new file' and then 'DEFLOAD for nosuch'. For another example of a DEFLOAD 
  1480. definition statement see sample menu addition. 
  1481.  
  1482. It's not guaranteed that the files will be defload-processed in the same order 
  1483. as they're loaded.  They're processed in fileid order.  So 'two' might have 
  1484. been processed before 'one' if fileids are reused. 
  1485.  
  1486. The DEFLOAD event is also triggered whenever the name of the file changes. 
  1487. Typically a DEFLOAD will do things like set tabs and margins based on the 
  1488. filetype, so a name change is treated the same as a new load. 
  1489.  
  1490.  
  1491. ΓòÉΓòÉΓòÉ 3.12. DEFSELECT ΓòÉΓòÉΓòÉ
  1492.  
  1493. This event is automatically triggered whenever you switch files.  To be exact, 
  1494. it is invoked after all other command processing is done, if the then-current 
  1495. file is different from the current file before the command.  Thus if a command 
  1496. switches to a temporary file but switches back to the original file before 
  1497. ending, this event will not be triggered. 
  1498.  
  1499. This replaces the clumsy previous method, a procedure select_edit_keys() which 
  1500. had to be explicitly called at the end of any action that might have switched 
  1501. files. 
  1502.  
  1503. But there's not much work to be done in this event because most of the things 
  1504. that used to be done in select_edit_keys() are now done only once at file-load 
  1505. time, in the DEFLOAD event.  The keyset, tabs and margins stick with the file 
  1506. from then on.  In the standard macros nothing is done in the DEFSELECT. 
  1507.  
  1508. Note:  The order of events at start-up is:  definit, defmain, defload, 
  1509. defmodify and defselect.  The defmodify event would not normally occur at 
  1510. start-up, unless your defmain modified the newly-loaded file. 
  1511.  
  1512. These three events can be multiply defined.  You can have multiple procedures 
  1513. under the same name scattered throughout your macro set, and they'll be run in 
  1514. succession.  (As DEFINIT procedures have been scattered around the E files in 
  1515. the past.)  This helps keep the macros modular - if you're writing an editor 
  1516. application that needs to get control whenever a new file is loaded (the old 
  1517. BOOKMARK application comes to mind), you can write a DEFLOAD within your module 
  1518. without having to alter the base E files. 
  1519.  
  1520.  
  1521. ΓòÉΓòÉΓòÉ 4. Statements ΓòÉΓòÉΓòÉ
  1522.  
  1523. Procedures, commands and key definitions are composed of statements. Valid 
  1524. statements in the E language are: 
  1525.  
  1526. Construct:                          Example: 
  1527.  
  1528. assignment statements 
  1529.                                     temp = 36 
  1530.  
  1531. built-in statements 
  1532.                                     insertline "Written by the Yorktown E 
  1533.                                     group", 2 
  1534.  
  1535. conditional statements 
  1536.                                     to be discussed in section Conditional and 
  1537.                                     Loop Statements 
  1538.  
  1539. parse statements 
  1540.                                     to be discussed in section The Parse 
  1541.                                     Statement 
  1542.  
  1543. compiler directive statements 
  1544.                                     to be discussed in section Compiler 
  1545.                                     Directive Statements 
  1546.  
  1547. procedure calls 
  1548.                                     testproc(arg1, arg2) 
  1549.  
  1550. commands 
  1551.                                     to be discussed in section Using EPM 
  1552.                                     Commands in E Statements 
  1553.  
  1554.  
  1555. ΓòÉΓòÉΓòÉ 4.1. Built-in Statements and Procedures ΓòÉΓòÉΓòÉ
  1556.  
  1557. In the following syntactic description the same symbolic conventions are used 
  1558. as in The EPM User's Guide section "E Commands". In addition, the word var 
  1559. followed by an argument means that the argument must be a variable, i.e. a 
  1560. number, string or expression is not acceptable. 
  1561.  
  1562. Most of the following statements can be optionally spelled with underscores 
  1563. between the words. Please refer to E Language Syntax for more information. 
  1564.  
  1565. Those commands followed by parentheses are procedures; those not followed by 
  1566. parentheses are statements. Each can be followed by arguments. Only procedures 
  1567. can return values. 
  1568.  
  1569.  
  1570. ΓòÉΓòÉΓòÉ 4.1.1. ABBREV(information, info [, length] ) ΓòÉΓòÉΓòÉ
  1571.  
  1572. Choose: 
  1573.  
  1574. o Syntax 
  1575. o Definition 
  1576. o Example 
  1577. o E Language Syntax 
  1578.  
  1579.  
  1580. ΓòÉΓòÉΓòÉ 4.1.2. ACTIVATEACCELTABLE var fileid ΓòÉΓòÉΓòÉ
  1581.  
  1582. Choose: 
  1583.  
  1584. o Syntax 
  1585. o Definition 
  1586. o E Language Syntax 
  1587.  
  1588. See also: 
  1589.  
  1590. o Building Accelerator Tables from the Macro Language 
  1591. o BUILDACCELTABLE 
  1592. o DELETEACCEL 
  1593. o QUERYACCELSTRING 
  1594.  
  1595.  
  1596. ΓòÉΓòÉΓòÉ 4.1.3. ACTIVATEFILE var fileid ΓòÉΓòÉΓòÉ
  1597.  
  1598. Choose: 
  1599.  
  1600. o Syntax 
  1601. o Definition 
  1602. o Example 
  1603. o E Language Syntax 
  1604.  
  1605.  
  1606. ΓòÉΓòÉΓòÉ 4.1.4. ADJUSTBLOCK ΓòÉΓòÉΓòÉ
  1607.  
  1608. Choose: 
  1609.  
  1610. o Syntax 
  1611. o Definition 
  1612. o E Language Syntax 
  1613.  
  1614.  
  1615. ΓòÉΓòÉΓòÉ 4.1.5. ADJUSTMARK ΓòÉΓòÉΓòÉ
  1616.  
  1617. Choose: 
  1618.  
  1619. o Syntax 
  1620. o Definition 
  1621. o E Language Syntax 
  1622.  
  1623.  
  1624. ΓòÉΓòÉΓòÉ 4.1.6. ARG([numeric_expression]) ΓòÉΓòÉΓòÉ
  1625.  
  1626. Choose: 
  1627.  
  1628. o Syntax 
  1629. o Definition 
  1630. o Example 
  1631. o E Language Syntax 
  1632.  
  1633.  
  1634. ΓòÉΓòÉΓòÉ 4.1.7. ASC(character) ΓòÉΓòÉΓòÉ
  1635.  
  1636. Choose: 
  1637.  
  1638. o Syntax 
  1639. o Definition 
  1640. o Example 
  1641. o E Language Syntax 
  1642.  
  1643.  
  1644. ΓòÉΓòÉΓòÉ 4.1.8. ATOI(numeric_expression) ΓòÉΓòÉΓòÉ
  1645.  
  1646. Choose: 
  1647.  
  1648. o Syntax 
  1649. o Definition 
  1650. o Example 
  1651. o E Language Syntax 
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 4.1.9. ATOL(numeric_expression) ΓòÉΓòÉΓòÉ
  1655.  
  1656. Choose: 
  1657.  
  1658. o Syntax 
  1659. o Definition 
  1660. o E Language Syntax 
  1661.  
  1662.  
  1663. ΓòÉΓòÉΓòÉ 4.1.10. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var fileid] ΓòÉΓòÉΓòÉ
  1664.  
  1665. Choose: 
  1666.  
  1667. o Syntax 
  1668. o Definition 
  1669. o Example 
  1670. o E Language Syntax 
  1671.  
  1672.  
  1673. ΓòÉΓòÉΓòÉ 4.1.11. BACKTAB ΓòÉΓòÉΓòÉ
  1674.  
  1675. Choose: 
  1676.  
  1677. o Syntax 
  1678. o Definition 
  1679. o E Language Syntax 
  1680.  
  1681.  
  1682. ΓòÉΓòÉΓòÉ 4.1.12. BACKTABWORD ΓòÉΓòÉΓòÉ
  1683.  
  1684. Choose: 
  1685.  
  1686. o Syntax 
  1687. o Definition 
  1688. o E Language Syntax 
  1689.  
  1690.  
  1691. ΓòÉΓòÉΓòÉ 4.1.13. BACKWARD ΓòÉΓòÉΓòÉ
  1692.  
  1693. Choose: 
  1694.  
  1695. o Syntax 
  1696. o Definition 
  1697. o E Language Syntax 
  1698.  
  1699.  
  1700. ΓòÉΓòÉΓòÉ 4.1.14. BEEP([pitch [, duration] ]) ΓòÉΓòÉΓòÉ
  1701.  
  1702. Choose: 
  1703.  
  1704. o Syntax 
  1705. o Definition 
  1706. o Example 
  1707. o E Language Syntax 
  1708.  
  1709.  
  1710. ΓòÉΓòÉΓòÉ 4.1.15. BEGINLINE ΓòÉΓòÉΓòÉ
  1711.  
  1712. Choose: 
  1713.  
  1714. o Syntax 
  1715. o Definition 
  1716. o E Language Syntax 
  1717.  
  1718.  
  1719. ΓòÉΓòÉΓòÉ 4.1.16. BOTTOM, BOT ΓòÉΓòÉΓòÉ
  1720.  
  1721. Choose: 
  1722.  
  1723. o Syntax 
  1724. o Definition 
  1725. o E Language Syntax 
  1726.  
  1727.  
  1728. ΓòÉΓòÉΓòÉ 4.1.17. BROWSE( 0 | 1 ) ΓòÉΓòÉΓòÉ
  1729.  
  1730. Choose: 
  1731.  
  1732. o Syntax 
  1733. o Definition 
  1734. o E Language Syntax 
  1735.  
  1736.  
  1737. ΓòÉΓòÉΓòÉ 4.1.18. BUFFER( subfunction_number, parameters... ) ΓòÉΓòÉΓòÉ
  1738.  
  1739. Choose: 
  1740.  
  1741. o Syntax 
  1742. o Definition 
  1743. o E Language Syntax 
  1744.  
  1745.  
  1746. ΓòÉΓòÉΓòÉ 4.1.19. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  1747.  
  1748. Choose: 
  1749.  
  1750. o Syntax 
  1751. o Definition 
  1752. o E Language Syntax 
  1753.  
  1754. See also: 
  1755.  
  1756. o Building Accelerator Tables from the Macro Language 
  1757. o ACTIVATEACCELTABLE 
  1758. o DELETEACCEL 
  1759. o QUERYACCELSTRING 
  1760.  
  1761.  
  1762. ΓòÉΓòÉΓòÉ 4.1.20. BUILDMENUITEM ΓòÉΓòÉΓòÉ
  1763.  
  1764. Choose: 
  1765.  
  1766. o Syntax 
  1767. o Definition 
  1768. o E Language Syntax 
  1769.  
  1770.  
  1771. ΓòÉΓòÉΓòÉ 4.1.21. BUILDSUBMENU ΓòÉΓòÉΓòÉ
  1772.  
  1773. Choose: 
  1774.  
  1775. o Syntax 
  1776. o Definition 
  1777. o E Language Syntax 
  1778.  
  1779.  
  1780. ΓòÉΓòÉΓòÉ 4.1.22. CALL  procedurename() ΓòÉΓòÉΓòÉ
  1781.  
  1782. Choose: 
  1783.  
  1784. o Syntax 
  1785. o Definition 
  1786. o E Language Syntax 
  1787.  
  1788.  
  1789. ΓòÉΓòÉΓòÉ 4.1.23. CENTER(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  1790.  
  1791. Choose: 
  1792.  
  1793. o Syntax 
  1794. o Definition 
  1795. o Example 
  1796. o E Language Syntax 
  1797.  
  1798.  
  1799. ΓòÉΓòÉΓòÉ 4.1.24. CENTRE(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  1800.  
  1801. Choose: 
  1802.  
  1803. o Syntax 
  1804. o Definition 
  1805. o Example 
  1806. o E Language Syntax 
  1807.  
  1808.  
  1809. ΓòÉΓòÉΓòÉ 4.1.25. CHR(numeric_expression) ΓòÉΓòÉΓòÉ
  1810.  
  1811. Choose: 
  1812.  
  1813. o Syntax 
  1814. o Definition 
  1815. o Example 
  1816. o E Language Syntax 
  1817.  
  1818.  
  1819. ΓòÉΓòÉΓòÉ 4.1.26. CIRCLEIT ΓòÉΓòÉΓòÉ
  1820.  
  1821. Choose: 
  1822.  
  1823. o Syntax 
  1824. o Definition 
  1825. o E Language Syntax 
  1826.  
  1827.  
  1828. ΓòÉΓòÉΓòÉ 4.1.27. COMPARE(string1, string2 [, pad] ) ΓòÉΓòÉΓòÉ
  1829.  
  1830. Choose: 
  1831.  
  1832. o Syntax 
  1833. o Definition 
  1834. o Example 
  1835. o E Language Syntax 
  1836.  
  1837.  
  1838. ΓòÉΓòÉΓòÉ 4.1.28. COPIES(string, n) ΓòÉΓòÉΓòÉ
  1839.  
  1840. Choose: 
  1841.  
  1842. o Syntax 
  1843. o Definition 
  1844. o Example 
  1845. o E Language Syntax 
  1846.  
  1847.  
  1848. ΓòÉΓòÉΓòÉ 4.1.29. COPYMARK ΓòÉΓòÉΓòÉ
  1849.  
  1850. Choose: 
  1851.  
  1852. o Syntax 
  1853. o Definition 
  1854. o E Language Syntax 
  1855.  
  1856.  
  1857. ΓòÉΓòÉΓòÉ 4.1.30. CURSOR_DIMENSIONS ΓòÉΓòÉΓòÉ
  1858.  
  1859. Choose: 
  1860.  
  1861. o Syntax 
  1862. o Definition 
  1863. o E Language Syntax 
  1864.  
  1865.  
  1866. ΓòÉΓòÉΓòÉ 4.1.31. DELETE ΓòÉΓòÉΓòÉ
  1867.  
  1868. Choose: 
  1869.  
  1870. o Syntax 
  1871. o Definition 
  1872. o E Language Syntax 
  1873.  
  1874.  
  1875. ΓòÉΓòÉΓòÉ 4.1.32. DELETEACCEL ΓòÉΓòÉΓòÉ
  1876.  
  1877. Choose: 
  1878.  
  1879. o Syntax 
  1880. o Definition 
  1881. o E Language Syntax 
  1882.  
  1883. See also: 
  1884.  
  1885. o Building Accelerator Tables from the Macro Language 
  1886. o ACTIVATEACCELTABLE 
  1887. o BUILDACCELTABLE 
  1888. o QUERYACCELSTRING 
  1889.  
  1890.  
  1891. ΓòÉΓòÉΓòÉ 4.1.33. DELETECHAR ΓòÉΓòÉΓòÉ
  1892.  
  1893. Choose: 
  1894.  
  1895. o Syntax 
  1896. o Definition 
  1897. o E Language Syntax 
  1898.  
  1899.  
  1900. ΓòÉΓòÉΓòÉ 4.1.34. DELETELINE  [line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  1901.  
  1902. Choose: 
  1903.  
  1904. o Syntax 
  1905. o Definition 
  1906. o E Language Syntax 
  1907.  
  1908.  
  1909. ΓòÉΓòÉΓòÉ 4.1.35. DELETEMARK ΓòÉΓòÉΓòÉ
  1910.  
  1911. Choose: 
  1912.  
  1913. o Syntax 
  1914. o Definition 
  1915. o E Language Syntax 
  1916.  
  1917.  
  1918. ΓòÉΓòÉΓòÉ 4.1.36. DELETEMENU ΓòÉΓòÉΓòÉ
  1919.  
  1920. Choose: 
  1921.  
  1922. o Syntax 
  1923. o Definition 
  1924. o E Language Syntax 
  1925.  
  1926.  
  1927. ΓòÉΓòÉΓòÉ 4.1.37. DELSTR(string, n [, length] ) ΓòÉΓòÉΓòÉ
  1928.  
  1929. Choose: 
  1930.  
  1931. o Syntax 
  1932. o Definition 
  1933. o Example 
  1934. o E Language Syntax 
  1935.  
  1936.  
  1937. ΓòÉΓòÉΓòÉ 4.1.38. DELWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  1938.  
  1939. Choose: 
  1940.  
  1941. o Syntax 
  1942. o Definition 
  1943. o Example 
  1944. o E Language Syntax 
  1945.  
  1946.  
  1947. ΓòÉΓòÉΓòÉ 4.1.39. DIRECTORY([path]) ΓòÉΓòÉΓòÉ
  1948.  
  1949. Choose: 
  1950.  
  1951. o Syntax 
  1952. o Definition 
  1953. o Example 
  1954. o E Language Syntax 
  1955.  
  1956.  
  1957. ΓòÉΓòÉΓòÉ 4.1.40. DISPLAY  '-4' | '-2' | '-1' | '1' | '2' | '4' ΓòÉΓòÉΓòÉ
  1958.  
  1959. Choose: 
  1960.  
  1961. o Syntax 
  1962. o Definition 
  1963. o Example 
  1964. o E Language Syntax 
  1965.  
  1966.  
  1967. ΓòÉΓòÉΓòÉ 4.1.41. DO ΓòÉΓòÉΓòÉ
  1968.  
  1969. Choose: 
  1970.  
  1971. o Syntax 
  1972. o Definition 
  1973. o E Language Syntax 
  1974.  
  1975.  
  1976. ΓòÉΓòÉΓòÉ 4.1.42. DO_ARRAY ΓòÉΓòÉΓòÉ
  1977.  
  1978. Choose: 
  1979.  
  1980. o Syntax 
  1981. o Definition 
  1982. o E Language Syntax 
  1983.  
  1984.  
  1985. ΓòÉΓòÉΓòÉ 4.1.43. DO_OVERLAYWINDOWS ΓòÉΓòÉΓòÉ
  1986.  
  1987. Choose: 
  1988.  
  1989. o Syntax 
  1990. o Definition 
  1991. o E Language Syntax 
  1992.  
  1993.  
  1994. ΓòÉΓòÉΓòÉ 4.1.44. DOWN ΓòÉΓòÉΓòÉ
  1995.  
  1996. Choose: 
  1997.  
  1998. o Syntax 
  1999. o Definition 
  2000. o E Language Syntax 
  2001.  
  2002.  
  2003. ΓòÉΓòÉΓòÉ 4.1.45. DYNAFREE(library_name) ΓòÉΓòÉΓòÉ
  2004.  
  2005. Choose: 
  2006.  
  2007. o Syntax 
  2008. o Definition 
  2009. o E Language Syntax 
  2010.  
  2011.  
  2012. ΓòÉΓòÉΓòÉ 4.1.46. DYNALINK(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  2013.  
  2014. Choose: 
  2015.  
  2016. o Syntax 
  2017. o Definition 
  2018. o Example 
  2019. o E Language Syntax 
  2020.  
  2021.  
  2022. ΓòÉΓòÉΓòÉ 4.1.47. DYNALINKC(library_name, function_name, parameter_stack, [number_of_return_words]) ΓòÉΓòÉΓòÉ
  2023.  
  2024. Choose: 
  2025.  
  2026. o Syntax 
  2027. o Definition 
  2028. o E Language Syntax 
  2029.  
  2030.  
  2031. ΓòÉΓòÉΓòÉ 4.1.48. ECHO( 'on'|'off' ) ΓòÉΓòÉΓòÉ
  2032.  
  2033. Choose: 
  2034.  
  2035. o Syntax 
  2036. o Definition 
  2037. o E Language Syntax 
  2038.  
  2039.  
  2040. ΓòÉΓòÉΓòÉ 4.1.49. ENDLINE ΓòÉΓòÉΓòÉ
  2041.  
  2042. Choose: 
  2043.  
  2044. o Syntax 
  2045. o Definition 
  2046. o E Language Syntax 
  2047.  
  2048.  
  2049. ΓòÉΓòÉΓòÉ 4.1.50. ERASEENDLINE ΓòÉΓòÉΓòÉ
  2050.  
  2051. Choose: 
  2052.  
  2053. o Syntax 
  2054. o Definition 
  2055. o E Language Syntax 
  2056.  
  2057.  
  2058. ΓòÉΓòÉΓòÉ 4.1.51. EXECUTE ΓòÉΓòÉΓòÉ
  2059.  
  2060. Choose: 
  2061.  
  2062. o Syntax 
  2063. o Definition 
  2064. o E Language Syntax 
  2065.  
  2066.  
  2067. ΓòÉΓòÉΓòÉ 4.1.52. EXECUTEKEY key ΓòÉΓòÉΓòÉ
  2068.  
  2069. Choose: 
  2070.  
  2071. o Syntax 
  2072. o Definition 
  2073. o E Language Syntax 
  2074.  
  2075.  
  2076. ΓòÉΓòÉΓòÉ 4.1.53. EXIT ΓòÉΓòÉΓòÉ
  2077.  
  2078. Choose: 
  2079.  
  2080. o Syntax 
  2081. o Definition 
  2082. o E Language Syntax 
  2083.  
  2084.  
  2085. ΓòÉΓòÉΓòÉ 4.1.54. FILESINRING( [number] ) ΓòÉΓòÉΓòÉ
  2086.  
  2087. Choose: 
  2088.  
  2089. o Syntax 
  2090. o Definition 
  2091. o E Language Syntax 
  2092.  
  2093.  
  2094. ΓòÉΓòÉΓòÉ 4.1.55. FILESIZE() ΓòÉΓòÉΓòÉ
  2095.  
  2096. Choose: 
  2097.  
  2098. o Syntax 
  2099. o Definition 
  2100. o E Language Syntax 
  2101.  
  2102.  
  2103. ΓòÉΓòÉΓòÉ 4.1.56. FILLMARK [character] ΓòÉΓòÉΓòÉ
  2104.  
  2105. Choose: 
  2106.  
  2107. o Syntax 
  2108. o Definition 
  2109. o E Language Syntax 
  2110.  
  2111.  
  2112. ΓòÉΓòÉΓòÉ 4.1.57. FINDFILE  destfilename, filename [,environment_path_variable, ('P'|'D') ] ΓòÉΓòÉΓòÉ
  2113.  
  2114. Choose: 
  2115.  
  2116. o Syntax 
  2117. o Definition 
  2118. o Example 
  2119. o E Language Syntax 
  2120.  
  2121.  
  2122. ΓòÉΓòÉΓòÉ 4.1.58. FOR ΓòÉΓòÉΓòÉ
  2123.  
  2124. Choose: 
  2125.  
  2126. o Syntax 
  2127. o Definition 
  2128. o E Language Syntax 
  2129.  
  2130.  
  2131. ΓòÉΓòÉΓòÉ 4.1.59. GETFILEID ΓòÉΓòÉΓòÉ
  2132.  
  2133. Choose: 
  2134.  
  2135. o Syntax 
  2136. o Definition 
  2137. o E Language Syntax 
  2138.  
  2139.  
  2140. ΓòÉΓòÉΓòÉ 4.1.60. GETKEYSTATE( virtual_key_code ) ΓòÉΓòÉΓòÉ
  2141.  
  2142. Choose: 
  2143.  
  2144. o Syntax 
  2145. o Definition 
  2146. o E Language Syntax 
  2147.  
  2148.  
  2149. ΓòÉΓòÉΓòÉ 4.1.61. GETLINE  var line [, line_number  [, var fileid] ] ΓòÉΓòÉΓòÉ
  2150.  
  2151. Choose: 
  2152.  
  2153. o Syntax 
  2154. o Definition 
  2155. o Example 
  2156. o E Language Syntax 
  2157.  
  2158.  
  2159. ΓòÉΓòÉΓòÉ 4.1.62. GETMARK var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  2160.  
  2161. Choose: 
  2162.  
  2163. o Syntax 
  2164. o Definition 
  2165. o Example 
  2166. o E Language Syntax 
  2167.  
  2168.  
  2169. ΓòÉΓòÉΓòÉ 4.1.63. GETMARKG var first_line_num,var last_line_num [,var first_col [,var last_col [, var fileid] ] ] ΓòÉΓòÉΓòÉ
  2170.  
  2171. Choose: 
  2172.  
  2173. o Syntax 
  2174. o Definition 
  2175. o E Language Syntax 
  2176.  
  2177.  
  2178. ΓòÉΓòÉΓòÉ 4.1.64. GETPMINFO (function ) ΓòÉΓòÉΓòÉ
  2179.  
  2180. Choose: 
  2181.  
  2182. o Syntax 
  2183. o Definition 
  2184. o E Language Syntax 
  2185.  
  2186.  
  2187. ΓòÉΓòÉΓòÉ 4.1.65. GETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  2188.  
  2189. Choose: 
  2190.  
  2191. o Syntax 
  2192. o Definition 
  2193. o E Language Syntax 
  2194.  
  2195.  
  2196. ΓòÉΓòÉΓòÉ 4.1.66. HEX( character ) ΓòÉΓòÉΓòÉ
  2197.  
  2198. Choose: 
  2199.  
  2200. o Syntax 
  2201. o Definition 
  2202. o Example 
  2203. o E Language Syntax 
  2204.  
  2205.  
  2206. ΓòÉΓòÉΓòÉ 4.1.67. IF - THEN - ELSE ΓòÉΓòÉΓòÉ
  2207.  
  2208. Choose: 
  2209.  
  2210. o Syntax 
  2211. o Definition 
  2212. o E Language Syntax 
  2213.  
  2214.  
  2215. ΓòÉΓòÉΓòÉ 4.1.68. INCLUDE ΓòÉΓòÉΓòÉ
  2216.  
  2217. Choose: 
  2218.  
  2219. o Syntax 
  2220. o Definition 
  2221. o E Language Syntax 
  2222.  
  2223.  
  2224. ΓòÉΓòÉΓòÉ 4.1.69. INSERT ΓòÉΓòÉΓòÉ
  2225.  
  2226. Choose: 
  2227.  
  2228. o Syntax 
  2229. o Definition 
  2230. o E Language Syntax 
  2231.  
  2232.  
  2233. ΓòÉΓòÉΓòÉ 4.1.70. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] ΓòÉΓòÉΓòÉ
  2234.  
  2235. Choose: 
  2236.  
  2237. o Syntax 
  2238. o Definition 
  2239. o Example 
  2240. o E Language Syntax 
  2241.  
  2242.  
  2243. ΓòÉΓòÉΓòÉ 4.1.71. INSERTLINE new_line [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  2244.  
  2245. Choose: 
  2246.  
  2247. o Syntax 
  2248. o Definition 
  2249. o Example 
  2250. o E Language Syntax 
  2251.  
  2252.  
  2253. ΓòÉΓòÉΓòÉ 4.1.72. INSERTSTATE() ΓòÉΓòÉΓòÉ
  2254.  
  2255. Choose: 
  2256.  
  2257. o Syntax 
  2258. o Definition 
  2259. o E Language Syntax 
  2260.  
  2261.  
  2262. ΓòÉΓòÉΓòÉ 4.1.73. INSERTSTR(new, target [, n [, length [, pad ]]]) ΓòÉΓòÉΓòÉ
  2263.  
  2264. Choose: 
  2265.  
  2266. o Syntax 
  2267. o Definition 
  2268. o E Language Syntax 
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ 4.1.74. INSERTTOGGLE ΓòÉΓòÉΓòÉ
  2272.  
  2273. Choose: 
  2274.  
  2275. o Syntax 
  2276. o Definition 
  2277. o E Language Syntax 
  2278.  
  2279.  
  2280. ΓòÉΓòÉΓòÉ 4.1.75. ISADIRTYLINE ΓòÉΓòÉΓòÉ
  2281.  
  2282. Choose: 
  2283.  
  2284. o Syntax 
  2285. o Definition 
  2286. o E Language Syntax 
  2287.  
  2288.  
  2289. ΓòÉΓòÉΓòÉ 4.1.76. ITERATE ΓòÉΓòÉΓòÉ
  2290.  
  2291. Choose: 
  2292.  
  2293. o Syntax 
  2294. o Definition 
  2295. o E Language Syntax 
  2296.  
  2297.  
  2298. ΓòÉΓòÉΓòÉ 4.1.77. ITOA(variable, radix) ΓòÉΓòÉΓòÉ
  2299.  
  2300. Choose: 
  2301.  
  2302. o Syntax 
  2303. o Definition 
  2304. o E Language Syntax 
  2305.  
  2306.  
  2307. ΓòÉΓòÉΓòÉ 4.1.78. JOIN ΓòÉΓòÉΓòÉ
  2308.  
  2309. Choose: 
  2310.  
  2311. o Syntax 
  2312. o Definition 
  2313. o E Language Syntax 
  2314.  
  2315.  
  2316. ΓòÉΓòÉΓòÉ 4.1.79. KEYIN expression ΓòÉΓòÉΓòÉ
  2317.  
  2318. Choose: 
  2319.  
  2320. o Syntax 
  2321. o Definition 
  2322. o Example 
  2323. o E Language Syntax 
  2324.  
  2325.  
  2326. ΓòÉΓòÉΓòÉ 4.1.80. KEYS name ΓòÉΓòÉΓòÉ
  2327.  
  2328. Choose: 
  2329.  
  2330. o Syntax 
  2331. o Definition 
  2332. o Example 
  2333. o E Language Syntax 
  2334.  
  2335.  
  2336. ΓòÉΓòÉΓòÉ 4.1.81. LASTERROR() ΓòÉΓòÉΓòÉ
  2337.  
  2338. Choose: 
  2339.  
  2340. o Syntax 
  2341. o Definition 
  2342. o Example 
  2343. o E Language Syntax 
  2344.  
  2345.  
  2346. ΓòÉΓòÉΓòÉ 4.1.82. LASTKEY([key_number]) ΓòÉΓòÉΓòÉ
  2347.  
  2348. Choose: 
  2349.  
  2350. o Syntax 
  2351. o Definition 
  2352. o Example 
  2353. o E Language Syntax 
  2354.  
  2355.  
  2356. ΓòÉΓòÉΓòÉ 4.1.83. LASTPOS (needle, haystack [,startpos]) ΓòÉΓòÉΓòÉ
  2357.  
  2358. Choose: 
  2359.  
  2360. o Syntax 
  2361. o Definition 
  2362. o Example 
  2363. o E Language Syntax 
  2364.  
  2365.  
  2366. ΓòÉΓòÉΓòÉ 4.1.84. LEAVE ΓòÉΓòÉΓòÉ
  2367.  
  2368. Choose: 
  2369.  
  2370. o Syntax 
  2371. o Definition 
  2372. o E Language Syntax 
  2373.  
  2374.  
  2375. ΓòÉΓòÉΓòÉ 4.1.85. LEFT ΓòÉΓòÉΓòÉ
  2376.  
  2377. Choose: 
  2378.  
  2379. o Syntax 
  2380. o Definition 
  2381. o E Language Syntax 
  2382.  
  2383.  
  2384. ΓòÉΓòÉΓòÉ 4.1.86. LEFTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2385.  
  2386. Choose: 
  2387.  
  2388. o Syntax 
  2389. o Definition 
  2390. o Example 
  2391. o E Language Syntax 
  2392.  
  2393.  
  2394. ΓòÉΓòÉΓòÉ 4.1.87. LENGTH(expression) ΓòÉΓòÉΓòÉ
  2395.  
  2396. Choose: 
  2397.  
  2398. o Syntax 
  2399. o Definition 
  2400. o Example 
  2401. o E Language Syntax 
  2402.  
  2403.  
  2404. ΓòÉΓòÉΓòÉ 4.1.88. LEXAM( functionname ) ΓòÉΓòÉΓòÉ
  2405.  
  2406. Choose: 
  2407.  
  2408. o Syntax 
  2409. o Definition 
  2410. o E Language Syntax 
  2411.  
  2412.  
  2413. ΓòÉΓòÉΓòÉ 4.1.89. LINK ΓòÉΓòÉΓòÉ
  2414.  
  2415. Choose: 
  2416.  
  2417. o Syntax 
  2418. o Definition 
  2419. o E Language Syntax 
  2420.  
  2421.  
  2422. ΓòÉΓòÉΓòÉ 4.1.90. LINKED ΓòÉΓòÉΓòÉ
  2423.  
  2424. Choose: 
  2425.  
  2426. o Syntax 
  2427. o Definition 
  2428. o Example 
  2429. o E Language Syntax 
  2430.  
  2431.  
  2432. ΓòÉΓòÉΓòÉ 4.1.91. LONGESTLINE ΓòÉΓòÉΓòÉ
  2433.  
  2434. Choose: 
  2435.  
  2436. o Syntax 
  2437. o Definition 
  2438. o E Language Syntax 
  2439.  
  2440.  
  2441. ΓòÉΓòÉΓòÉ 4.1.92. LOOP ΓòÉΓòÉΓòÉ
  2442.  
  2443. Choose: 
  2444.  
  2445. o Syntax 
  2446. o Definition 
  2447. o E Language Syntax 
  2448.  
  2449.  
  2450. ΓòÉΓòÉΓòÉ 4.1.93. LOWCASE(expression) ΓòÉΓòÉΓòÉ
  2451.  
  2452. Choose: 
  2453.  
  2454. o Syntax 
  2455. o Definition 
  2456. o E Language Syntax 
  2457.  
  2458.  
  2459. ΓòÉΓòÉΓòÉ 4.1.94. LTOA(variable, radix) ΓòÉΓòÉΓòÉ
  2460.  
  2461. Choose: 
  2462.  
  2463. o Syntax 
  2464. o Definition 
  2465. o E Language Syntax 
  2466.  
  2467.  
  2468. ΓòÉΓòÉΓòÉ 4.1.95. MACHINE() ΓòÉΓòÉΓòÉ
  2469.  
  2470. Choose: 
  2471.  
  2472. o Syntax 
  2473. o Definition 
  2474. o E Language Syntax 
  2475.  
  2476.  
  2477. ΓòÉΓòÉΓòÉ 4.1.96. MAP_POINT ΓòÉΓòÉΓòÉ
  2478.  
  2479. Choose: 
  2480.  
  2481. o Syntax 
  2482. o Definition 
  2483. o E Language Syntax 
  2484.  
  2485.  
  2486. ΓòÉΓòÉΓòÉ 4.1.97. MARKBLOCK ΓòÉΓòÉΓòÉ
  2487.  
  2488. Choose: 
  2489.  
  2490. o Syntax 
  2491. o Definition 
  2492. o E Language Syntax 
  2493.  
  2494.  
  2495. ΓòÉΓòÉΓòÉ 4.1.98. MARKBLOCKG ΓòÉΓòÉΓòÉ
  2496.  
  2497. Choose: 
  2498.  
  2499. o Syntax 
  2500. o Definition 
  2501. o E Language Syntax 
  2502.  
  2503.  
  2504. ΓòÉΓòÉΓòÉ 4.1.99. MARKCHAR ΓòÉΓòÉΓòÉ
  2505.  
  2506. Choose: 
  2507.  
  2508. o Syntax 
  2509. o Definition 
  2510. o E Language Syntax 
  2511.  
  2512.  
  2513. ΓòÉΓòÉΓòÉ 4.1.100. MARKCHARG ΓòÉΓòÉΓòÉ
  2514.  
  2515. Choose: 
  2516.  
  2517. o Syntax 
  2518. o Definition 
  2519. o E Language Syntax 
  2520.  
  2521.  
  2522. ΓòÉΓòÉΓòÉ 4.1.101. MARKLINE ΓòÉΓòÉΓòÉ
  2523.  
  2524. Choose: 
  2525.  
  2526. o Syntax 
  2527. o Definition 
  2528. o E Language Syntax 
  2529.  
  2530.  
  2531. ΓòÉΓòÉΓòÉ 4.1.102. MARKLINEG ΓòÉΓòÉΓòÉ
  2532.  
  2533. Choose: 
  2534.  
  2535. o Syntax 
  2536. o Definition 
  2537. o E Language Syntax 
  2538.  
  2539.  
  2540. ΓòÉΓòÉΓòÉ 4.1.103. MARKTYPE() ΓòÉΓòÉΓòÉ
  2541.  
  2542. Choose: 
  2543.  
  2544. o Syntax 
  2545. o Definition 
  2546. o E Language Syntax 
  2547.  
  2548.  
  2549. ΓòÉΓòÉΓòÉ 4.1.104. MEMCPYX(destination, source, length) ΓòÉΓòÉΓòÉ
  2550.  
  2551. Choose: 
  2552.  
  2553. o Syntax 
  2554. o Definition 
  2555. o E Language Syntax 
  2556.  
  2557.  
  2558. ΓòÉΓòÉΓòÉ 4.1.105. MOUSE_SETPOINTER type ΓòÉΓòÉΓòÉ
  2559.  
  2560. Choose: 
  2561.  
  2562. o Syntax 
  2563. o Definition 
  2564. o E Language Syntax 
  2565.  
  2566.  
  2567. ΓòÉΓòÉΓòÉ 4.1.106. MOVEMARK ΓòÉΓòÉΓòÉ
  2568.  
  2569. Choose: 
  2570.  
  2571. o Syntax 
  2572. o Definition 
  2573. o E Language Syntax 
  2574.  
  2575.  
  2576. ΓòÉΓòÉΓòÉ 4.1.107. NEXTFILE ΓòÉΓòÉΓòÉ
  2577.  
  2578. Choose: 
  2579.  
  2580. o Syntax 
  2581. o Definition 
  2582. o E Language Syntax 
  2583.  
  2584.  
  2585. ΓòÉΓòÉΓòÉ 4.1.108. OFFSET(variable) ΓòÉΓòÉΓòÉ
  2586.  
  2587. Choose: 
  2588.  
  2589. o Syntax 
  2590. o Definition 
  2591. o E Language Syntax 
  2592.  
  2593.  
  2594. ΓòÉΓòÉΓòÉ 4.1.109. OFS(variable) ΓòÉΓòÉΓòÉ
  2595.  
  2596. Choose: 
  2597.  
  2598. o Syntax 
  2599. o Definition 
  2600. o E Language Syntax 
  2601.  
  2602.  
  2603. ΓòÉΓòÉΓòÉ 4.1.110. OVERLAY(new, target[, n [, k [,pad] ] ]) ΓòÉΓòÉΓòÉ
  2604.  
  2605. Choose: 
  2606.  
  2607. o Syntax 
  2608. o Definition 
  2609. o Example 
  2610. o E Language Syntax 
  2611.  
  2612.  
  2613. ΓòÉΓòÉΓòÉ 4.1.111. OVERLAYBLOCK ΓòÉΓòÉΓòÉ
  2614.  
  2615. Choose: 
  2616.  
  2617. o Syntax 
  2618. o Definition 
  2619. o E Language Syntax 
  2620.  
  2621.  
  2622. ΓòÉΓòÉΓòÉ 4.1.112. PAGEDOWN ΓòÉΓòÉΓòÉ
  2623.  
  2624. Choose: 
  2625.  
  2626. o Syntax 
  2627. o Definition 
  2628. o E Language Syntax 
  2629.  
  2630.  
  2631. ΓòÉΓòÉΓòÉ 4.1.113. PAGEUP ΓòÉΓòÉΓòÉ
  2632.  
  2633. Choose: 
  2634.  
  2635. o Syntax 
  2636. o Definition 
  2637. o E Language Syntax 
  2638.  
  2639.  
  2640. ΓòÉΓòÉΓòÉ 4.1.114. PARSE ΓòÉΓòÉΓòÉ
  2641.  
  2642. Choose: 
  2643.  
  2644. o Syntax 
  2645. o Definition 
  2646. o E Language Syntax 
  2647.  
  2648.  
  2649. ΓòÉΓòÉΓòÉ 4.1.115. PEEK(segment, offset, count) ΓòÉΓòÉΓòÉ
  2650.  
  2651. Choose: 
  2652.  
  2653. o Syntax 
  2654. o Definition 
  2655. o Example 
  2656. o E Language Syntax 
  2657.  
  2658.  
  2659. ΓòÉΓòÉΓòÉ 4.1.116. PEEKZ(segment, offset) ΓòÉΓòÉΓòÉ
  2660.  
  2661. Choose: 
  2662.  
  2663. o Syntax 
  2664. o Definition 
  2665. o Example 
  2666. o E Language Syntax 
  2667.  
  2668.  
  2669. ΓòÉΓòÉΓòÉ 4.1.117. POKE segment, offset, string ΓòÉΓòÉΓòÉ
  2670.  
  2671. Choose: 
  2672.  
  2673. o Syntax 
  2674. o Definition 
  2675. o Example 
  2676. o E Language Syntax 
  2677.  
  2678.  
  2679. ΓòÉΓòÉΓòÉ 4.1.118. POS needle,haystack[,start] ΓòÉΓòÉΓòÉ
  2680.  
  2681. Choose: 
  2682.  
  2683. o Syntax 
  2684. o Definition 
  2685. o Example 
  2686. o E Language Syntax 
  2687.  
  2688.  
  2689. ΓòÉΓòÉΓòÉ 4.1.119. PREVFILE ΓòÉΓòÉΓòÉ
  2690.  
  2691. Choose: 
  2692.  
  2693. o Syntax 
  2694. o Definition 
  2695. o E Language Syntax 
  2696.  
  2697.  
  2698. ΓòÉΓòÉΓòÉ 4.1.120. QPRINT ΓòÉΓòÉΓòÉ
  2699.  
  2700. Choose: 
  2701.  
  2702. o Syntax 
  2703. o Definition 
  2704. o E Language Syntax 
  2705.  
  2706.  
  2707. ΓòÉΓòÉΓòÉ 4.1.121. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  2708.  
  2709. Choose: 
  2710.  
  2711. o Syntax 
  2712. o Definition 
  2713. o Example 
  2714. o E Language Syntax 
  2715.  
  2716. See also: 
  2717.  
  2718. o Building Accelerator Tables from the Macro Language 
  2719. o QUERYACCELSTRING 
  2720. o BUILDACCELTABLE 
  2721. o DELETEACCEL 
  2722.  
  2723.  
  2724. ΓòÉΓòÉΓòÉ 4.1.122. QUERY_ATTRIBUTE var class, var value, var ispush, offset, column, line [, fileid] ΓòÉΓòÉΓòÉ
  2725.  
  2726. Choose: 
  2727.  
  2728. o Syntax 
  2729. o Definition 
  2730. o E Language Syntax 
  2731.  
  2732.  
  2733. ΓòÉΓòÉΓòÉ 4.1.123. QUERYFONT ΓòÉΓòÉΓòÉ
  2734.  
  2735. Choose: 
  2736.  
  2737. o Syntax 
  2738. o Definition 
  2739. o E Language Syntax 
  2740.  
  2741.  
  2742. ΓòÉΓòÉΓòÉ 4.1.124. QUERYMENUSTRING(menuname, id) ΓòÉΓòÉΓòÉ
  2743.  
  2744. Choose: 
  2745.  
  2746. o Syntax 
  2747. o Definition 
  2748. o E Language Syntax 
  2749.  
  2750.  
  2751. ΓòÉΓòÉΓòÉ 4.1.125. QUERYPROFILE(application, key_name) ΓòÉΓòÉΓòÉ
  2752.  
  2753. Choose: 
  2754.  
  2755. o Syntax 
  2756. o Definition 
  2757. o E Language Syntax 
  2758.  
  2759.  
  2760. ΓòÉΓòÉΓòÉ 4.1.126. QUIETSHELL  string_expression ΓòÉΓòÉΓòÉ
  2761.  
  2762. Choose: 
  2763.  
  2764. o Syntax 
  2765. o Definition 
  2766. o Example 
  2767. o E Language Syntax 
  2768.  
  2769.  
  2770. ΓòÉΓòÉΓòÉ 4.1.127. REFLOW ΓòÉΓòÉΓòÉ
  2771.  
  2772. Choose: 
  2773.  
  2774. o Syntax 
  2775. o Definition 
  2776. o E Language Syntax 
  2777.  
  2778.  
  2779. ΓòÉΓòÉΓòÉ 4.1.128. REFRESH ΓòÉΓòÉΓòÉ
  2780.  
  2781. Choose: 
  2782.  
  2783. o Syntax 
  2784. o Definition 
  2785. o E Language Syntax 
  2786.  
  2787.  
  2788. ΓòÉΓòÉΓòÉ 4.1.129. REGISTERFONT ΓòÉΓòÉΓòÉ
  2789.  
  2790. Choose: 
  2791.  
  2792. o Syntax 
  2793. o Definition 
  2794. o Example 
  2795. o E Language Syntax 
  2796.  
  2797.  
  2798. ΓòÉΓòÉΓòÉ 4.1.130. RELINK ΓòÉΓòÉΓòÉ
  2799.  
  2800. Choose: 
  2801.  
  2802. o Syntax 
  2803. o Definition 
  2804. o E Language Syntax 
  2805.  
  2806.  
  2807. ΓòÉΓòÉΓòÉ 4.1.131. REPEATFIND ΓòÉΓòÉΓòÉ
  2808.  
  2809. Choose: 
  2810.  
  2811. o Syntax 
  2812. o Definition 
  2813. o E Language Syntax 
  2814.  
  2815.  
  2816. ΓòÉΓòÉΓòÉ 4.1.132. REPLACELINE new_line  [ ,line_number  [,var fileid] ] ΓòÉΓòÉΓòÉ
  2817.  
  2818. Choose: 
  2819.  
  2820. o Syntax 
  2821. o Definition 
  2822. o Example 
  2823. o E Language Syntax 
  2824.  
  2825.  
  2826. ΓòÉΓòÉΓòÉ 4.1.133. RETURN [expression] ΓòÉΓòÉΓòÉ
  2827.  
  2828. Choose: 
  2829.  
  2830. o Syntax 
  2831. o Definition 
  2832. o E Language Syntax 
  2833.  
  2834.  
  2835. ΓòÉΓòÉΓòÉ 4.1.134. REVERSE(string) ΓòÉΓòÉΓòÉ
  2836.  
  2837. Choose: 
  2838.  
  2839. o Syntax 
  2840. o Definition 
  2841. o Example 
  2842. o E Language Syntax 
  2843.  
  2844.  
  2845. ΓòÉΓòÉΓòÉ 4.1.135. RIGHT ΓòÉΓòÉΓòÉ
  2846.  
  2847. Choose: 
  2848.  
  2849. o Syntax 
  2850. o Definition 
  2851. o E Language Syntax 
  2852.  
  2853.  
  2854. ΓòÉΓòÉΓòÉ 4.1.136. RIGHTSTR(string, length [, pad] ) ΓòÉΓòÉΓòÉ
  2855.  
  2856. Choose: 
  2857.  
  2858. o Syntax 
  2859. o Definition 
  2860. o Example 
  2861. o E Language Syntax 
  2862.  
  2863.  
  2864. ΓòÉΓòÉΓòÉ 4.1.137. RUBOUT ΓòÉΓòÉΓòÉ
  2865.  
  2866. Choose: 
  2867.  
  2868. o Syntax 
  2869. o Definition 
  2870. o E Language Syntax 
  2871.  
  2872.  
  2873. ΓòÉΓòÉΓòÉ 4.1.138. SAYAT string, row, column, attribute [,length][,window] ΓòÉΓòÉΓòÉ
  2874.  
  2875. Choose: 
  2876.  
  2877. o Syntax 
  2878. o Definition 
  2879. o Example 
  2880. o E Language Syntax 
  2881.  
  2882.  
  2883. ΓòÉΓòÉΓòÉ 4.1.139. SAYERROR expression ΓòÉΓòÉΓòÉ
  2884.  
  2885. Choose: 
  2886.  
  2887. o Syntax 
  2888. o Definition 
  2889. o Example 
  2890. o E Language Syntax 
  2891.  
  2892.  
  2893. ΓòÉΓòÉΓòÉ 4.1.140. SAYERROR(error_string) ΓòÉΓòÉΓòÉ
  2894.  
  2895. Choose: 
  2896.  
  2897. o Syntax 
  2898. o Definition 
  2899. o Example 
  2900. o E Language Syntax 
  2901.  
  2902.  
  2903. ΓòÉΓòÉΓòÉ 4.1.141. SAYERRORTEXT(rc) ΓòÉΓòÉΓòÉ
  2904.  
  2905. Choose: 
  2906.  
  2907. o Syntax 
  2908. o Definition 
  2909. o E Language Syntax 
  2910.  
  2911.  
  2912. ΓòÉΓòÉΓòÉ 4.1.142. SCREENHEIGHT() ΓòÉΓòÉΓòÉ
  2913.  
  2914. Choose: 
  2915.  
  2916. o Syntax 
  2917. o Definition 
  2918. o E Language Syntax 
  2919.  
  2920.  
  2921. ΓòÉΓòÉΓòÉ 4.1.143. SCREENWIDTH() ΓòÉΓòÉΓòÉ
  2922.  
  2923. Choose: 
  2924.  
  2925. o Syntax 
  2926. o Definition 
  2927. o E Language Syntax 
  2928.  
  2929.  
  2930. ΓòÉΓòÉΓòÉ 4.1.144. SEG(variable) ΓòÉΓòÉΓòÉ
  2931.  
  2932. Choose: 
  2933.  
  2934. o Syntax 
  2935. o Definition 
  2936. o Example 
  2937. o E Language Syntax 
  2938.  
  2939.  
  2940. ΓòÉΓòÉΓòÉ 4.1.145. SELECTOR(variable) ΓòÉΓòÉΓòÉ
  2941.  
  2942. Choose: 
  2943.  
  2944. o Syntax 
  2945. o Definition 
  2946. o E Language Syntax 
  2947.  
  2948.  
  2949. ΓòÉΓòÉΓòÉ 4.1.146. SETMARK ΓòÉΓòÉΓòÉ
  2950.  
  2951. Choose: 
  2952.  
  2953. o Syntax 
  2954. o Definition 
  2955. o E Language Syntax 
  2956.  
  2957.  
  2958. ΓòÉΓòÉΓòÉ 4.1.147. SETPROFILE(application, key_name, data) ΓòÉΓòÉΓòÉ
  2959.  
  2960. Choose: 
  2961.  
  2962. o Syntax 
  2963. o Definition 
  2964. o E Language Syntax 
  2965.  
  2966.  
  2967. ΓòÉΓòÉΓòÉ 4.1.148. SETSEARCH var search_cmd ΓòÉΓòÉΓòÉ
  2968.  
  2969. Choose: 
  2970.  
  2971. o Syntax 
  2972. o Definition 
  2973. o Example 
  2974. o E Language Syntax 
  2975.  
  2976.  
  2977. ΓòÉΓòÉΓòÉ 4.1.149. SHIFTLEFT ΓòÉΓòÉΓòÉ
  2978.  
  2979. Choose: 
  2980.  
  2981. o Syntax 
  2982. o Definition 
  2983. o E Language Syntax 
  2984.  
  2985.  
  2986. ΓòÉΓòÉΓòÉ 4.1.150. SHIFTRIGHT ΓòÉΓòÉΓòÉ
  2987.  
  2988. Choose: 
  2989.  
  2990. o Syntax 
  2991. o Definition 
  2992. o E Language Syntax 
  2993.  
  2994.  
  2995. ΓòÉΓòÉΓòÉ 4.1.151. SHOWMENU ΓòÉΓòÉΓòÉ
  2996.  
  2997. Choose: 
  2998.  
  2999. o Syntax 
  3000. o Definition 
  3001. o E Language Syntax 
  3002.  
  3003.  
  3004. ΓòÉΓòÉΓòÉ 4.1.152. SPLIT ΓòÉΓòÉΓòÉ
  3005.  
  3006. Choose: 
  3007.  
  3008. o Syntax 
  3009. o Definition 
  3010. o E Language Syntax 
  3011.  
  3012.  
  3013. ΓòÉΓòÉΓòÉ 4.1.153. STOP ΓòÉΓòÉΓòÉ
  3014.  
  3015. Choose: 
  3016.  
  3017. o Syntax 
  3018. o Definition 
  3019. o E Language Syntax 
  3020.  
  3021.  
  3022. ΓòÉΓòÉΓòÉ 4.1.154. STOPONRC ΓòÉΓòÉΓòÉ
  3023.  
  3024. Choose: 
  3025.  
  3026. o Syntax 
  3027. o Definition 
  3028. o E Language Syntax 
  3029.  
  3030.  
  3031. ΓòÉΓòÉΓòÉ 4.1.155. STRIP(string [,option] [,char]) ΓòÉΓòÉΓòÉ
  3032.  
  3033. Choose: 
  3034.  
  3035. o Syntax 
  3036. o Definition 
  3037. o Example 
  3038. o E Language Syntax 
  3039.  
  3040.  
  3041. ΓòÉΓòÉΓòÉ 4.1.156. SUBSTR(string,n [,k [,pad] ]) ΓòÉΓòÉΓòÉ
  3042.  
  3043. Choose: 
  3044.  
  3045. o Syntax 
  3046. o Definition 
  3047. o Example 
  3048. o E Language Syntax 
  3049.  
  3050.  
  3051. ΓòÉΓòÉΓòÉ 4.1.157. SUBWORD(string, n [, length] ) ΓòÉΓòÉΓòÉ
  3052.  
  3053. Choose: 
  3054.  
  3055. o Syntax 
  3056. o Definition 
  3057. o Example 
  3058. o E Language Syntax 
  3059.  
  3060.  
  3061. ΓòÉΓòÉΓòÉ 4.1.158. TAB ΓòÉΓòÉΓòÉ
  3062.  
  3063. Choose: 
  3064.  
  3065. o Syntax 
  3066. o Definition 
  3067. o E Language Syntax 
  3068.  
  3069.  
  3070. ΓòÉΓòÉΓòÉ 4.1.159. TABWORD ΓòÉΓòÉΓòÉ
  3071.  
  3072. Choose: 
  3073.  
  3074. o Syntax 
  3075. o Definition 
  3076. o E Language Syntax 
  3077.  
  3078.  
  3079. ΓòÉΓòÉΓòÉ 4.1.160. TEXTLINE(line_num) ΓòÉΓòÉΓòÉ
  3080.  
  3081. Choose: 
  3082.  
  3083. o Syntax 
  3084. o Definition 
  3085. o E Language Syntax 
  3086.  
  3087.  
  3088. ΓòÉΓòÉΓòÉ 4.1.161. TOP ΓòÉΓòÉΓòÉ
  3089.  
  3090. Choose: 
  3091.  
  3092. o Syntax 
  3093. o Definition 
  3094. o E Language Syntax 
  3095.  
  3096.  
  3097. ΓòÉΓòÉΓòÉ 4.1.162. TRANSLATE(string [, tableo [, tablei [ pad ]]] ) ΓòÉΓòÉΓòÉ
  3098.  
  3099. Choose: 
  3100.  
  3101. o Syntax 
  3102. o Definition 
  3103. o Example 
  3104. o E Language Syntax 
  3105.  
  3106.  
  3107. ΓòÉΓòÉΓòÉ 4.1.163. TRYINCLUDE filename ΓòÉΓòÉΓòÉ
  3108.  
  3109. Choose: 
  3110.  
  3111. o Syntax 
  3112. o Definition 
  3113. o E Language Syntax 
  3114.  
  3115.  
  3116. ΓòÉΓòÉΓòÉ 4.1.164. UNDO ΓòÉΓòÉΓòÉ
  3117.  
  3118. Choose: 
  3119.  
  3120. o Syntax 
  3121. o Definition 
  3122. o E Language Syntax 
  3123.  
  3124.  
  3125. ΓòÉΓòÉΓòÉ 4.1.165. UNDOACTION ΓòÉΓòÉΓòÉ
  3126.  
  3127. Choose: 
  3128.  
  3129. o Syntax 
  3130. o Definition 
  3131. o E Language Syntax 
  3132.  
  3133.  
  3134. ΓòÉΓòÉΓòÉ 4.1.166. UNLINK ΓòÉΓòÉΓòÉ
  3135.  
  3136. Choose: 
  3137.  
  3138. o Syntax 
  3139. o Definition 
  3140. o E Language Syntax 
  3141.  
  3142.  
  3143. ΓòÉΓòÉΓòÉ 4.1.167. UNMARK ΓòÉΓòÉΓòÉ
  3144.  
  3145. Choose: 
  3146.  
  3147. o Syntax 
  3148. o Definition 
  3149. o E Language Syntax 
  3150.  
  3151.  
  3152. ΓòÉΓòÉΓòÉ 4.1.168. UP ΓòÉΓòÉΓòÉ
  3153.  
  3154. Choose: 
  3155.  
  3156. o Syntax 
  3157. o Definition 
  3158. o E Language Syntax 
  3159.  
  3160.  
  3161. ΓòÉΓòÉΓòÉ 4.1.169. UPCASE(expression) ΓòÉΓòÉΓòÉ
  3162.  
  3163. Choose: 
  3164.  
  3165. o Syntax 
  3166. o Definition 
  3167. o E Language Syntax 
  3168.  
  3169.  
  3170. ΓòÉΓòÉΓòÉ 4.1.170. VER([option]) ΓòÉΓòÉΓòÉ
  3171.  
  3172. Choose: 
  3173.  
  3174. o Syntax 
  3175. o Definition 
  3176. o E Language Syntax 
  3177.  
  3178.  
  3179. ΓòÉΓòÉΓòÉ 4.1.171. VERIFY(string, reference [,options [,start] ] ) ΓòÉΓòÉΓòÉ
  3180.  
  3181. Choose: 
  3182.  
  3183. o Syntax 
  3184. o Definition 
  3185. o Example 
  3186. o E Language Syntax 
  3187.  
  3188.  
  3189. ΓòÉΓòÉΓòÉ 4.1.172. WHILE ΓòÉΓòÉΓòÉ
  3190.  
  3191. Choose: 
  3192.  
  3193. o Syntax 
  3194. o Definition 
  3195. o E Language Syntax 
  3196.  
  3197.  
  3198. ΓòÉΓòÉΓòÉ 4.1.173. WINDOWMESSAGE ΓòÉΓòÉΓòÉ
  3199.  
  3200. Choose: 
  3201.  
  3202. o Syntax 
  3203. o Definition 
  3204. o Example 
  3205. o E Language Syntax 
  3206.  
  3207.  
  3208. ΓòÉΓòÉΓòÉ 4.1.174. WINMESSAGEBOX ΓòÉΓòÉΓòÉ
  3209.  
  3210. Choose: 
  3211.  
  3212. o Syntax 
  3213. o Definition 
  3214. o Example 
  3215. o E Language Syntax 
  3216.  
  3217.  
  3218. ΓòÉΓòÉΓòÉ 4.1.175. WORD(string, n) ΓòÉΓòÉΓòÉ
  3219.  
  3220. Choose: 
  3221.  
  3222. o Syntax 
  3223. o Definition 
  3224. o Example 
  3225. o E Language Syntax 
  3226.  
  3227.  
  3228. ΓòÉΓòÉΓòÉ 4.1.176. WORDINDEX(string, n) ΓòÉΓòÉΓòÉ
  3229.  
  3230. Choose: 
  3231.  
  3232. o Syntax 
  3233. o Definition 
  3234. o Example 
  3235. o E Language Syntax 
  3236.  
  3237.  
  3238. ΓòÉΓòÉΓòÉ 4.1.177. WORDLENGTH(string, n) ΓòÉΓòÉΓòÉ
  3239.  
  3240. Choose: 
  3241.  
  3242. o Syntax 
  3243. o Definition 
  3244. o Example 
  3245. o E Language Syntax 
  3246.  
  3247.  
  3248. ΓòÉΓòÉΓòÉ 4.1.178. WORDPOS(needle, haystack [, start] ) ΓòÉΓòÉΓòÉ
  3249.  
  3250. Choose: 
  3251.  
  3252. o Syntax 
  3253. o Definition 
  3254. o Example 
  3255. o E Language Syntax 
  3256.  
  3257.  
  3258. ΓòÉΓòÉΓòÉ 4.1.179. WORDS(string) ΓòÉΓòÉΓòÉ
  3259.  
  3260. Choose: 
  3261.  
  3262. o Syntax 
  3263. o Definition 
  3264. o Example 
  3265. o E Language Syntax 
  3266.  
  3267.  
  3268. ΓòÉΓòÉΓòÉ 4.2. Conditional and Loop Statements ΓòÉΓòÉΓòÉ
  3269.  
  3270. The IF statement is used to change the flow of statements depending upon some 
  3271. condition. As you can see, the syntax varies from that of REXX: 
  3272.  
  3273. IF 
  3274.                  Conditional execution 
  3275.  
  3276.                                     IF expression THEN
  3277.                                        statements
  3278.                                     {ELSEIF expression THEN
  3279.                                        statements}
  3280.                                      [ELSE
  3281.                                        statements]
  3282.                                     ENDIF
  3283.  
  3284.                  Note:  Any nonzero, non-null value for expression is regarded 
  3285.                  as TRUE.  The value zero is FALSE, and (as of version 3.07) a 
  3286.                  null value is FALSE. The null-value treatment is important 
  3287.                  because that's the default value returned by a DEFPROC.  If a 
  3288.                  DEFPROC simply "runs off the end" and does not have an 
  3289.                  explicit RETURN statement, ET automatically assigns a null 
  3290.                  return value.  For example: 
  3291.  
  3292.                                      defproc tinyproc=
  3293.                                         x = 1
  3294.                                         /* no return statement */
  3295.  
  3296.                                      defc test=
  3297.                                         myswitch = tinyproc()
  3298.                                         if myswitch then
  3299.                                            sayerror 'null is true'
  3300.                                         else
  3301.                                            sayerror 'null is false'
  3302.                                         endif
  3303.  
  3304.                  Previous versions of E would have printed null is true because 
  3305.                  the value of myswitch was not precisely zero ('0'). It makes 
  3306.                  more sense for no-value to be false.  But it's still better 
  3307.                  practice to specify the return value explicitly in your procs. 
  3308.  
  3309.                  Several ways are provided to structure a repetitive loop: 
  3310.  
  3311. WHILE - DO 
  3312.                  Conditional loop 
  3313.  
  3314.                                   WHILE expression DO
  3315.                                     statements
  3316.                                   ENDWHILE
  3317.  
  3318. DO - WHILE 
  3319.                  Same effect as WHILE - DO 
  3320.  
  3321.                                   DO WHILE expression
  3322.                                     statements
  3323.                                   END or ENDDO
  3324.  
  3325. DO FOREVER 
  3326.                  Continuous loop (See LEAVE, below) 
  3327.  
  3328.                                   DO FOREVER        /* clearer meaning than  WHILE 1  */
  3329.                                     statements     /* Exit with a RETURN or LEAVE    */
  3330.                                   END or ENDDO
  3331.  
  3332. LOOP 
  3333.                  Same effect as DO FOREVER 
  3334.  
  3335.                                   LOOP              /* equivalent to the previous one */
  3336.                                      statements
  3337.                                   ENDLOOP
  3338.  
  3339. FOR 
  3340.                  Stepwise Iteration 
  3341.  
  3342.                                   FOR i=expression TO expression [BY expression]
  3343.                                     statements
  3344.                                   ENDFOR
  3345.  
  3346. DO (FOR) 
  3347.                  Same effect as FOR 
  3348.  
  3349.                                   DO i=expression TO expression [BY expression]
  3350.                                      statements
  3351.                                   END or ENDDO
  3352.  
  3353. LEAVE 
  3354.                  Exits LOOP, WHILE or DO. 
  3355.  
  3356.                  Execution resumes after ENDLOOP, ENDWHILE or END. 
  3357.  
  3358. ITERATE 
  3359.                  Iterates LOOP, WHILE or DO. 
  3360.  
  3361.                  Execution resumes at LOOP, WHILE or DO. 
  3362.  
  3363. Note:  It is possible to modify the loop index within the FOR loop. For 
  3364. example, the following is correct: 
  3365.  
  3366.    for i= 1 to 10
  3367.        if i=7 then
  3368.            i= i - 1  -- i = 6
  3369.        endif
  3370.    endfor
  3371.  
  3372.  
  3373. ΓòÉΓòÉΓòÉ 4.3. The Parse Statement ΓòÉΓòÉΓòÉ
  3374.  
  3375. Use the PARSE statement to extract information from a string. The syntax is: 
  3376.  
  3377.  
  3378.    PARSE  ARG template
  3379.    PARSE  VALUE expression WITH template
  3380.  
  3381. where expression is the input, i.e. the string to parse, and template is a list 
  3382. of symbols separated by blanks, which dictates how to parse the input. 
  3383.  
  3384. The syntax of template is
  3385.  
  3386. { '.' | string | +number | -number |number | variable | '(' variable ')' }
  3387. The only difference between the two forms of the parse statement is that the 
  3388. PARSE ARG statement is a special case of the PARSE - VALUE - WITH statement. 
  3389. The PARSE ARG statement automatically assumes ARG(1) to be its input. 
  3390. Therefore, the following two statements are logically equivalent: 
  3391.  
  3392. PARSE ARG A B C D
  3393. PARSE VALUE arg(1) WITH A B C D
  3394.  
  3395. The template in the above example is A B C D. A template in general specifies 
  3396. the names of variables that are to be given new values, together with optional 
  3397. triggers (either strings or special characters) to control the parsing. In the 
  3398. example, A, B, C and D are all variables to which new values will be assigned; 
  3399. there are no triggers. 
  3400.  
  3401. Normally each variable in the template is assigned one word from the input 
  3402. string.  The last variable, however, is assigned the remainder of the string 
  3403. (if any).  If there are fewer words in the string than variables in the 
  3404. template, all excess variables are set to null. A null, therefore, indicates 
  3405. the end of data. 
  3406.  
  3407. For example, if the string 'The Red Baron' is parsed with the template A B C D, 
  3408. then the first three variables would each be assigned one word from the string, 
  3409. in sequence, and the variable D would be set to ' '. 
  3410.  
  3411. If the template were changed to A B and the input string remained the same, 
  3412. then the variable A would be set to 'The' and the variable B would be set to 
  3413. 'Red Baron'. 
  3414.  
  3415. The parsing algorithm also allows some pattern matching, in which you may 
  3416. trigger on strings. If the template contains a string (such as a '/' or 'TO' ), 
  3417. then synchronization will occur at the next point where the trigger matches the 
  3418. data.  This is best explained with the aid of examples: 
  3419.  
  3420.  
  3421.      Input data:        EDIT AUTOEXEC.BAT /D
  3422.      Template:          X Fn '/'Opt
  3423.  
  3424.      Variables set:     X   = 'EDIT'
  3425.                         Fn  = 'AUTOEXEC.BAT'
  3426.                         Opt = 'D'
  3427.  
  3428. The value of a variable may be used as a trigger, by enclosing the name of the 
  3429. variable in parentheses.  It then acts in exactly the same way as a literal 
  3430. string trigger.  For example: 
  3431.  
  3432.   delim=','
  3433.   parse value 'abc, def' with  x (delim) y /* splits the string */
  3434.  
  3435. This feature allows you to parse when you don't know what the trigger string 
  3436. (delim in the example) is in advance.  Without the parentheses, the variable 
  3437. delim would receive the value 'def'. 
  3438.  
  3439. You may also use numbers as triggers to pick out positional substrings, or to 
  3440. extract a string of a certain length.  These may be absolute column numbers, or 
  3441. numbers relative to the last trigger (or column) specified. 
  3442.  
  3443.      Input string:      This is the time for all good men
  3444.      Template:          8 X +4  16 Y +5
  3445.  
  3446.      Variables set:     X = ' the'  /* four starting at column 8  */
  3447.                         Y = 'e for' /* five starting at column 16 */
  3448. In this case, a +n following the variable indicates that the string to be 
  3449. picked out should begin at the last column specified and should continue n 
  3450. characters to the right. The '-' unary operator cannot be used in this manner. 
  3451. However, both unary plus and minus can also be used in the template to advance 
  3452. the current column position. For example, 
  3453.  
  3454. Input string:        This is the time for all good men
  3455. Template:            10 't' X +4 +5 Y -4 Z
  3456.  
  3457. Variables set:       X = 'time'
  3458.                      Y = 'all good men'
  3459.                      Z = 'for all good men'
  3460. Notice that in this example, the current position is moved to the 10th column, 
  3461. and then to the next instance of 't' (which is the 't' in 'time'). X is 
  3462. assigned a string of length 4 beginning from this point. The current position 
  3463. is then moved 5 positions to the right. The Y variable is assigned a string 
  3464. beginning at this point and continuing to the end of the string. The cursor 
  3465. position is then moved back (to the left) 4 positions and the Z variable gets a 
  3466. string from that position to the end of the string. 
  3467.  
  3468. Further examples: 
  3469.  
  3470.  
  3471.      Input string:      MSG WINPA(FRED) Hello Fred
  3472.      Template:          X node'('userid')' msg
  3473.  
  3474.      Variables set:     X      = 'MSG'
  3475.                         NODE   = 'WINPA'
  3476.                         USERID = 'FRED'
  3477.                         MSG    = ' Hello Fred'
  3478.  
  3479.  
  3480.      Input string:      /foo/bar zot/
  3481.      Template:          delim 2 word1 (delim) word2 (delim)
  3482.      Variables set:     delim  = '/'
  3483.                         word1  = 'foo'
  3484.                         word2  = 'bar zot'
  3485.  
  3486. Note that each substring (between triggers) is parsed in the same manner as a 
  3487. complete string would be if there were no triggers present. 
  3488.  
  3489. You can also use a period (.) as a place holder to skip over a word that would 
  3490. otherwise be placed in a variable.  For example: 
  3491.  
  3492.  
  3493.      Input string:      'The Red Baron'
  3494.      Template:          word1 . word2
  3495.      Variables set:     word1  = 'The'
  3496.                         word2  = 'Baron'
  3497.  
  3498.  
  3499. ΓòÉΓòÉΓòÉ 4.4. Compiler Directive Statements ΓòÉΓòÉΓòÉ
  3500.  
  3501. The following statements are different from other E statements because they 
  3502. serve no function when the program is being run, rather they provide 
  3503. instructions to the ET compiler. 
  3504.  
  3505.  
  3506. ΓòÉΓòÉΓòÉ 4.5. compiler directives ΓòÉΓòÉΓòÉ
  3507.  
  3508. The compiler directive statements are: 
  3509.  
  3510. Includes
  3511.                                                               INCLUDE 'filespec'
  3512.  
  3513.                                                               TRYINCLUDE 'filespec'
  3514.  
  3515. Conditional compilation
  3516.                                                               COMPILE IF constant_expression
  3517.                                                                   statements
  3518.                                                               { COMPILE ELSEIF constant_expression
  3519.                                                                   statements }
  3520.                                                               [ COMPILE ELSE
  3521.                                                                   statements ]
  3522.                                                               COMPILE ENDIF
  3523.  
  3524.  
  3525. ΓòÉΓòÉΓòÉ 4.5.1. Include Statements ΓòÉΓòÉΓòÉ
  3526.  
  3527. The usage and usefulness of INCLUDE statements is shown in The EPM User's 
  3528. Guide. In this section, we will discuss how these statements work. Let's say 
  3529. that there is an INCLUDE statement (INCLUDE 'filespec') in a file test.e. The 
  3530. statement directs the compiler (ET) to replace the INCLUDE statement with the E 
  3531. code found in the file named in filespec. The contents of file filespec are 
  3532. inserted into file test.e. If file filespec does not exist, compilation is 
  3533. aborted. 
  3534.  
  3535. The TRYINCLUDE statement has the same syntax as an INCLUDE file, i.e. filespec 
  3536. must be enclosed with quotes. It also behaves the same way as an INCLUDE 
  3537. statement: the specified file is included into the file where the INCLUDE 
  3538. statement appears. However, when a TRYINCLUDE statement is used, the compiler 
  3539. tries to include the file. If it is unsuccessful, compilation does not halt. 
  3540. For example, consider the following excerpt from a file: 
  3541.  
  3542. tryinclude 'test1.e'
  3543. tryinclude 'test2.e'
  3544. include 'test3.e'
  3545. If the file test1.e does not exist, the compiler will simply go on to the next 
  3546. statement without notifying the user. Next it will try to include file test2.e. 
  3547. However, if file test3.e does not exist, the compiler will issue an error 
  3548. message and stop compilation. 
  3549.  
  3550.  
  3551. ΓòÉΓòÉΓòÉ 4.5.2. Conditional Compilation ΓòÉΓòÉΓòÉ
  3552.  
  3553. In the past few releases of E we've tried to simplify configuration and 
  3554. updates.  We've rearranged the standard E files to bring together all the usual 
  3555. configuration options (in STDCNF.E and COLORS.E) and all the INCLUDEs (into 
  3556. E.E).  Ideally the user should be able to customize E with simple one-line 
  3557. changes. 
  3558.  
  3559. The available configuration techniques have been: 
  3560.  
  3561. o setting a universal variable, for example matchtab_on=0. This is fine for 
  3562.   simple options but can be expensive for large features.  The macros must 
  3563.   contain the code for all possible values of the variable since the value can 
  3564.   change at run-time.  Even though you might never use the matchtab feature, 
  3565.   memory space is used for the possibility. 
  3566.  
  3567. o setting a constant, like TEMP_PATH='C:\'. Constants have been good only for 
  3568.   minor configuration options which don't change after installation, such as 
  3569.   drive letters and directories.  They're also useful for mnemonic names like 
  3570.   GREEN=2 to make macros more readable. 
  3571.  
  3572. o using INCLUDE and TRYINCLUDE statements, such as tryinclude 'math.e', to ease 
  3573.   the installation of large optional features if the features are cleanly 
  3574.   separable into independent files. After the compilation is done, the INCLUDE 
  3575.   statements have no effect and occupy no memory. 
  3576.  
  3577. Another tool, conditional compilation includes features which aren't cleanly 
  3578. separable into files. Programmers experienced with the C language will be 
  3579. familiar with this concept (as #if).  Other users might be uncomfortable with 
  3580. the distinction between compile-time and run-time processing. 
  3581.  
  3582. Let's take a small feature as an illustration - imagine that whenever you press 
  3583. F4 (File) you don't want the file saved if it hasn't been modified. If you were 
  3584. a power user who wanted this feature, you had to modify STDCMDS.E as follows: 
  3585.  
  3586. defc f,file=
  3587.    if .modify=0 then   /* my mod:  don't file if not modified */
  3588.       'quit'
  3589.    endif
  3590.    /* rest of code as before */
  3591.  
  3592. The trouble with modifying the standard commands like this is that you had to 
  3593. repeat the modification on every new release of E. To ease your updates you 
  3594. might have tried to convince us developers to include the feature in the 
  3595. standard distribution version.  But we've been reluctant to do this because 
  3596. every user would be forced to use the same feature, or at least to sacrifice 
  3597. memory space to it (if we turn it on/off with a variable assignment). 
  3598.  
  3599. But now it's possible to write: 
  3600.  
  3601. const FILE_ONLY_IF_MODIFIED = 1
  3602.  
  3603. defc f,file=
  3604. compile if FILE_ONLY_IF_MODIFIED
  3605.    if .modify=0 then
  3606.       'quit'
  3607.    endif
  3608. compile endif
  3609.    /* rest of code as before */
  3610.  
  3611. When the compiler sees the compile if it will check the value of the constant 
  3612. FILE_ONLY_IF_MODIFIED, and, seeing that it's true, will compile the new code 
  3613. just as it did when you hand-modified it. But now the feature is easier to 
  3614. distribute to all users.  A user who doesn't like it can set 
  3615. FILE_ONLY_IF_MODIFIED = 0, which will cause ET to ignore the code enclosed 
  3616. between compile if and compile endif.  This happens at compile time, in much 
  3617. the same manner as a TRYINCLUDE, so the other user is not penalized memory 
  3618. space for the choice. 
  3619.  
  3620. We encourage developers of add-on packages to use this feature.  In time we 
  3621. hope to make the most popular add-ons installable without the user having to 
  3622. touch the macro source code. 
  3623.  
  3624. The new keywords all start with the word compile: 
  3625.  
  3626. o COMPILE IF  const_expression 
  3627.  
  3628. o COMPILE ELSE 
  3629.  
  3630. o COMPILE ELSEIF const_expression 
  3631.  
  3632. o COMPILE ENDIF 
  3633. const_expression must be a simple expression combining only constants known at 
  3634. compile time. Understand that ET cannot know the values that will be assigned 
  3635. to variables at run-time (like matchtab_on). If we assume that all uppercase 
  3636. identifiers represent pre-defined constants, the following are valid 
  3637. const_expressions: 
  3638.  
  3639.    COMPILE IF 0            /* Means 'never compile'. */
  3640.  
  3641.    COMPILE IF FOO + BAR >= 2
  3642.  
  3643.    COMPILE IF EVERSION = '3.07'
  3644.  
  3645.    COMPILE IF STATUSCOLOR = NORMAL
  3646.  
  3647.    COMPILE IF not (OS2 or DOS)
  3648.  
  3649. Note:  simple arithmetic and logical expressions are possible, but not string 
  3650. functions such as substr(). 
  3651.  
  3652. Any strings in the constant expression associated with a COMPILE IF statement 
  3653. are converted to upper case. This means that many of the values for 
  3654. configuration options in the STDCNF.E file may now be entered in any 
  3655. combination of lower and upper case letters. For example, the following 
  3656. statement is now valid: 
  3657.  
  3658. HOST_SUPPORT = 'pdq'
  3659. even though STDCNF.E contains the following statement: 
  3660.  
  3661. COMPILE IF HOST_SUPPORT = 'PDQ'
  3662.     HAVE_DOS = 0
  3663. COMPILE ENDIF
  3664. Since the string constant `pdq' will be converted to `PDQ' at compile-time, the 
  3665. compile-if condition will be found to be true. 
  3666.  
  3667. There must be one COMPILE ENDIF to each COMPILE IF, zero or one COMPILE ELSE's, 
  3668. and zero or more COMPILE ELSEIF's.  The ELSE must come after all ELSEIF's, as 
  3669. in normal E if-else-endif structures. 
  3670.  
  3671. These conditional blocks can be nested (in the same manner as if-else-endif 
  3672. structures) up to a maximum depth of 20 levels. 
  3673.  
  3674. Here's an example of how we might include different methods of host-file 
  3675. support: 
  3676.  
  3677. compile if HOST_SUPPORT = 'STD'
  3678.    include 'saveload.e' -- with host support
  3679. compile elseif HOST_SUPPORT = 'EMUL'
  3680.    include 'e3emul.e'   -- Brian Tucker's add-on package
  3681. compile else
  3682.    include 'slnohost.e' -- without host support
  3683. compile endif
  3684.  
  3685. The COMPILE keyword can be inserted anywhere a newline is allowed, including 
  3686. cases where a newline serves as a line continuation in the middle of a 
  3687. statement. 
  3688.  
  3689.    delay = 2000 /
  3690.    compile if OS2
  3691.    10             /* delay = 200  here */
  3692.    compile else
  3693.    1              /* delay = 2000 here */
  3694.    compile endif
  3695.  
  3696. See the section Line Continuations for other examples. 
  3697.  
  3698.  
  3699. ΓòÉΓòÉΓòÉ 4.5.3. Compiler Directives as Definition Primitives ΓòÉΓòÉΓòÉ
  3700.  
  3701. The compiler directives discussed in this section are valid E statements, i.e. 
  3702. they can be contained within a DEFPROC, DEFC, or other definition. However, 
  3703. compiler directives can also be considered definition primitives depending upon 
  3704. what they contain. Consider the following example: file junk.e contains: 
  3705.  
  3706.     sayerror "print junk"
  3707.     x = x + 5
  3708. file main_junk.e contains: 
  3709.  
  3710.     DEFPROC junk()
  3711.         universal x
  3712.  
  3713.         x = 8
  3714.         include 'junk.e'
  3715.         temp = 250
  3716. After execution of the procedure junk(), the value of x is 13. In this case, 
  3717. the included file (junk.e) contains only statements, and therefore the INCLUDE 
  3718. statement acts as a statement. However, consider the next example: file junk.e 
  3719. contains: 
  3720.  
  3721.     DEFPROC junk()
  3722.         sayerror "printing junk"
  3723. file main_junk.e contains: 
  3724.  
  3725.     SET insert_state 0
  3726.  
  3727.     DEFC com1 =
  3728.         call junk()
  3729.  
  3730.     CONST
  3731.         a = 25
  3732.  
  3733.     include 'junk.e'
  3734.  
  3735. If the included file (junk.e) contained only statements, as in the last 
  3736. example, the ET compiler would issue the following error: "Expecting DEFinition 
  3737. primitive". Because the INCLUDE statement is no longer contained within a 
  3738. definition primitive, the included file must contain a definition primitive, as 
  3739. it does in this example. In this case, the INCLUDE statement is not really 
  3740. acting as a statement; it is acting as a definition primitive. 
  3741.  
  3742. The same can be said of the conditional compile statement: it can occur within 
  3743. a definition primitive and enclose only statements or it can occur outside a 
  3744. primitive and enclose one or more definition primitives. The following examples 
  3745. show various correct usages: 
  3746.  
  3747.  
  3748. CONST
  3749.     flag1 = 1
  3750.  
  3751. DEFPROC fred()
  3752.     universal perm
  3753.  
  3754.     perm = 8
  3755.     compile if flag1 = 1
  3756.         perm = perm + 5
  3757.     compile endif
  3758.     sayerror "perm is " perm
  3759.  
  3760. /************** Second example ****************/
  3761.  
  3762. CONST
  3763.     USERS_CHOICE = 0
  3764.  
  3765. compile if USERS_CHOICE
  3766.     DEFC optional_command =
  3767.         sayerror "just printing junk for testing"
  3768. compile endif
  3769.  
  3770. DEFPROC test()
  3771.     sayerror "stuff"
  3772.  
  3773. In the first example, if flag1 is set to 1, then the value of perm becomes 13. 
  3774. If flag1 is set to 0, then the value of perm is 8. In either case, the value is 
  3775. printed out with the sayerror statement. In the second example, if USERS_CHOICE 
  3776. is set to 1, the optional_command is included in the code; otherwise it is not, 
  3777. and at run-time (when you are running the editor), the command optional_command 
  3778. does not exist, and will not be recognized. 
  3779.  
  3780.  
  3781. ΓòÉΓòÉΓòÉ 4.6. Using EPM Commands in E Statements ΓòÉΓòÉΓòÉ
  3782.  
  3783. The E commands that were discussed in The EPM User's Guide can be used not only 
  3784. on the command dialog box, but also in E programs. When the name of a command 
  3785. and its options and parameters are enclosed in quotes (single or double), the 
  3786. command can be used in place of a statement. The syntax of these commands is 
  3787. the same as that which was presented in the User's Guide. An example of this 
  3788. usage follows: 
  3789.  
  3790. defproc zap_file()
  3791.     k = entrybox("Confirm",'/Yes/No/','Really quit?',18,0)
  3792.     if k then
  3793.        sayerror("Data has been cruelly obliterated ...")
  3794.        'quit'           /*  <-- Note the quit command in quotes */
  3795.     else
  3796.        sayerror("File has been mercifully spared ...")
  3797.     endif
  3798.  
  3799. When the zap_file() procedure is activated, it will prompt the user. If the 
  3800. user picks 'Yes', it will quit the file; if he picks 'No' the user can continue 
  3801. editing. 
  3802.  
  3803. Another common usage is when redefining key strokes. For example: 
  3804.  
  3805.   def c_2
  3806.     'togglecontrol 9 '
  3807.     'togglecontrol 10'
  3808.  
  3809. This will define the key ctrl-2 to toggle the scroll bars on or off. Other 
  3810. examples can be seen in section Sample E Procs. 
  3811.  
  3812. Any command can be used as a statement. The command need not be a built-in 
  3813. command; it can be a command defined by a user using a DEFC. For example: 
  3814.  
  3815. defc temp
  3816.     call temp()
  3817.  
  3818. defproc temp()
  3819.     'testA stuff'
  3820.  
  3821. defc testA
  3822.     sayerror "argument is " arg(1)
  3823. Issuing the command temp will print argument is stuff. 
  3824.  
  3825.  
  3826. ΓòÉΓòÉΓòÉ 4.6.1. Commands Omitted From the User's Guide ΓòÉΓòÉΓòÉ
  3827.  
  3828. Most of the standard commands (defc constructions) are listed in The EPM User's 
  3829. Guide. However, a few were omitted because they produce no useful results by 
  3830. themselves, but are only really useful in a programming context or because they 
  3831. may not be understood by a novice. These advanced commands are: 
  3832.  
  3833. Command                       Description 
  3834.  
  3835. ACTIVATEFILEID fileid 
  3836.                               activates the file specified by the file handle 
  3837.                               fileid. 
  3838.  
  3839. AMU_ADDENDA_ADDITION word 
  3840.                               adds the word specified by word to the addenda 
  3841.                               file specified the variable ADDENDA_FILENAME. 
  3842.  
  3843. AMU_ADDENDA_PICKUP 
  3844.                               adds the addenda dictionary specified by the 
  3845.                               variable ADDENDA_FILENAME to the standard 
  3846.                               dictionary. 
  3847.  
  3848. CLEARSHARBUFF 
  3849.                               clears the shared PM buffer. 
  3850.  
  3851. COMMANDLINE [ text ] 
  3852.                               brings up the command line dialog box. This is 
  3853.                               the equivalent of the standard ESC key 
  3854.                               definition. This command optionally takes an 
  3855.                               argument of text or a string variable. If the 
  3856.                               argument is included, it will be placed on the 
  3857.                               command line. 
  3858.  
  3859. COPY2DMBUFF 
  3860.                               copies the marked area to the "Delete Mark" 
  3861.                               buffer. 
  3862.  
  3863. COPY2SHARBUFF 
  3864.                               copies a marked area to the shared buffer. 
  3865.  
  3866. CURSOROFF 
  3867.                               turns the cursor off. This command is equivalent 
  3868.                               to a: 
  3869.  
  3870.                                                               `TOGGLECONTROL 14 0'
  3871.  
  3872.                               To turn the cursor back on again, issue a 
  3873.                               TOGGLECONTROL command with a 1 instead of a zero 
  3874.                               as the second argument. 
  3875.  
  3876. DUPMARK typemark 
  3877.                               takes an argument (typemark) of: 
  3878.  
  3879.    M = move marked text 
  3880.    C = copy marked text 
  3881.    O = overlay marked text 
  3882.    U = unmark marked text 
  3883.    D = delete marked text 
  3884.  
  3885. and executes that action on the marked text. 
  3886.  
  3887. EPM will look first in the local buffer and then in the shared buffer for 
  3888. marked text. 
  3889.  
  3890. GETDMBUFF 
  3891.                               gets text from the Delete Mark buffer. 
  3892.  
  3893. GETSHARBUFF 
  3894.                               gets text from EPM shared buffer. 
  3895.  
  3896. LOADDEFAULTMENU 
  3897.                               loads the default menu setup. 
  3898.  
  3899. MH_BEGIN_MARK 
  3900.                               mouse handler's begin mark. This is executed when 
  3901.                               the standard mouse setup begins a drag. See 
  3902.                               MOUSE.E and Configuring the Mouse. for more 
  3903.                               information. 
  3904.  
  3905. MH_CANCEL_MARK 
  3906.                               mouse handler's cancel mark. This is executed 
  3907.                               when the standard mouse setup double clicks on 
  3908.                               button one. See MOUSE.E and Configuring the Mouse 
  3909.                               for more information. 
  3910.  
  3911. MH_END_MARK 
  3912.                               mouse handler's end mark. This is executed when 
  3913.                               the standard mouse setup ends a drag. See MOUSE.E 
  3914.                               and Configuring the Mouse for more information. 
  3915.  
  3916. MH_GOTOPOSITION 
  3917.                               moves the cursor to the current mouse pointer 
  3918.                               location. This is like the standard mouse of a 
  3919.                               single button one click. See MOUSE.E and 
  3920.                               Configuring the Mouse for more information. 
  3921.  
  3922.  
  3923. ΓòÉΓòÉΓòÉ 4.7. Predefined Constants and Variables ΓòÉΓòÉΓòÉ
  3924.  
  3925. There are several predefined UNIVERSAL variables which may be accessed in any 
  3926. definition without an explicit UNIVERSAL declaration: 
  3927.  
  3928. o RC, 
  3929.  
  3930. o join_after_wrap, 
  3931.  
  3932. o center_search, 
  3933.  
  3934. o exit_after_last_file, and 
  3935.  
  3936. o two_spaces. 
  3937.  
  3938. RC holds the error code from the last-executed command. All commands, for 
  3939. example 'edit', 'quit', and 'file', set the value of RC.  If no error occurs, 
  3940. RC will be reset to zero by a command. Upon entering a DEFC, the value of RC 
  3941. depends upon the source of the command invocation. If another definition 
  3942. (internal to the E program) activates the command, RC is set to zero. If a user 
  3943. issues the command from the command dialog box, RC is set to the position of 
  3944. the cursor in the command dialog box. However, statements and procedures, such 
  3945. as 'nextfile', 'copymark', or 'top', do NOT normally set RC.  If no error 
  3946. occurs, whatever value RC had before the statement is still there.  This 
  3947. approach was followed for considerations of speed, space, and to allow an 
  3948. earlier command's RC to "filter down" to the end of the proc.  Commands are the 
  3949. ones most likely to encounter meaningful errors. 
  3950.  
  3951. Thus if you want a sure error-check on a statement, zero RC first: 
  3952.  
  3953.    rc = 0
  3954.    copymark
  3955.    if rc then /* complain */ endif
  3956.  
  3957. One special case:  REPEATFIND is a statement but it sets RC to zero if the find 
  3958. is successful. 
  3959.  
  3960. An assignment to one of the function key text variables changes the value of 
  3961. the function key text displayed at the bottom of the screen. 
  3962.  
  3963. There is also one predefined constant called ARGSEP. Since the argument option 
  3964. separator can change from machine to machine, this constant is used to keep the 
  3965. E procs portable.  On a PC, ARGSEP is the slash '/'.  On a RT, it's the hyphen 
  3966. '-'. 
  3967.  
  3968. JOIN_AFTER_WRAP, CENTER_SEARCH and other configurable constants are discussed 
  3969. in The EPM User's Guide. 
  3970.  
  3971.  
  3972. ΓòÉΓòÉΓòÉ 5. Sample E Procs ΓòÉΓòÉΓòÉ
  3973.  
  3974. Using the E language, the user can configure the editor and define complex 
  3975. macros for increased editing power. The E language is translated by the 'etpm' 
  3976. compiler to increase the speed of execution. The syntax of the ETPM compiler 
  3977. is: 
  3978.  
  3979.   ETPM filespec[.E] [destfile[.EX]]
  3980.  
  3981. The default extension of the source code is .E. If no destination file is 
  3982. specified, ETPM will use the same source file name and just attach an .EX 
  3983. extention. Typically, only the filespec is given. These source modules are 
  3984. referred to as E Procs. Two examples of an E Procs are shown below. 
  3985.  
  3986.  
  3987. ΓòÉΓòÉΓòÉ 5.1. Example One ΓòÉΓòÉΓòÉ
  3988.  
  3989. The first E Proc is a simple procedure to define a command to display the 
  3990. different mouse pointers available. Edit a file (say TESTFILE.E). Then type in 
  3991. the following code: 
  3992.  
  3993.  
  3994.   defc firsttime                     -- Define a initialization procedure
  3995.     universal pointertype            -- Make available to both procedures
  3996.     pointertype = 1                  /* Initialize pointertype (same as
  3997.                                         pointertype = '1') */
  3998.     mouse_setpointer pointertype     -- Set the mouse pointer type
  3999.     sayerror "Completed first time." -- Message so you know it worked
  4000.  
  4001.   defc more                          -- Define a subsequent procedure
  4002.     universal pointertype            -- Make E know pointertype is global
  4003.     pointertype = pointertype + 1    -- Increment pointer type
  4004.     mouse_setpointer pointertype     -- Set the mouse pointer type
  4005.     sayerror "Completed subsequent time. Cusor number: "||pointertype
  4006.                                      -- Message so you know it worked
  4007.  
  4008. Then enter RELINK from the commandline dialog box. This will save, compile, and 
  4009. link this code (provided, of course, that there were no typos and the code 
  4010. compiled successfully). The commands FIRSTTIME and MORE are now defined. From 
  4011. the command line dialog box, type FIRSTTIME. Mouse pointer 1 is an arrow so you 
  4012. won't notice a change in the pointer but will see the message Completed first 
  4013. time. Now enter the MORE command. This should change the mouse pointer type. 
  4014. You can continue changing the mouse pointer (upto 15 times) by entering the 
  4015. MORE command. Entering FIRSTTIME again will start you at mouse pointer one 
  4016. again. 
  4017.  
  4018. Note how the variable pointertype is declared universal so it can carry a value 
  4019. between procedures. Since strings and numbers are interchangeable, we could 
  4020. have initialized pointertype with a string instead of a numeric constant. 
  4021.  
  4022.  
  4023. ΓòÉΓòÉΓòÉ 5.2. Example Two ΓòÉΓòÉΓòÉ
  4024.  
  4025. The second E Proc shows how key set definitions can be programmed. This E Proc 
  4026. will configure a few keys of the editor to mimic the EMACS editor. 
  4027.  
  4028. /**********************************************************************/
  4029. /* This E Proc will configure a few keys in the E editor to perform   */
  4030. /* the same operations as the EMACS editor.                           */
  4031. /**********************************************************************/
  4032. defkeys mykeys
  4033. def F3 = 'quit'    /* define a key for fast exit. */
  4034. def C_A = beginline
  4035. def C_B = left
  4036. def C_D = deletechar
  4037. def C_E = endline
  4038. def C_F = right
  4039. def C_N = down
  4040. def C_P = up
  4041. def C_X =
  4042.   choice = listbox("/Quit/Save/")
  4043.   if (choice='Quit') then
  4044.     'quit'
  4045.   endif
  4046.   if (choice='Save') then
  4047.     'save'
  4048.   endif
  4049.  
  4050. If we have a file called EMACS.E which contains the above E Procs, this file 
  4051. would then be translated by the E translator with the following command from 
  4052. the command dialog: 
  4053.  
  4054.   etpm emacs
  4055.  
  4056. To load this file (assuming it compiled correctly) we could type from the 
  4057. command line dialog box: 
  4058.  
  4059.   link emacs
  4060.  
  4061. This will load EMACS into the currently running version of EPM. 
  4062.  
  4063. To have this file automatically included we could add the line: 
  4064.  
  4065.   include "emacs.e"
  4066.  
  4067. in the file MYKEYS.E. When we recompile EPM (see The EPM User's Guide for 
  4068. information on recompiling your editor from the OS/2 prompt) the EMACS key 
  4069. definition will always be available by issuing the following from the command 
  4070. dialog: 
  4071.  
  4072.   keys mykeys
  4073.  
  4074.  
  4075. ΓòÉΓòÉΓòÉ 6. Advanced Configuration ΓòÉΓòÉΓòÉ
  4076.  
  4077. The fact that you are reading this means that you probably want to configure 
  4078. EPM beyond that which can be done merely by setting constants.  In this section 
  4079. are listed a few advanced configuration options that involve some programming. 
  4080.  
  4081.  
  4082. ΓòÉΓòÉΓòÉ 6.1. Building Accelerator Tables from the Macro Language ΓòÉΓòÉΓòÉ
  4083.  
  4084. A Named Accelerator Table is the way true PM accelerators are created from the 
  4085. E macro language.  This is achieved using the BuildAccelTable, and the 
  4086. ActivateAccelTable statements. 
  4087.  
  4088. First, the BuildAccelTable statement is used to create, and add keys to, a 
  4089. named accelerator table.  (The first time BuildAccelTable is called the table 
  4090. is automatically created.)  During this process a data base is created linking 
  4091. accelerator keys to command ids,  and command ids to user strings.  When a 
  4092. named accelerator table is activated, it becomes a true PM accelerator table. 
  4093. This is done via the ActivateAccelTable statement. Now, when a pre-registered 
  4094. key is pressed, the corresponding command id is issued as part of the message 
  4095. parameter of a PM - WM_COMMAND message.  In the E macro world, the defc 
  4096. PROCESSMENU is executed whenever a WM_COMMAND message is received.  ARG(1) of 
  4097. PROCESSMENU contains the command-id corresponding to the event that just took 
  4098. place. If an accelerator key was the cause of the PROCESSMENU command, ARG(1) 
  4099. will be the command-id registered during the corresponding BuildAccelTable 
  4100. statement. 
  4101.  
  4102. During the PROCESSMENU command, it is sometimes useful to take the command-id 
  4103. (passed as arg(1)) and look up the corresponding user string.  This is done 
  4104. using the QueryAccelString function. 
  4105.  
  4106. Accelerator tables created with the BuildAccelTable statement can be deleted 
  4107. with the DeleteAccel statement.  BY DEFAULT, named accelerator tables are 
  4108. deleted when the corresponding edit window is closed. 
  4109.  
  4110.  
  4111. ΓòÉΓòÉΓòÉ 6.1.1. BUILDACCELTABLE ΓòÉΓòÉΓòÉ
  4112.  
  4113. The buildacceltable statement adds a key to a named accelerator table. If it is 
  4114. the first key added, the named table is automatically created. Once a table is 
  4115. built, the ActivateAccelTable statement can be issued to make the named 
  4116. accelerator table into an true, active PM Accelerator table. The syntax for the 
  4117. buildacceltable statement is: 
  4118.  
  4119.      buildacceltable  table-name, user-string, key-style, key, command-id
  4120.  
  4121. table-name  where 'table-name' is a text string containing the name of your 
  4122.             particular accelerator table.  (MAX. = 80 characters) 
  4123. user-string where 'user-string' is an information string that can be retrieved 
  4124.             using the QueryAccelString function. 
  4125. key-style   where 'key-style' describes the style of the accelerator key.  The 
  4126.             value must be one of the PM defined AF_xxx flags defined in 
  4127.             PMWIN.H. (i.e. AF_VIRTUALKEY) 
  4128. key         where 'key' is a key constant, (i.e. VK_F1) 
  4129. command-id  where 'command-id' is a unique number within this particular 
  4130.             accelerator table to define the key in question. (1-MAXINT) 
  4131.  
  4132.  
  4133. ΓòÉΓòÉΓòÉ 6.1.2. ACTIVATEACCELTABLE ΓòÉΓòÉΓòÉ
  4134.  
  4135. The activateacceltable statement activates a named Accelerator table created 
  4136. with BuildAccelTable. When a named accelerator table is activated, it becomes a 
  4137. true PM accelerator table. The syntax for the activateacceltable statement is: 
  4138.  
  4139.      activateacceltable table-name
  4140.  
  4141. table-name  where 'table-name' is a text string containing the name of your 
  4142.             particular accelerator table.  (MAX. = 80 characters) 
  4143.  
  4144.  
  4145. ΓòÉΓòÉΓòÉ 6.1.3. QUERYACCELSTRING ΓòÉΓòÉΓòÉ
  4146.  
  4147. The queryaccelstring statement allows the retrival of the user-string which was 
  4148. registered with the BuildAccelTable statement. The syntax for the 
  4149. queryaccelstring statement is: 
  4150.  
  4151.      queryaccelstring table-name, command-id
  4152.  
  4153. table-name  where 'table-name' is a text string containing the name of your 
  4154.             particular accelerator table.  (MAX. = 80 characters) 
  4155. command-id  where 'command-id' is a unique number within this particular 
  4156.             accelerator table to define the key in question. (1-MAXINT) 
  4157.  
  4158.  
  4159. ΓòÉΓòÉΓòÉ 6.1.4. DELETEACCEL ΓòÉΓòÉΓòÉ
  4160.  
  4161. The deleteaccel statement deletes a named Accelerator table created with 
  4162. BuildAccelTable.  BY DEFAULT, named accelerator tables are deleted when the 
  4163. corresponding edit window is closed. The syntax for the deleteaccel statement 
  4164. is: 
  4165.  
  4166.      deleteaccel table-name
  4167.  
  4168. table-name  where 'table-name' is a text string containing the name of your 
  4169.             particular accelerator table.  (MAX. = 80 characters) 
  4170.  
  4171.  
  4172. ΓòÉΓòÉΓòÉ 6.1.5. An example that uses the Named Accelerator statements ΓòÉΓòÉΓòÉ
  4173.  
  4174. -- constants needed for Accelerator example.
  4175. -- key constants
  4176. const  VK_F2 = 33             -- Taken from PMWIN.H
  4177.        VK_F3 = 34
  4178.        VK_F4 = 35
  4179.        VK_F5 = 36
  4180.       -- key style constants
  4181.        AF_CHAR        =   1   -- Taken from PMWIN.H
  4182.        AF_VIRTUALKEY  =   2
  4183.        AF_SCANCODE    =   4
  4184.        AF_SHIFT       =   8
  4185.        AF_CONTROL     =   16
  4186.        AF_ALT         =   32
  4187.        AF_LONEKEY     =   64
  4188.        AF_SYSCOMMAND  =   256
  4189.        AF_HELP        =   512
  4190.  
  4191. -- Creates Two named accel tables, and activates the "default" table
  4192. defc loadaccel
  4193.    universal activeaccel
  4194.  
  4195.    activeaccel='default'
  4196.    otheraccel  ='other'
  4197.  
  4198.    -- Register F2 and F3 as accelerator keys
  4199.    buildacceltable activeaccel, 'john',  AF_VIRTUALKEY, VK_F2, 1000
  4200.    buildacceltable activeaccel, 'thomas',AF_VIRTUALKEY, VK_F3, 1001
  4201.  
  4202.    -- Register F4 and F5 as accelerator keys
  4203.    buildacceltable otheraccel, 'jason', AF_VIRTUALKEY, VK_F4, 1002
  4204.    buildacceltable otheraccel, 'larry', AF_VIRTUALKEY, VK_F5, 1003
  4205.  
  4206.    -- Make the "default" named accel table active.  Now F2 and F3
  4207.    -- are real accel keys,  when they are selected they will cause
  4208.    -- "processmenu" to be executed with id's of 1000 or 1001
  4209.    activateacceltable  activeaccel
  4210.  
  4211. -- In the E macro world, the defc PROCESSMENU is executed whenever
  4212. -- a WM_COMMAND message is received.   ARG(1) of PROCESSMENU contains
  4213. -- the command-id corresponding to the event that just took place.
  4214. -- If an accelerator key was the cause of the PROCESSMENU command,
  4215. -- ARG(1) will be the command-id registered during the corresponding
  4216. -- BuildAccelTable statement.
  4217. -- If a pull-down menu was selected then ARG(1) will be the command-id
  4218. -- registered during the corresponding BUILDMENUITEM statement.
  4219. defc processmenu
  4220.    universal activemenu, activeaccel
  4221.  
  4222.    -- arg(1) contains the command id specified as registered with
  4223.    -- either the BUILDMENUITEM, or BUILDACCELTABLE statements.
  4224.    cmdid = arg(1)
  4225.  
  4226.    -- First check if a usersting exists for this command-id in the
  4227.    -- active accel table.
  4228.    accelstr=queryaccelstring(activeaccel, cmdid)
  4229.    sayerror "querystring=<"accelstr"> cmdid=<"cmdid">"
  4230.  
  4231.    -- "flip-flop" active accel tables just for fun!
  4232.    if accelstr="thomas" then
  4233.       activeaccel="other"
  4234.       activateacceltable activeaccel
  4235.    endif
  4236.    if accelstr="jason" then
  4237.       activeaccel='default'
  4238.       activateacceltable activeaccel
  4239.    endif
  4240.  
  4241.    -- if an accel string was not found, try the menu manager.
  4242.    if accelstr="" then
  4243.       strip(querymenustring(activemenu,cmdid),"T",\0)
  4244.        -- execute user string after stripping off null terminating char
  4245.    endif
  4246.  
  4247.  
  4248. ΓòÉΓòÉΓòÉ 6.2. Building Menus from the Macro Language ΓòÉΓòÉΓòÉ
  4249.  
  4250. EPM allows user configurable pull down menus.  The menus are created from the 
  4251. macro language using a set of macro procedures: 
  4252.  
  4253. BuildSubMenu Adds an entry to the action bar. 
  4254.  
  4255. BuildMenuItem Adds an entry to an action bar submenu. 
  4256.  
  4257. ShowMenu  Activates an action bar . 
  4258.  
  4259. DeleteMenu Deletes an action bar, submenu, or menu item. 
  4260.  
  4261. QueryMenuString Returns the command associated with a menu item. 
  4262.  
  4263.  
  4264. ΓòÉΓòÉΓòÉ 6.2.1. Buildsubmenu ΓòÉΓòÉΓòÉ
  4265.  
  4266. The buildsubmenu command creates an option on the action bar.  If the option 
  4267. name already exists, then the command is appended to the existing option menu 
  4268. as a sub menu option. Although the menu is built internally, it is not seen 
  4269. until a 'showmenu' is issued. The syntax for a buildsubmenu command is: 
  4270.  
  4271.  
  4272.      buildsubmenu menu_name, subid, text, cmd, mis_style, mia_attr
  4273.  
  4274. menuname    where 'menuname' is a text string containing the name of your 
  4275.             particular menu.  (MAX. = 80 characters) 
  4276. subid       where 'subid' is a unique number within this particular menu to 
  4277.             define that sub-menu in question. (1-MAXINT) 
  4278. text        where 'text' is a string of text which is to appear in as the title 
  4279.             of that particular sub-menu. 
  4280. cmd         where 'cmd' is the editor defc that is to be executed when the 
  4281.             submenu is selected.  If the submenu has associated items then the 
  4282.             defc is not executed. 
  4283. mis_style   where 'mis_style' is a PM menu style. (See PM tech ref vol. 3 pages 
  4284.             59-60) 
  4285. mis_attr    where 'mis_attr' is a PM menu attribute. (See PM tech ref vol. 3 
  4286.             pages 59-60) 
  4287.  
  4288.  
  4289. ΓòÉΓòÉΓòÉ 6.2.2. Buildmenuitem ΓòÉΓòÉΓòÉ
  4290.  
  4291. The buildmenuitem command appends a menu item under an existing option on the 
  4292. action bar (which can be created with buildsubmenu). The syntax for 
  4293. buildmenuitem is: 
  4294.  
  4295.  
  4296.  
  4297.   buildmenuitem menu_name, subid, item_id, text, cmd, mis_style, mia_attr
  4298.  
  4299. menu_name   where 'menuname' is a string containing the name of your particular 
  4300.             menu.  (MAX. = 80 characters) 
  4301. subid       where 'subid' is a unique number within this particular menu to 
  4302.             define that sub-menu in question. (1-MAXINT) 
  4303. item_id     where 'item id' is a unique number within this particular menu to 
  4304.             define that menu-item in question. (1-MAXINT) 
  4305. text        where 'text' is a string of text which is to appear in as the title 
  4306.             of that particular sub-menu. 
  4307. cmd         where 'cmd' is the editor defc that is to be executed when the 
  4308.             submenu is selected. 
  4309. mis_style   where 'mis_style' is a PM menu style. (See PM tech ref vol. 3 pages 
  4310.             59-60) 
  4311. mis_attr    where 'mis_attr' is a PM menu attribute. (See PM tech ref vol. 3 
  4312.             pages 59-60) 
  4313.  
  4314.  
  4315. ΓòÉΓòÉΓòÉ 6.2.3. Showmenu ΓòÉΓòÉΓòÉ
  4316.  
  4317. Displays a prebuilt menu, built using 'buildsubmenu' and 'buildmenuitem'. The 
  4318. syntax for the showmenu command is: 
  4319.  
  4320.  
  4321.      showmenu menuname
  4322.  
  4323. menuname    where 'menuname' is a string containing the name of your particular 
  4324.             menu.  (MAX. = 80 characters) 
  4325.  
  4326. Note:  When a menu item is selected, the PROCESSMENU command (defined in 
  4327. STDCTRL.E) is called, with an argument of the itemid. PROCESSMENU retrieves the 
  4328. command associated with this itemid in the menu whose name is stored in the 
  4329. universal variable ACTIVEMENU, and then executes the retrieved command. 
  4330. Therefore, whenever a SHOWMENU is done, ACTIVEMENU should be set to the name of 
  4331. the menu that was shown. 
  4332.  
  4333.  
  4334. ΓòÉΓòÉΓòÉ 6.2.4. Deletemenu ΓòÉΓòÉΓòÉ
  4335.  
  4336. Deletes a named menu or a particular part of a named menu from the internal 
  4337. menu manager.  The syntax of the deletemenu command is: 
  4338.  
  4339.  
  4340.       deletemenu menuname, subid, itemid, itemonly
  4341.  
  4342. menuname    where 'menuname' is a string containing the name of your particular 
  4343.             menu.  (MAX. = 80 characters) 
  4344. subid       where 'subid' is the sub-menu that is to be deleted. To delete all 
  4345.             submenus set this parameter to 0. 
  4346. itemid      where 'item id' is the item to start deleting off a particular sub 
  4347.             menu.  To delete all menu items under a sub menu, set this 
  4348.             parameter to 0. 
  4349. itemonly    where 'itemonly' is true if it is desired to delete only the items 
  4350.             under a sub-menu but not the sub-menu itself. 
  4351.  
  4352.  
  4353. ΓòÉΓòÉΓòÉ 6.2.5. querymenustring ΓòÉΓòÉΓòÉ
  4354.  
  4355. Returns the command associated with a menu option. The syntax of the 
  4356. querymenustring command is: 
  4357.  
  4358.  
  4359.      cmd = querymenustring(menuname, subid)
  4360.  
  4361. cmd         where 'cmd' will contain the command associated with the menu 
  4362.             option requested. 
  4363. menuname    where 'menuname' is a string containing the name of the menu to be 
  4364.             queried. 
  4365. subid       where 'subid' is the sub-menu id number of the menu to be queried. 
  4366.  
  4367.  
  4368. ΓòÉΓòÉΓòÉ 6.2.6. sample menu addition ΓòÉΓòÉΓòÉ
  4369.  
  4370. This example shows a menu being added to the default action bar menu. It is 
  4371. defined as a DEFINIT in my MYSTUFF.E file. This means that each time a new edit 
  4372. window is initialized, the action bar option Compile will be added to the 
  4373. default action bar choices. Remember to recompile your editor to have this 
  4374. addition take effect. 
  4375.  
  4376.  
  4377.   defload
  4378.     universal defaultmenu
  4379.     buildsubmenu defaultmenu, 19, 'Compile', '', 0, 0
  4380.     buildmenuitem defaultmenu, 19, 911, 'Save', 'save', 0, 0
  4381.     buildmenuitem defaultmenu, 19, 912, 'Relink', 'relink test', 0, 0
  4382.     showmenu defaultmenu
  4383.  
  4384. Note that the numbers 19, 911, and 912 where chosen to insure that they are 
  4385. unique. 
  4386.  
  4387.  
  4388. ΓòÉΓòÉΓòÉ 6.3. Configuring the Mouse ΓòÉΓòÉΓòÉ
  4389.  
  4390. Power users may want to configure the mouse to meet their needs.  There are 
  4391. three base mouse sets that can be configured. See The EPM User's Guide for 
  4392. information on setting the constant my_Mousestyle to the desired value (1,2 or 
  4393. 3). This will change the basic mouse configuration styles.  You can also 
  4394. configure the mouse actions yourself.  To execute these use the built-in 
  4395. procedure REGISTER_MOUSEHANDLER. 
  4396.  
  4397. The REGISTER_MOUSHANDLER(IsGlobal, event, mcommand) command allows the binding 
  4398. of mouse actions to commands. Mouse actions can be global or local. Mouse 
  4399. actions will be processed as follows: 
  4400.  
  4401.  1. local mouse action definition (if defined) 
  4402.  2. else global mouse action definition (if defined) 
  4403.  3. else mouse action ignored. 
  4404.  
  4405. The variable IsGlobal determines whether the mouse action described is local or 
  4406. gloabl. The variable event determines the mouse action to be bound with the 
  4407. command listed in the variable mcommand. Event should be in the following 
  4408. format: 
  4409.  
  4410.         'key action state'
  4411.  
  4412. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  4413. following: 
  4414.  
  4415. BEGINDRAG           activates at the beginning of the drag 
  4416. CLICK               activates if a button (specified by key) is single clicked 
  4417. SECONDCLK           activates if a button (specified by key) is double clicked 
  4418.  
  4419. These actions must be capitalized and have exactly one space between the key 
  4420. and the state numbers. The state should be the sum of the following: 
  4421.  
  4422. 0 = no states active 
  4423. 1 = shift key active 
  4424. 2 = control key active 
  4425. 4 = alternate key active 
  4426.  
  4427. An Event should can also be of the following format: 
  4428.  
  4429.         'action'
  4430.  
  4431. where action must be one of the following: 
  4432.  
  4433. ENDDRAG             activates at the end of a drag 
  4434. CANCELDRAG          activates if a drag is cancelled 
  4435.  
  4436. These actions must be capitalized and unpadded by spaces. 
  4437.  
  4438. An example of a mouse action is: 
  4439.  
  4440. call register_mousehandler(0,'2 SECONDCLK 3','quit')
  4441.  
  4442. This would set the second click of button two on the mouse with the shift and 
  4443. control states activated to do a QUIT command. This key action would be bound 
  4444. locally to a particular file. Similarly, 
  4445.  
  4446. call register_mousehandler(1,'CANCELDRAG','SynthesizeVoice whoops')
  4447.  
  4448. would cause the 'SynthesizeVoice whoops' command to be invoked every time a 
  4449. drag was canceled in any file that did not have a local CANCELDRAG event 
  4450. handler defined. 
  4451.  
  4452. By combining several of these register_mousehandler statements together in a 
  4453. DEFLOAD statement, one can customize the mouse actions.  Note that the 
  4454. following defc commands are useful for helping define common mouse actions: 
  4455.  
  4456. o MH_BEGIN_MARK 
  4457. o MH_CANCEL_MARK 
  4458. o MH_END_MARK 
  4459. o HH_GOTOPOSITION 
  4460.  
  4461. See the section Commands Omitted From the User's Guide. for descriptions on 
  4462. these commands. 
  4463.  
  4464. An example use of these commands is: 
  4465.  
  4466.  
  4467.   defc mymouse
  4468.     register_mousehandler(0,'1 CLICK 2','MH_GOTOPOSITION')
  4469.     sayerror "New mouse command is in effect."
  4470.  
  4471. Compiling and linking this command into EPM will allow the new mouse action to 
  4472. be added when the command MYMOUSE is entered in the commandline dialog box. 
  4473. Then, whenever you hit a ctrl+left mouse button one click, the cursor will move 
  4474. to the mouse's position. 
  4475.  
  4476. If you want a series of events to happen, define a new command using defc. The 
  4477. following is an example: 
  4478.  
  4479.  
  4480.   defc mycmd
  4481.     getline txtline               -- get the current line
  4482.     'mh_gotoposition'             -- go to the mouse position
  4483.     insertline txtline            -- copy the line
  4484.     up                            -- move up to the new line
  4485.  
  4486.   defc mymouse
  4487.     register_mousehandler(0,'1 CLICK 2','mycmd')  -- set the mouse key
  4488.     sayerror "New mouse command is in effect."    -- show it worked
  4489.  
  4490. In this example, when compiled and linked, executing the command MYMOUSE will 
  4491. setup the ctrl+single button one click combination to copy the line the cursor 
  4492. is on, to the line the mouse is pointing to. See the file MOUSE.E for more 
  4493. examples of defining mouse actions. 
  4494.  
  4495. As you can see, the REGISTER_MOUSEHANDLER is a very powerful command that 
  4496. should be exploited to make the most of EPM and the mouse. 
  4497.  
  4498.  
  4499. ΓòÉΓòÉΓòÉ 6.4. Programming Hints ΓòÉΓòÉΓòÉ
  4500.  
  4501. Programming Hints 
  4502.  
  4503.  
  4504. ΓòÉΓòÉΓòÉ 6.4.1. Using REFRESH ΓòÉΓòÉΓòÉ
  4505.  
  4506. Advanced users may find themselves writing applications that rely heavily on 
  4507. the E programming language. In such applications the need may arise to have 
  4508. messages and actions update the screen while the macro continues in progress. 
  4509. Take the following example: 
  4510.  
  4511.  
  4512. defproc delay(time)=       -- procedure to slow things down
  4513.   totaltime=time * 100     -- this procedure represents the time consumed
  4514.   for i = 1 to totaltime   -- ... by calculations and E commands or
  4515.     j = i+5/3              -- ... external programs
  4516.   endfor
  4517.  
  4518. defc mycmd=
  4519.   'togglecontrol 8 1'           -- make sure the message bar is showing
  4520.   .messageline = "Stage one executing..."   -- this should trace
  4521.   call delay(4)                             -- ... the macro's execution
  4522.   .messageline = "Stage two executing..."
  4523.   call delay(4)
  4524.   .messageline = "Stage three executing..."
  4525.  
  4526. In this example, all the message appear very quickly as the message buffer 
  4527. empties at the end of the procedure and not throughout the procedure as was 
  4528. intended. This occurs because the compiler doesn't refresh the screen during 
  4529. the execution of the macro. Constantly refreshing the screen is very costly and 
  4530. would slow down the execution of EPM too much. To accomplish the goal (ie. have 
  4531. the messageline trace the execution) replace mycmd with: 
  4532.  
  4533.  
  4534.   defc mycmd=
  4535.     'togglecontrol 8 1'
  4536.     .messageline = "Stage one executing..."
  4537.     refresh
  4538.     call delay(4)
  4539.     .messageline = "Stage two executing..."
  4540.     refresh
  4541.     call delay(4)
  4542.     .messageline = "Stage three executing..."
  4543.     refresh
  4544.  
  4545. The new MYCMD will show the lines as they execute. All that was added was the 
  4546. internal statement REFRESHto cause a screen refresh. (By the way the command 
  4547. 'TOGGLECONTROL 8 0' will turn the messageline off). 
  4548.  
  4549.  
  4550. ΓòÉΓòÉΓòÉ 6.4.2. Using ECHO ΓòÉΓòÉΓòÉ
  4551.  
  4552. Debugging programs can sometimes be a rather tricky task. E is no exception. 
  4553. There is an internal procedure ECHO that can be inserted into programs to allow 
  4554. a command trace. Whenever a command is executed, it will first appear in a 
  4555. message dialog box. By keeping track of the commands the programmer can help 
  4556. trace down errors. 
  4557.  
  4558. There is also a defc front end for this internal command, allowing ECHO to be 
  4559. issued from the command line dialog box. 
  4560.  
  4561. Another useful debug tool is the messageNwait standard procedure. By placing 
  4562. messageNwaits one can view variables and create check points to verify the 
  4563. macro's execution. 
  4564.  
  4565.  
  4566. ΓòÉΓòÉΓòÉ 7. Linkable External Modules ΓòÉΓòÉΓòÉ
  4567.  
  4568. Linkable external modules. 
  4569.  
  4570.  
  4571. ΓòÉΓòÉΓòÉ 7.1. Introduction ΓòÉΓòÉΓòÉ
  4572.  
  4573. You can compile a group of .E files into an .EX file that is separate from the 
  4574. E.EX file, and yet still incorporate both into the editor. In other words, 
  4575. multiple .EX files can be loaded into the editor. Each .EX file can use up to 
  4576. 64K of p-code space. This means that there's effectively no limit on the total 
  4577. size of a user's compiled macros, as long as they can be broken into logical 
  4578. chunks ("modules") of less than 64K each. 
  4579.  
  4580. I'll use the DRAW feature as an example of the new reorganization of E via 
  4581. these linkable modules. We used to include the draw code into the base E.E so 
  4582. that it was always available, and always occupied 3410 bytes of p-code space. 
  4583. But in version 4.02, E.E omits the feature: 
  4584.  
  4585.    compile if EVERSION < '4.02'
  4586.     include 'slimdraw.e'
  4587.    compile endif
  4588. Instead, DRAW.E is compiled separately into its own .EX file. Now when you type 
  4589. draw in the command dialog box, EPM searches for DRAW.EX on disk, loads it into 
  4590. its own block of memory, and begins execution. The relocation of the draw code 
  4591. is transparent to the user, except for the slight delay of the disk search. 
  4592. Once the draw command is completed, the module is released again, to free up 
  4593. memory. 
  4594.  
  4595.  
  4596. ΓòÉΓòÉΓòÉ 7.2. Implicit Loading of External Modules ΓòÉΓòÉΓòÉ
  4597.  
  4598. External modules can be invoked implicitly, by simply issuing the name of the 
  4599. module as a command.  As in our previous example, the user (or a macro) can 
  4600. simply issue the DRAW command (F6). When E sees that the command is not in its 
  4601. base set, it will search the disk for an .EX file of the same name. The search 
  4602. follows the same rules as for shelling an external .EXE program: 
  4603.  
  4604. o It does not occur if AUTOSHELL is off. 
  4605.  
  4606. o The search path is: 
  4607.  
  4608.    - the current directory, 
  4609.    - the directories in PATH, 
  4610.    - the directories in EPMPATH, and 
  4611.    - E's directory. 
  4612.  
  4613. o An .EX file will be found before a .EXE or .CMD file, but after an internal 
  4614.   system command.  (That is, you can't name a module EDIT.EX because EDIT will 
  4615.   always be recognized first as an internal system command.) 
  4616. Upon activation of the module, its code contents will be executed in the 
  4617. following order: 
  4618.  
  4619. o DEFINIT will be executed first if it exists.  This will consist of minor 
  4620.   initialization tasks like predefining variables. 
  4621.  
  4622. o DEFMAIN will be executed.  This is the body of the command.  If you convert 
  4623.   an old macro to an external module, you'll usually rename its DEFC to 
  4624.   DEFMAIN.  For instance, when SLIMDRAW.E was converted to the module DRAW.E, 
  4625.   defc draw was changed to defmain. 
  4626.  
  4627. o DEFEXIT, if it exists, will be executed after DEFMAIN finishes. 
  4628.  
  4629. When a module is invoked implicitly, it is executed once and discarded.  All 
  4630. three sections -- DEFINIT, DEFMAIN, DEFEXIT -- are run in sequence, so the 
  4631. division makes little difference; you'd get the same results by lumping them 
  4632. all into DEFMAIN. 
  4633.  
  4634.  
  4635. ΓòÉΓòÉΓòÉ 7.3. Explicit Linking of External Modules ΓòÉΓòÉΓòÉ
  4636.  
  4637. For better control, you can explicitly load a module with the LINK and UNLINK 
  4638. statements.  The DRAW module can be linked by the statement: 
  4639.  
  4640.    link 'draw'
  4641. E will search the disk for the explicit filename DRAW.EX, without bothering to 
  4642. check for internal system commands or .EXE files. This gives you some minor 
  4643. advantages since an explicit search can be faster, and the module can have the 
  4644. same name as a system command (DIR.EX) or a DEFC compiled into your base set. 
  4645. But the primary advantage is a better control of the order of execution. 
  4646. DEFMAIN is not executed at all.  DEFINIT is executed at link time, and DEFEXIT 
  4647. at unlink time.  In the interim all the module's commands, procs, universal 
  4648. variables and keysets are available globally.  This will be important if 
  4649. procedures or variables are shared by several modules. 
  4650.  
  4651. Explicit linking to the draw module does NOT execute the DRAW command. In fact 
  4652. the DEFMAIN of such a module is never executed if it is explicitly linked. In 
  4653. order to execute the DRAW command under these conditions, you must define a 
  4654. defc draw. The following example shows how the new external draw module allows 
  4655. users to link to it implicitly and explicitly: 
  4656.  
  4657. definit
  4658.     /* initializations, global vars, etc. */
  4659.  
  4660. defmain
  4661.     'draw' arg(1)
  4662.  
  4663. defc draw
  4664.     /* code which implements DRAW command */
  4665.     /*   remains the same as when it was  */
  4666.     /*   included in E.E                  */
  4667.  
  4668. If you repeat a link of an already-linked module, no harm is done.  The disk is 
  4669. not searched again, but the module's DEFINIT is re-executed as if the module 
  4670. were reloaded from scratch. 
  4671.  
  4672. Note:  if your module has a DEFEXIT, don't use a STOP statement to end 
  4673. execution of DEFMAIN.  A STOP will permanently end the module's execution 
  4674. before getting to the DEFEXIT. 
  4675.  
  4676. Note:  The RC, universal return code variable, is set to the module number of 
  4677. the .ex file linked. 
  4678.  
  4679.  
  4680. ΓòÉΓòÉΓòÉ 7.4. Useful Commands ΓòÉΓòÉΓòÉ
  4681.  
  4682. Since LINK and UNLINK are statements, we had to redefine them as commands in 
  4683. order to give you access to explicit linking from the command dialog box. We 
  4684. also added a RELINK command. All of these commands are defined in the file 
  4685. LINKCMDS.E as follows: 
  4686.  
  4687.    defc link
  4688.       link arg(1)
  4689.  
  4690.    defc unlink
  4691.       unlink arg(1)
  4692. A combination of the two gives us the nifty RELINK command: 
  4693.  
  4694.    defc relink
  4695.       if arg() > 0 then
  4696.         modulename=arg(1)     -- if argument is given, then uses that
  4697.       else
  4698.         modulename=.filename  -- if no argument, then assume current file
  4699.         'save '||.filename    --   ... and save current file
  4700.       endif
  4701.       'etpm' modulename       -- Recompile it,
  4702.       unlink modulename       --   unlink the old version,
  4703.       link modulename         --     relink the new one.
  4704. This is very useful for fast development of macros, since you don't have to 
  4705. exit from the editor to compile revised macros and re-run the newly compiled 
  4706. version. You can relink a macro in a few seconds.  (RELINK DRAW, for example, 
  4707. takes 3 seconds on my AT. Understand that the slow step is the compilation; 
  4708. LINK and UNLINK are almost instantaneous.) 
  4709.  
  4710. When using LINK, UNLINK and RELINK as commands, you need not enclose the module 
  4711. name in quotes. For example, the statement link 'draw' is acceptable, but the 
  4712. command link 'draw' would be incorrect. The interpreter would assume that the 
  4713. name of the module was six characters and included the quotes. The correct 
  4714. syntax for the command (i.e. issued from the command line dialog box) is: 
  4715.  
  4716. link draw
  4717.  
  4718.  
  4719. ΓòÉΓòÉΓòÉ 7.5. Keysets ΓòÉΓòÉΓòÉ
  4720.  
  4721. Individual keys cannot be linked; you cannot define a single key (like def f1) 
  4722. in an external module.  You can however link a keyset, which is almost as easy, 
  4723. by following these steps: 
  4724.  
  4725.  1. Begin the key definitions with a DEFKEYS declaration: 
  4726.  
  4727.            In MYMODULE.E:
  4728.  
  4729.               defkeys mymodule_keys
  4730.               def f5=
  4731.                  sayerror 'F5 pressed'
  4732.  
  4733.  2. Compile the module: et mymodule. 
  4734.  
  4735.  3. Link it: link mymodule. 
  4736.  
  4737.  4. Execute a KEYS statement: keys mymodule_keys. The best place to put the 
  4738.     KEYS statement is in the module's DEFINIT so that it automatically gets 
  4739.     executed immediately after linking: 
  4740.  
  4741.               definit        -- Also in MYMODULE.E
  4742.                  keys mymodule_keys
  4743.  
  4744. It doesn't make much sense to define keys in a module that will be implicitly 
  4745. loaded.  An implicitly-loaded module will be run once and discarded; its keyset 
  4746. will not be retained long enough to be used. Instead you should explicitly link 
  4747. an external module with keyset definitions, so that its resources will stick 
  4748. around until released. 
  4749.  
  4750. Keysets are stored economically (as a linked list) so that a two-key keyset 
  4751. occupies only 8 bytes.  The expansion and overlaying onto a base keyset occur 
  4752. at run time, within the KEYS statement. 
  4753.  
  4754. Partial keysets can be defined usefully in external modules. edit_keys can be 
  4755. defined in the base module E.E, and mymodule_keys can be defined elsewhere. 
  4756. The overlaying occurs soon after the link (assuming you put a KEYS statement in 
  4757. MYMODULE's DEFINIT as recommended). We refer to the partial external keyset as 
  4758. an overlay keyset and edit_keys as the base. E will accept BASE as a synonym 
  4759. for NEW, and OVERLAY means the same thing as the absence of NEW.  The following 
  4760. are equivalent: 
  4761.  
  4762.    defkeys edit_keys new     =      defkeys edit_keys base
  4763.    defkeys c_keys            =      defkeys c_keys overlay
  4764.  
  4765. You can return to the base edit_keys either by executing keys edit_keys or by 
  4766. unlink 'mymodule'. When a module is unlinked, its keyset is automatically 
  4767. removed. 
  4768.  
  4769. Note:  That's true only for OVERLAY keysets.  E will complain if you try to 
  4770. unlink a module containing the current base keyset, since that would leave no 
  4771. keys at all.  You'd see the message Cannot unlink base keyset module. 
  4772.  
  4773. Note:  A base keyset (as defined by DEFKEYS BASE or NEW) is automatically given 
  4774. a starting set of the standard 128 ASCII keys, including 'A'-'Z', '0'-'9', and 
  4775. control keys.  Even if you don't give the keyset any DEF's, it will include the 
  4776. ASCII keys.  But some applications might not want those keys included, so 
  4777. another keyset attribute CLEAR has been added.  For example: 
  4778.  
  4779.    defkeys zero_keys base clear
  4780. defines a REALLY empty keyset. 
  4781.  
  4782.  
  4783. ΓòÉΓòÉΓòÉ 7.6. Multiple Definitions ΓòÉΓòÉΓòÉ
  4784.  
  4785. If a command (DEFC) of the same name is defined in more than one module, the 
  4786. highest (latest-linked) module wins.  The last-linked module can be regarded as 
  4787. the "current application", whose commands take precedence in case of name 
  4788. conflicts.  If the highest module is unlinked, commands in lower modules become 
  4789. available again. Keysets are similar.  If multiple modules define the same 
  4790. keyset name, the latest-linked module's keyset wins. 
  4791.  
  4792. If a procedure (DEFPROC) is defined in multiple modules, the definition in the 
  4793. caller's module (if any) wins, whether or not that module is the latest-linked. 
  4794. This is consistent with the concept of a current application. If module 3 calls 
  4795. myproc() and module 3 itself contains a defproc myproc(), that's certainly the 
  4796. one that the application writer intended to be called. 
  4797.  
  4798. If a procedure is multiply defined but none of the definitions are in the 
  4799. caller's module, an error Call: duplicated proc is issued. If a procedure is 
  4800. defined only once, that definition wins even if it isn't in the caller's 
  4801. module. 
  4802.  
  4803. To determine a module number, issue a QLINK command followed by the name of an 
  4804. E module already linked. For example: 
  4805.  
  4806.   QLINK EPM
  4807.  
  4808. would return module number zero (the lowest level) because it is always linked, 
  4809. and always the first module loaded. 
  4810.  
  4811. Universal variables can be declared in many different modules, all of which 
  4812. share the same data. A universal variable is not discarded as long as any 
  4813. active module references it.  Thus a module can initialize a variable and be 
  4814. unlinked, without the value being lost, as long as any other module needs it. 
  4815.  
  4816.  
  4817. ΓòÉΓòÉΓòÉ 7.7. E Applications ΓòÉΓòÉΓòÉ
  4818.  
  4819. Large applications are feasible in the E language. Dynamic linking, i.e. the 
  4820. ability to link a compiled module at run-time, makes it possible to distribute 
  4821. an application as a compiled .EX file.  Distributing object-code-only 
  4822. applications is possible. This is not recommended, as many programmers wish to 
  4823. be able to examine and adjust the source code of applications according to 
  4824. their own needs. However, this type of distribution would have its advantages. 
  4825. For example, this would make such an application much easier for the end-user 
  4826. to use. The user would simply have to: 
  4827.  
  4828.  1. copy it onto the hard disk, somewhere along the PATH, and 
  4829.  
  4830.  2. type its name as a command. 
  4831.  
  4832.     Note:  that's strictly true only for implicit loading. Complex applications 
  4833.     will usually require explicit LINK and UNLINK commands, but even those can 
  4834.     be given single-word front ends if desired; see MATH.E for examples. 
  4835. In addition, invoking it is fast: the time for a link equals a fraction of a 
  4836. second plus the path-search time.  (Path-search times can be minimized by 
  4837. explicit LINK commands with explicit file specs for the modules, like "link 
  4838. c:\epm\mymodule".) 
  4839.  
  4840. Another recent change to support compiled applications is that: EPM.EXE can run 
  4841. earlier-version .EX files.  If a developer releases an application as an 
  4842. object-code black box (compiled, say, with ET 4.03) it will still be runnable 
  4843. if and when the user upgrades EPM.EXE.  The versions of E and ETPM will not 
  4844. have to match, as long as E is more recent than the .EX file. (Assuming we 
  4845. don't make any more major structural revisions as we did in release 4.02.) 
  4846.  
  4847. If your application really must know the exact versions of E and ET it's 
  4848. working with, it can check two things: 
  4849.  
  4850. o EVERSION is a constant supplied automatically by ET.  It's a constant 
  4851.   attribute of the .EX file. The name EVERSION appears to be an unfortunate 
  4852.   choice in hindsight, since it's really ETVERSION. 
  4853.  
  4854. o A new function VER() provides EPM.EXE's version.  This will be the same 
  4855.   version number now shown by the VER command, but in function form so it's 
  4856.   queryable by a macro. 
  4857. Your application could do something like: 
  4858.  
  4859.    if ver() <> EVERSION then
  4860.       sayerror "Sorry, I can only run with EPM.EXE version "EVERSION"."
  4861.       stop
  4862.    endif
  4863.  
  4864. Note:  Advice to writers of add-on applications:  If you're writing a 
  4865. stand-alone E application, one that you'd like to compile separately and link 
  4866. in as an external module (which we recommend), feel free to include STDCONST.E 
  4867. because unused constants do not waste space now.  You should also try to 
  4868. include MYCNF.E to allow the user to pre-override your constants.  A catch-all 
  4869. header is: 
  4870.  
  4871.    include     'colors.e'
  4872.    include     'stdconst.e'
  4873.    tryinclude  'mycnf.e'
  4874. Your applications can check whether the user overrode your constants with 
  4875. compile if defined().  For example: 
  4876.  
  4877.    compile if not defined(AUTOSAVE_PATH)
  4878.       const AUTOSAVE_PATH=''
  4879.    compile endif
  4880. A similar technique allows your application to check whether it's being 
  4881. compiled as part of the base (by an INCLUDE) or as an external module (by a 
  4882. LINK).  Query the existence of any constant that's defined in the base, like 
  4883. SMALL. 
  4884.  
  4885.    compile if not defined(SMALL) -- are we separately compiled?
  4886.     include 'colors.e'           -- if so, must include color names
  4887.    compile endif
  4888.  
  4889. The file USERAPP.SMP, which is included in EMACROS.FLS, is a good example of a 
  4890. routine that tests to see if it's base or external; if external, sets 
  4891. configuration constants the same way they would be set if it were included in 
  4892. the base; and defines the routines it needs without duplicating anything that's 
  4893. included in the base macros. 
  4894.  
  4895.  
  4896. ΓòÉΓòÉΓòÉ 7.8. Dynamic Linking ΓòÉΓòÉΓòÉ
  4897.  
  4898. Dynamic linking is the delayed binding of application program external 
  4899. references to subroutines.  There are two forms of dynamic linking -- load time 
  4900. and run time. 
  4901.  
  4902. In load time dynamic linking, a program calls a dynamically linked routine just 
  4903. as it would any external routine.  When the program is assembled or compiled, a 
  4904. standard external reference is generated.  At link time, the programmer 
  4905. specifies one or more libraries which contain routines to satisfy external 
  4906. references.  External routines to be dynamically linked contain special 
  4907. definition records in the library.  A definition record tells the linker that 
  4908. the routine in question is to be dynamically linked and provides the linker 
  4909. with a dynamic link module name and entry name.  The module name is the name of 
  4910. a special executable file with the filename extension of .DLL which contains 
  4911. dynamic link entry points.  The linker stores module name/entry name pairs 
  4912. describing the dynamic link routines in the executable file created for the 
  4913. program. When the calling program is run, OS/2 loads the dynamic link routines 
  4914. from the modules specified and links the calling program to the called 
  4915. routines. 
  4916.  
  4917. For more information on Dynamic Linking see the OS/2 Technical Reference 
  4918. Manual. For an example of dynamic linking in E using the DYNALINK command see 
  4919. the DYNATEST.E file. 
  4920.  
  4921.  
  4922. ΓòÉΓòÉΓòÉ 7.9. Run-Time Error Messages for Linking and Keysets ΓòÉΓòÉΓòÉ
  4923.  
  4924. Call: duplicated proc 
  4925.                               A macro called a procedure that is not defined in 
  4926.                               the caller's module, but which is defined in more 
  4927.                               than one other module.  The caller can't decide 
  4928.                               which DEFPROC is the right one. 
  4929.  
  4930. Call: unknown proc 
  4931.                               A macro tried to call a procedure that is not 
  4932.                               defined in any module. Note that ET will now 
  4933.                               allow you to compile an .E file with unresolved 
  4934.                               procedure calls; it assumes some other module 
  4935.                               will supply the DEFPROC by the time the call 
  4936.                               occurs.  If that doesn't happen, this message is 
  4937.                               given at run-time. 
  4938.  
  4939. Cannot find keyset 
  4940.                               A macro tried to execute a KEYS statement with an 
  4941.                               unknown keyset name. Perhaps the module 
  4942.                               containing the keyset (the DEFKEYS) has not been 
  4943.                               linked. 
  4944.  
  4945. Cannot unlink base keyset module 
  4946.                               You tried to unlink the module that selected the 
  4947.                               current base keyset. What keys would be left 
  4948.                               after the unlink? 
  4949.  
  4950. Cannot unlink module in use 
  4951.                               A macro tried to unlink the same module it was 
  4952.                               contained in.  Or it tried to unlink a calling 
  4953.                               module (one that must be kept around for 
  4954.                               returning to). Only modules which are not 
  4955.                               involved in the current chain of execution can be 
  4956.                               unlinked.  You can produce this message by the 
  4957.                               command 'UNLINK E' which tries to unlink E.EX. 
  4958.  
  4959. Invalid EX file or incorrect version 
  4960.                               You tried to link to a file that does not have 
  4961.                               the proper .EX format expected, or you tried to 
  4962.                               link to an .EX file that was compiled with a past 
  4963.                               version of the ET translator. 
  4964.  
  4965. Link: file not found 
  4966.                               You probably misspelled the module's filename in 
  4967.                               a LINK statement. The filename.EX could not be 
  4968.                               found in the current directory or along the PATH. 
  4969.  
  4970. Link: invalid filename 
  4971.                               The module name is poorly formed in a link 
  4972.                               statement, for example with multiple periods or 
  4973.                               colons.  This is an unusual error; normally 
  4974.                               you'll get "Link: file not found". 
  4975.  
  4976. Unlink: bad module filename 
  4977.                               You tried to unlink a module that does not exist 
  4978.                               on disk. 
  4979.  
  4980. Unlink: unknown module 
  4981.                               You tried to unlink a module that is not 
  4982.                               currently linked, although it does exist on the 
  4983.                               disk. 
  4984.  
  4985.  
  4986. ΓòÉΓòÉΓòÉ 8. E Language Syntax ΓòÉΓòÉΓòÉ
  4987.  
  4988. In this appendix the syntax of the E language is presented in a modified EBNF 
  4989. notation. For those who are unfamiliar with this form, a brief summary of its 
  4990. symbolic conventions are presented here: 
  4991.  
  4992. Keywords of the E language are printed here entirely in capital letters. All 
  4993. program components (non-terminals) whose definition is included in this section 
  4994. are highlighted in a bold font. All other literals (i.e. those strings that 
  4995. should be included in an E phrase exactly as they appear here in the syntax) 
  4996. are enclosed with single or double quotes. Any other character in the syntax is 
  4997. used as a symbol to convey the following meanings: 
  4998.  
  4999. A B       represents the concatenation of A AND B. 
  5000. (A | B)   represents either expression A OR expression B. 
  5001. [ A ]     represents an optional occurrence of expression A: zero or one 
  5002.           occurrence. 
  5003. { A }     represents zero or more occurrences of expression A. 
  5004. 'a'..'z'  represents: 'a' OR 'b' OR 'c' ... OR 'z' 
  5005.  
  5006.  
  5007. ΓòÉΓòÉΓòÉ 8.1. Syntax Notes ΓòÉΓòÉΓòÉ
  5008.  
  5009.  1. A semicolon is treated the same as a new line.  Wherever you see ';' in the 
  5010.     following listing, a line-break (a 'newline', CR-LF) is acceptable. Several 
  5011.     examples of line breaks were given in the earlier section Line 
  5012.     Continuations. 
  5013.  
  5014.  2. Quoted strings in syntax descriptions below indicate that the enclosed 
  5015.     string is not a keyword in the language.  Quoted strings (ex. 'filename') 
  5016.     below are not case specific. 
  5017.  
  5018.  3. For speed reasons the lexer does not return a space token for space and tab 
  5019.     characters. Syntax descriptions have been written without space tokens for 
  5020.     convenience. 
  5021.  
  5022.  4. Strings may not cross file or line boundaries. 
  5023.  
  5024.  5. Comments may not cross file boundaries.   There are three styles of 
  5025.     comments.    /*  */  may be nested and may cross line boundaries.    ; 
  5026.     in column 1 makes the rest of line a comment.    --    in any column makes 
  5027.     the rest of line a comment. 
  5028.  
  5029.  6. Include files may be nested. 
  5030.  
  5031.  7. Implied concatenation expressions with comments between have undefined 
  5032.     values.       'a'  /* comment */'b'    Undefined value 
  5033.  
  5034.  8. Identifiers are not case sensitive. 
  5035.  
  5036.  9. Compiler directives (COMPILE IF and INCLUDEs) are included in the following 
  5037.     listing, but cannot be sufficiently explained with this limited syntactical 
  5038.     depiction. Be aware that they can occur anywhere a semicolon or newline 
  5039.     can. For a more in depth discussion, see section Compiler Directive 
  5040.     Statements. 
  5041.  
  5042.  
  5043. ΓòÉΓòÉΓòÉ 8.2. The Syntax ΓòÉΓòÉΓòÉ
  5044.  
  5045. Syntax of the E language. 
  5046.  
  5047.  
  5048. ΓòÉΓòÉΓòÉ 8.2.1. e_program ΓòÉΓòÉΓòÉ
  5049.  
  5050. e_program ::=  definition_group 
  5051.  
  5052.  
  5053. ΓòÉΓòÉΓòÉ 8.2.2. definition_group ΓòÉΓòÉΓòÉ
  5054.  
  5055. definition_group ::=   definition  {definition} 
  5056.  
  5057.  
  5058. ΓòÉΓòÉΓòÉ 8.2.3. definition ΓòÉΓòÉΓòÉ
  5059.  
  5060. definition ::=  DEF  keyname {','{';'} keyname} ['=']   global_decl_group 
  5061. statement_group   [RETURN] 
  5062.  
  5063. | DEFC  identifier {',' identifier} ['=']   global_decl_group  statement_group 
  5064. [RETURN [expression] ] 
  5065.  
  5066. | DEFEXIT {';'} global_decl_group  statement_group 
  5067.  
  5068. | DEFINIT {';'} global_decl_group  statement_group 
  5069.  
  5070. | DEFKEYS  identifier [NEW | BASE | OVERLAY | CLEAR] 
  5071.  
  5072. | DEFMAIN {';'} global_decl_group  statement_group 
  5073.  
  5074. | DEFPROC identifier ['('{';'} formal_decl_group')']   global_decl_group 
  5075. statement_group   [RETURN [expression] ] 
  5076.  
  5077. | SET 'cursors' ['=']  number 
  5078.  
  5079. | SET 'insert_state' ['='] 0 | 1 
  5080.  
  5081. | CONST  {';'} const_decl_group 
  5082.  
  5083. | compiler_directive 
  5084.  
  5085. | ';' 
  5086.  
  5087.  
  5088. ΓòÉΓòÉΓòÉ 8.2.4. compiler_directive ΓòÉΓòÉΓòÉ
  5089.  
  5090. compiler_directive  INCLUDE  string ';' 
  5091.  
  5092. | TRYINCLUDE  string ';' 
  5093.  
  5094. | COMPILE IF constant_expression { ';' }     ( statement_group | 
  5095. definition_group )   {COMPILE ELSEIF constant_expression { ';' }     ( 
  5096. statement_group | definition_group ) }   [COMPILE ELSE  { ';' }     ( 
  5097. statement_group | definition_group ) ]   COMPILE ENDIF 
  5098.  
  5099.  
  5100. ΓòÉΓòÉΓòÉ 8.2.5. formal_decl_group ΓòÉΓòÉΓòÉ
  5101.  
  5102. formal_decl_group ::=  formal_declaration { {';'} [','] {';'} 
  5103. formal_declaration } 
  5104.  
  5105.  
  5106. ΓòÉΓòÉΓòÉ 8.2.6. formal_declaration ΓòÉΓòÉΓòÉ
  5107.  
  5108. formal_declaration ::=  [VAR]  identifier 
  5109.  
  5110.  
  5111. ΓòÉΓòÉΓòÉ 8.2.7. const_decl_group ΓòÉΓòÉΓòÉ
  5112.  
  5113. const_decl_group ::=  { constant_declaration {';'} (';' | ',') {';'} } 
  5114.  
  5115.  
  5116. ΓòÉΓòÉΓòÉ 8.2.8. constant_declaration ΓòÉΓòÉΓòÉ
  5117.  
  5118. constant_declaration ::=  identifier '='  expression 
  5119.  
  5120.  
  5121. ΓòÉΓòÉΓòÉ 8.2.9. global_decl_group ΓòÉΓòÉΓòÉ
  5122.  
  5123. global_decl_group ::=  {global_declaration {';'} } 
  5124.  
  5125.  
  5126. ΓòÉΓòÉΓòÉ 8.2.10. global_declaration ΓòÉΓòÉΓòÉ
  5127.  
  5128. global_declaration ::=  UNIVERSAL {';'}  identifier ['*']  {';'} {',' {';'} 
  5129. identifier } 
  5130.  
  5131.  
  5132. ΓòÉΓòÉΓòÉ 8.2.11. keyname ΓòÉΓòÉΓòÉ
  5133.  
  5134. keyname ::=  " ' " printable_char " ' " 
  5135.  
  5136. | " ' " printable_char " ' " '-' " ' "printable_char " ' " 
  5137.  
  5138. Although ETPM will accept all key definitions, some may seem not to take effect 
  5139. because PM intercepts these keys before EPM sees them. For a list of these keys 
  5140. see PM Keys. 
  5141.  
  5142. | 'backspace' 
  5143.  
  5144. | 'keydown' 
  5145.  
  5146. | 'keyend' 
  5147.  
  5148. | 'keyenter' 
  5149.  
  5150. | 'keyleft' 
  5151.  
  5152. | 'keyright' 
  5153.  
  5154. | 'keytab' 
  5155.  
  5156. | 'keyup' 
  5157.  
  5158. | 'space' 
  5159.  
  5160. | 'del' 
  5161.  
  5162. | 'end' 
  5163.  
  5164. | 'tab' 
  5165.  
  5166. | 'up' 
  5167.  
  5168. | 'enter' 
  5169.  
  5170. | 'entry' 
  5171.  
  5172. | 'esc' 
  5173.  
  5174. | 'f1'..'f12' 
  5175.  
  5176. | 'down' 
  5177.  
  5178. | 'home' 
  5179.  
  5180. | 'ins' 
  5181.  
  5182. | 'left' 
  5183.  
  5184. | 'pgdn' 
  5185.                                | 'pagedown' 
  5186.  
  5187. | 'pgup' 
  5188.                                | 'pageup' 
  5189.  
  5190. | 'right' 
  5191.  
  5192. | 'padenter' 
  5193.                                | 'pad_enter' 
  5194.  
  5195. | 's_f1'..'s_f12' 
  5196.  
  5197. | 's_tab' 
  5198.  
  5199. | 's_backspace' 
  5200.  
  5201. | 's_enter' 
  5202.  
  5203. | 's_esc' 
  5204.  
  5205. | 's_pgup' 
  5206.                                | 's_pageup' 
  5207.  
  5208. | 's_pgdn' 
  5209.                                | 's_pagedown' 
  5210.  
  5211. | 's_end' 
  5212.  
  5213. | 's_home' 
  5214.  
  5215. | 's_left' 
  5216.  
  5217. | 's_up' 
  5218.  
  5219. | 's_right' 
  5220.  
  5221. | 's_down' 
  5222.  
  5223. | 's_ins' 
  5224.  
  5225. | 's_del' 
  5226.  
  5227. | 's_padenter' 
  5228.  
  5229. | 's_space 
  5230.  
  5231. | 'a_0'..'a_9' 
  5232.  
  5233. | 'a_a'..'a_z' 
  5234.  
  5235. | 'a_f1'..'a_f12' 
  5236.  
  5237. | 'a_enter' 
  5238.  
  5239. | 'a_padenter' 
  5240.  
  5241. | 'a_backspace' 
  5242.  
  5243. | 'a_space' 
  5244.  
  5245. | 'a_minus' 
  5246.  
  5247. | 'a_equal' 
  5248.  
  5249. | 'a_leftbracket' 
  5250.  
  5251. | 'a_rightbracket' 
  5252.  
  5253. | 'a_tab' 
  5254.  
  5255. | 'a_quote' 
  5256.  
  5257. | 'a_comma' 
  5258.  
  5259. | 'a_period' 
  5260.  
  5261. | 'a_slash' 
  5262.  
  5263. | 'a_semicolon' 
  5264.  
  5265. | 'a_backslash' 
  5266.  
  5267. | 'c_0'..'c_9' 
  5268.  
  5269. | 'c_a'..'c_z' 
  5270.  
  5271. | 'c_f1'..'c_f12' 
  5272.  
  5273. | 'c_backslash' 
  5274.  
  5275. | 'c_backspace' 
  5276.  
  5277. | 'c_keyenter' 
  5278.  
  5279. | 'c_pagdown' 
  5280.                                | 'c_pgdn' 
  5281.  
  5282. | 'c_pageup' 
  5283.                                | 'c_pgup' 
  5284.  
  5285. | 'c_space' 
  5286.  
  5287. | 'c_quote' 
  5288.  
  5289. | 'c_comma' 
  5290.  
  5291. | 'c_period' 
  5292.  
  5293. | 'c_slash' 
  5294.  
  5295. | 'c_semicolon' 
  5296.  
  5297. | 'c_equal' 
  5298.  
  5299. | 'c_del' 
  5300.  
  5301. | 'c_down' 
  5302.  
  5303. | 'c_end' 
  5304.  
  5305. | 'c_enter' 
  5306.  
  5307. | 'c_home' 
  5308.  
  5309. | 'c_ins' 
  5310.  
  5311. | 'c_left' 
  5312.  
  5313. | 'c_leftbracket' 
  5314.  
  5315. | 'c_minus' 
  5316.  
  5317. | 'c_prtsc' 
  5318.  
  5319. | 'c_right' 
  5320.  
  5321. | 'c_rightbracket' 
  5322.  
  5323. | 'c_tab' 
  5324.  
  5325. | 'c_up' 
  5326.  
  5327. | 'c_padenter' 
  5328.                                | 'c_pad_enter' 
  5329.  
  5330. | 'otherkeys' 
  5331.                                | 'other_keys' 
  5332.  
  5333.  
  5334. ΓòÉΓòÉΓòÉ 8.2.12. statement_group ΓòÉΓòÉΓòÉ
  5335.  
  5336. statement_group ::=  { {';'}  statement ';' {';'} } 
  5337.  
  5338.  
  5339. ΓòÉΓòÉΓòÉ 8.2.13. statement ΓòÉΓòÉΓòÉ
  5340.  
  5341. statement ::=  assignment_statement 
  5342.  
  5343. | built-in_statement 
  5344.  
  5345. | conditional_statement 
  5346.  
  5347. | parse_statement 
  5348.  
  5349. | compiler_directive 
  5350.  
  5351. | procedure_call 
  5352.  
  5353. |  " ' "command" ' " All commands used in an E program must be quoted, e.g. 
  5354. if new=0 then       'edit' 
  5355.  
  5356.  
  5357. ΓòÉΓòÉΓòÉ 8.2.14. assignment_statement ΓòÉΓòÉΓòÉ
  5358.  
  5359. assignment_statement ::=  designator '=' expression 
  5360.  
  5361.  
  5362. ΓòÉΓòÉΓòÉ 8.2.15. designator ΓòÉΓòÉΓòÉ
  5363.  
  5364. designator ::=  identifier 
  5365.  
  5366. | identifier '.'  field 
  5367.  
  5368. | '.'  field 
  5369.  
  5370. | built-in_universal_variable 
  5371.  
  5372.  
  5373. ΓòÉΓòÉΓòÉ 8.2.16. field ΓòÉΓòÉΓòÉ
  5374.  
  5375. field ::=  'autosave' 
  5376.  
  5377. | 'col' 
  5378.  
  5379. | 'cursorx' 
  5380.  
  5381. | 'cursory' 
  5382.  
  5383. | 'dragcolor' 
  5384.  
  5385. | 'dragstyle' 
  5386.  
  5387. | 'dragthreshholdx' 
  5388.  
  5389. | 'dragthreshholdy' 
  5390.  
  5391. | 'filename' 
  5392.  
  5393. | 'fontheight' 
  5394.  
  5395. | 'fontwidth' 
  5396.  
  5397. | 'keyset' 
  5398.  
  5399. | 'last' 
  5400.  
  5401. | 'line' 
  5402.  
  5403. | 'lockhandle' 
  5404.  
  5405. | 'margins' 
  5406.  
  5407. | 'markcolor' 
  5408.  
  5409. | 'messagecolor' 
  5410.  
  5411. | 'messageline' 
  5412.  
  5413. | 'modify' 
  5414.  
  5415. | 'mousex' 
  5416.  
  5417. | 'mousey' 
  5418.  
  5419. | 'statuscolor' 
  5420.  
  5421. | 'statusline' 
  5422.  
  5423. | 'tabs' 
  5424.  
  5425. | 'textcolor' 
  5426.  
  5427. | 'userstring' 
  5428.  
  5429. | 'visible' 
  5430.  
  5431. | 'windowheight' 
  5432.  
  5433. | 'windowwidth' 
  5434.  
  5435. | 'windowx' 
  5436.  
  5437. | 'windowy' 
  5438.  
  5439.  
  5440. ΓòÉΓòÉΓòÉ 8.2.17. built-in_universal_variable ΓòÉΓòÉΓòÉ
  5441.  
  5442. built-in_universal_variable ::= CENTER_SEARCH 
  5443.  
  5444. | FUNCTIONKEYTEXT 
  5445.  
  5446. | JOIN_AFTER_WRAP 
  5447.  
  5448. | RC 
  5449.  
  5450. | EXIT_AFTER_LAST_FILE 
  5451.  
  5452. | TWO_SPACES 
  5453.  
  5454.  
  5455. ΓòÉΓòÉΓòÉ 8.2.18. built-in_statement ΓòÉΓòÉΓòÉ
  5456.  
  5457. built-in_statement ::= See individual statement. 
  5458.  
  5459.  
  5460. ΓòÉΓòÉΓòÉ 8.2.19. conditional_statement ΓòÉΓòÉΓòÉ
  5461.  
  5462. conditional_statement ::=  DO  i=expression  TO  expression [BY expression] 
  5463. statement_group  [LEAVE] [ITERATE] statement_group  (END | ENDDO) 
  5464.  
  5465. | DO FOREVER   statement_group  [LEAVE] [ITERATE] statement_group  (END | 
  5466. ENDDO) 
  5467.  
  5468. | DO WHILE expression   statement_group  [LEAVE] [ITERATE] statement_group 
  5469. (END | ENDDO) 
  5470.  
  5471. | FOR i=expression TO expression [BY expression]   statement_group  [LEAVE] 
  5472. [ITERATE] statement_group  ENDFOR 
  5473.  
  5474. | IF expression { ';' } THEN statement_group   {ELSEIF expression { ';' } THEN 
  5475. statement_group}   [ELSE statement_group]  { ';' }  ENDIF 
  5476.  
  5477. | LOOP   statement_group  [LEAVE] [ITERATE] statement_group  ENDLOOP 
  5478.  
  5479. | WHILE expression { ';' } DO   statement_group  [LEAVE] [ITERATE] 
  5480. statement_group  ENDWHILE 
  5481.  
  5482.  
  5483. ΓòÉΓòÉΓòÉ 8.2.20. parse_statement ΓòÉΓòÉΓòÉ
  5484.  
  5485. parse_statement ::=  PARSE ARG  {string | +number | -number |number | 
  5486. identifier } 
  5487.  
  5488. | PARSE VALUE expression   WITH {string | +number | -number |number | 
  5489. identifier } 
  5490.  
  5491.  
  5492. ΓòÉΓòÉΓòÉ 8.2.21. expression ΓòÉΓòÉΓòÉ
  5493.  
  5494. expression ::=  simple_expression [relation simple_expression] 
  5495.  
  5496.  
  5497. ΓòÉΓòÉΓòÉ 8.2.22. simple_expression ΓòÉΓòÉΓòÉ
  5498.  
  5499. simple_expression ::=  term  {operator  term} 
  5500.  
  5501.  
  5502. ΓòÉΓòÉΓòÉ 8.2.23. term ΓòÉΓòÉΓòÉ
  5503.  
  5504. term ::=  numeric_term 
  5505.  
  5506. | string 
  5507.  
  5508. | unary_operator term 
  5509.  
  5510. | '(' expression ')' 
  5511.  
  5512.  
  5513. ΓòÉΓòÉΓòÉ 8.2.24. arithmetic_expression ΓòÉΓòÉΓòÉ
  5514.  
  5515. arithmetic_expression ::=  arithmetic_term {arithmetic_operator 
  5516. arithmetic_term} 
  5517.  
  5518.  
  5519. ΓòÉΓòÉΓòÉ 8.2.25. arithmetic_term ΓòÉΓòÉΓòÉ
  5520.  
  5521. arithmetic_term ::=  '('arithmetic_expression')' 
  5522.  
  5523. | number 
  5524.  
  5525. | hex_number 
  5526.  
  5527. | octal_number 
  5528.  
  5529. | [numeric_unary_operator] arithmetic_term 
  5530.  
  5531.  
  5532. ΓòÉΓòÉΓòÉ 8.2.26. numeric_expression ΓòÉΓòÉΓòÉ
  5533.  
  5534. numeric_expression ::=  numeric_term {numeric_operator  numeric_term} 
  5535.  
  5536.  
  5537. ΓòÉΓòÉΓòÉ 8.2.27. numeric_term ΓòÉΓòÉΓòÉ
  5538.  
  5539. numeric_term ::=  number 
  5540.  
  5541. | designator 
  5542.  
  5543. | '('numeric_expression')' 
  5544.  
  5545. | procedure_call 
  5546.  
  5547. | numeric_unary_operator numeric_term 
  5548.  
  5549.  
  5550. ΓòÉΓòÉΓòÉ 8.2.28. string_expression ΓòÉΓòÉΓòÉ
  5551.  
  5552. string_expression ::=  string 
  5553.  
  5554. | designator 
  5555.  
  5556. | procedure_call 
  5557.  
  5558.  
  5559. ΓòÉΓòÉΓòÉ 8.2.29. constant_expression ΓòÉΓòÉΓòÉ
  5560.  
  5561. constant_expression ::=   simple_constant_expression  [ relation 
  5562. simple_constant_expression ] 
  5563.  
  5564.  
  5565. ΓòÉΓòÉΓòÉ 8.2.30. simple_constant_expression ΓòÉΓòÉΓòÉ
  5566.  
  5567. simple_constant_expression ::=   constant_term { operator  constant_term } 
  5568.  
  5569.  
  5570. ΓòÉΓòÉΓòÉ 8.2.31. constant_term ΓòÉΓòÉΓòÉ
  5571.  
  5572. constant_term ::=   number 
  5573.  
  5574. | designator 
  5575.  
  5576. | '('simple_constant_expression')' 
  5577.  
  5578. | unary_operator  constant_term 
  5579.  
  5580. | string 
  5581.  
  5582.  
  5583. ΓòÉΓòÉΓòÉ 8.2.32. relation ΓòÉΓòÉΓòÉ
  5584.  
  5585. relation ::=  '==' 
  5586.  
  5587. | '/==' 
  5588.  
  5589. | '=' 
  5590.  
  5591. | '<>' 
  5592.  
  5593. | '<=' 
  5594.  
  5595. | '>=' 
  5596.  
  5597. | '<' 
  5598.  
  5599. | '>' 
  5600.  
  5601.  
  5602. ΓòÉΓòÉΓòÉ 8.2.33. operator ΓòÉΓòÉΓòÉ
  5603.  
  5604. operator ::=  numeric_operator 
  5605.  
  5606. | AND 
  5607.  
  5608. | '&' 
  5609.  
  5610. | OR 
  5611.  
  5612. | '|' 
  5613.  
  5614. | '||' 
  5615.  
  5616. | spaces 
  5617.  
  5618.  
  5619. ΓòÉΓòÉΓòÉ 8.2.34. spaces ΓòÉΓòÉΓòÉ
  5620.  
  5621. spaces ::=  (' '|'\t')  spaces 
  5622.  
  5623.  
  5624. ΓòÉΓòÉΓòÉ 8.2.35. numeric_operator ΓòÉΓòÉΓòÉ
  5625.  
  5626. numeric_operator ::=  arithmetic_operator 
  5627.  
  5628. | '//' 
  5629.  
  5630. | '%' 
  5631.  
  5632.  
  5633. ΓòÉΓòÉΓòÉ 8.2.36. arithmetic_operator ΓòÉΓòÉΓòÉ
  5634.  
  5635. arithmetic_operator ::=  '+' 
  5636.  
  5637. | '-' 
  5638.  
  5639. | '*' 
  5640.  
  5641. | '/' 
  5642.  
  5643.  
  5644. ΓòÉΓòÉΓòÉ 8.2.37. unary_operator ΓòÉΓòÉΓòÉ
  5645.  
  5646. unary_operator ::=  NOT 
  5647.  
  5648. | numeric_unary_operator 
  5649.  
  5650.  
  5651. ΓòÉΓòÉΓòÉ 8.2.38. numeric_unary_operator ΓòÉΓòÉΓòÉ
  5652.  
  5653. numeric_unary_operator ::=  '+' 
  5654.  
  5655. | '-' 
  5656.  
  5657.  
  5658. ΓòÉΓòÉΓòÉ 8.2.39. procedure_call ΓòÉΓòÉΓòÉ
  5659.  
  5660. procedure_call ::=  user_defined_proc_call 
  5661.  
  5662. | built-in_proc_call 
  5663.  
  5664.  
  5665. ΓòÉΓòÉΓòÉ 8.2.40. user_defined_proc_call ΓòÉΓòÉΓòÉ
  5666.  
  5667. user_defined_proc_call ::=  identifier '(' [expression_list] ')' 
  5668.  
  5669.  
  5670. ΓòÉΓòÉΓòÉ 8.2.41. built-in_proc_call ΓòÉΓòÉΓòÉ
  5671.  
  5672. built-in_proc_call ::= See individual procedure. 
  5673.  
  5674.  
  5675. ΓòÉΓòÉΓòÉ 8.2.42. command ΓòÉΓòÉΓòÉ
  5676.  
  5677. command ::=  macro-defined_command 
  5678.  
  5679. | internal_command 
  5680.  
  5681. | dos_command 
  5682.  
  5683.  
  5684. ΓòÉΓòÉΓòÉ 8.2.43. internal_command ΓòÉΓòÉΓòÉ
  5685.  
  5686. internal_command ::=  NUMBER 
  5687.  
  5688. |  '+' [number] 
  5689.  
  5690. |  '-' [number] 
  5691.  
  5692. | 'C/' unquoted_string '/' unquoted_string '/' ['-'] ['+'] ['*'] ['m'] ['a'] 
  5693. ['c'] ['e'] ['r'] ['f'] ['g'] 
  5694.  
  5695. | ( 'E' | 'ED' | 'EDIT' )  {['/d'] ['/e'] ['/n'] ['='] unquoted_string} 
  5696. [quoted_string] 
  5697.  
  5698. | ( 'F' | 'FILE' ) ['/t'] [unquoted_string] 
  5699.  
  5700. | ( 'L/' | '/' ) unquoted_string '/' unquoted_string'/' ['-'] ['+'] ['m'] ['a'] 
  5701. ['c'] ['e'] ['r'] ['f'] ['g'] 
  5702.  
  5703. | ( 'MA' | 'MARGINS' ) [number_list3] 
  5704.  
  5705. | ( 'N' | 'NAME' ) [unquoted_string] 
  5706.  
  5707. | ( 'O' | 'OPEN' ) {[ options ] filespec } 
  5708.  
  5709. | 'OS2' string_expression 
  5710.  
  5711. | ( 'Q' | 'QUIT' ) 
  5712.  
  5713. | ( 'S' | 'SAVE' ) ['/t'] [unquoted_string] 
  5714.  
  5715. | 'TABS' number_list3 
  5716.  
  5717. | 'VER' 
  5718.  
  5719. | 'XCOM' internal_command 
  5720.  
  5721.  
  5722. ΓòÉΓòÉΓòÉ 8.2.44. macro-defined_command ΓòÉΓòÉΓòÉ
  5723.  
  5724. macro-defined_command ::=  'ADD' 
  5725.  
  5726. | 'ALL' '/' searchstring ['/'][c] 
  5727.  
  5728. | ( 'APPEND' | 'APP' ) [unquoted_string] 
  5729.  
  5730. | 'ASC' ( character ) 
  5731.  
  5732. | 'AUTOSAVE' [ ( number | 'on' | 'off') ] 
  5733.  
  5734. | 'AUTOSAVEDLG' 
  5735.  
  5736. | 'AUTOSHELL' ( ['0' | '1' ] ) 
  5737.  
  5738. | ( 'BOTTOM' | 'BOT' ) 
  5739.  
  5740. | 'BOX' ('1' | '2' | '3' | '4' | '5' | '6' | 'C' | 'P' | 'A' | 'E' | 'R' | 
  5741. '/'character) 
  5742.  
  5743. | 'BROWSE' ( ['ON' | 'OFF' | '?'] ) 
  5744.  
  5745. | 'CD'  [unquoted_string] 
  5746.  
  5747. | ( 'CHANGE' | 'C' )  '/' find_text '/' replace_text ['/' [-] [+] [*] [M] [A] 
  5748. [C] [E] [R] [F] [G] ] 
  5749.  
  5750. | 'CHANGEDLG' 
  5751.  
  5752. | 'CENTER' 
  5753.  
  5754. | 'CHR' number 
  5755.  
  5756. | 'CLOSE' 
  5757.  
  5758. | 'COMMANDLINE [ string_expression ] 
  5759.  
  5760. | 'CUT' 
  5761.  
  5762. | 'DIR' [ path ] 
  5763.  
  5764. | 'DOLINES' 
  5765.  
  5766. | 'DPATH' 
  5767.  
  5768. | 'DRAW' ('1' | '2' | '3' | '4' | '5' | '6' | 'B' | '/'character) 
  5769.  
  5770. | 'ECHO' ('on' | 'off') 
  5771.  
  5772. | ( 'ETPM' | 'ET' ) ['/e' unquoted_string] ['/u'] 
  5773.  
  5774.   [unquoted_string  [unquoted_string] ] 
  5775.  
  5776. | 'EXPAND' ['on' | 'off'] 
  5777.  
  5778. | 'FILL' character 
  5779.  
  5780. | 'FINDDLG' 
  5781.  
  5782. | ( 'FINDFILE' | 'FILEFIND' ) unquoted_string 
  5783.  
  5784. | 'GET' unquoted_string 
  5785.  
  5786. | 'HELP' 
  5787.  
  5788. | 'KEY' ( number ' ' character ) 
  5789.  
  5790. | 'LINK' ( filespec ) 
  5791.  
  5792. | 'LIST' [unquoted_string] 
  5793.  
  5794. | 'LOCK' ( [ filespec ] ) 
  5795.  
  5796. | 'LOOPKEY' ( number | 'all' ) 
  5797.  
  5798. | 'LOWERCASE' 
  5799.  
  5800. | 'MARGINSDLG' 
  5801.  
  5802. | 'MARKWORD' 
  5803.  
  5804. | 'MATCHTAB' ['on' | 'off'] 
  5805.  
  5806. | 'MATH' arithmetic_expression 
  5807.  
  5808. | 'MATHO' arithmetic_expression 
  5809.  
  5810. | 'MATHX' arithmetic_expression 
  5811.  
  5812. | 'MESSAGEBOX' 
  5813.  
  5814. | 'MULT' 
  5815.  
  5816. | 'OPENDLG' 
  5817.  
  5818. | 'PASTE' 
  5819.  
  5820. | 'PATH' 
  5821.  
  5822. | 'PRINT' [ printer_name ] 
  5823.  
  5824. | 'PROCESSBREAK' 
  5825.  
  5826. | 'PROOF' 
  5827.  
  5828. | 'PROOFWORD' 
  5829.  
  5830. | 'PUT' [unquoted_string] 
  5831.  
  5832. | 'QCONTROL' idnum 
  5833.  
  5834. | ( 'QDATE' | 'QD' ) 
  5835.  
  5836. | ( 'QL' | 'QLINK' | 'QLINKED' ) 
  5837.  
  5838. | ( 'QUIETSHELL' | 'QS' ) 
  5839.  
  5840. | ( 'QTIME' | 'QT' ) 
  5841.  
  5842. | 'RC' command 
  5843.  
  5844. | 'RELINK'  [ filename ] 
  5845.  
  5846. | 'SET' 
  5847.  
  5848. | 'SETSCROLLS' 
  5849.  
  5850. | ( 'SORT' | 'SORTDLL' )  [ 'R' ] [ 'C' ] 
  5851.  
  5852. | 'STAY' ( 'ON' | 'OFF' ) 
  5853.  
  5854. | 'STDFILE_READ' 
  5855.  
  5856. | 'STDFILE_WRITE' 
  5857.  
  5858. | 'TABS' { numeric_expression } 
  5859.  
  5860. | 'TOGGLECONTROL' numeric_expression [, '0' | '1' ] 
  5861.  
  5862. | 'TOGGLEFONT' 
  5863.  
  5864. | 'TOP' 
  5865.  
  5866. | 'UNLINK' [ filespec ] 
  5867.  
  5868. | 'UNLOCK' filespec 
  5869.  
  5870. | 'UPPERCASE' 
  5871.  
  5872. | 'VOL' 
  5873.  
  5874.  
  5875. ΓòÉΓòÉΓòÉ 8.2.45. dos_command ΓòÉΓòÉΓòÉ
  5876.  
  5877. dos_command ::=  Any command recognized and interpreted by the current 
  5878. operating system, whether that is DOS or OS/2. 
  5879.  
  5880.  
  5881. ΓòÉΓòÉΓòÉ 8.2.46. expression_list ΓòÉΓòÉΓòÉ
  5882.  
  5883. expression_list ::=  expression { {';'} [','] {';'} expression } 
  5884.  
  5885.  
  5886. ΓòÉΓòÉΓòÉ 8.2.47. identifier ΓòÉΓòÉΓòÉ
  5887.  
  5888. identifier ::=  letter {letter |  digit | '_' } 
  5889.  
  5890.  
  5891. ΓòÉΓòÉΓòÉ 8.2.48. identifier_list ΓòÉΓòÉΓòÉ
  5892.  
  5893. identifier_list ::=  identifier [spaces  identifier [spaces  identifier [spaces 
  5894. identifier . . . ] ] ] 
  5895.  
  5896.  
  5897. ΓòÉΓòÉΓòÉ 8.2.49. unquoted_string ΓòÉΓòÉΓòÉ
  5898.  
  5899. unquoted_string ::=  {character} 
  5900.  
  5901.  
  5902. ΓòÉΓòÉΓòÉ 8.2.50. string ΓòÉΓòÉΓòÉ
  5903.  
  5904. string ::=  " ' " {character} " ' " 
  5905.  
  5906. | ' " ' {character} ' " ' 
  5907.  
  5908. | esc_code 
  5909.  
  5910.  
  5911. ΓòÉΓòÉΓòÉ 8.2.51. letter ΓòÉΓòÉΓòÉ
  5912.  
  5913. letter ::=  'a' .. 'z' | 'A' .. 'Z' 
  5914.  
  5915.  
  5916. ΓòÉΓòÉΓòÉ 8.2.52. character ΓòÉΓòÉΓòÉ
  5917.  
  5918. character ::=  any character whose ASCII value is between 0 and 255 
  5919.  
  5920.  
  5921. ΓòÉΓòÉΓòÉ 8.2.53. printable_char ΓòÉΓòÉΓòÉ
  5922.  
  5923. printable_char ::=  any character whose ASCII value is between 0 and 255 
  5924.  
  5925.  
  5926. ΓòÉΓòÉΓòÉ 8.2.54. esc_code ΓòÉΓòÉΓòÉ
  5927.  
  5928. esc_code ::=  '\' ('n' | 't' | 'b' | 'r' | 'f') 
  5929.  
  5930. | '\'  digit [digit [digit] ] 
  5931.  
  5932. | '\'x  hex_digit [hex_digit] 
  5933.  
  5934.  
  5935. ΓòÉΓòÉΓòÉ 8.2.55. hex_number ΓòÉΓòÉΓòÉ
  5936.  
  5937. hex_number ::=  'x'hex_digit {hex_digit} 
  5938.  
  5939.  
  5940. ΓòÉΓòÉΓòÉ 8.2.56. octal_number ΓòÉΓòÉΓòÉ
  5941.  
  5942. octal_number ::=  'o'octal_digit {octal_digit} 
  5943.  
  5944.  
  5945. ΓòÉΓòÉΓòÉ 8.2.57. octal_digit ΓòÉΓòÉΓòÉ
  5946.  
  5947. octal_digit ::=  '0'..'7' 
  5948.  
  5949.  
  5950. ΓòÉΓòÉΓòÉ 8.2.58. hex_digit ΓòÉΓòÉΓòÉ
  5951.  
  5952. hexdigit ::=  (number | 'a' .. 'f' | 'A' .. 'F' ) 
  5953.  
  5954.  
  5955. ΓòÉΓòÉΓòÉ 8.2.59. number ΓòÉΓòÉΓòÉ
  5956.  
  5957. number ::=  digit{digit} 
  5958.  
  5959.  
  5960. ΓòÉΓòÉΓòÉ 8.2.60. digit ΓòÉΓòÉΓòÉ
  5961.  
  5962. digit ::=  '0' .. '9' 
  5963.  
  5964.  
  5965. ΓòÉΓòÉΓòÉ 8.2.61. number_list2 ΓòÉΓòÉΓòÉ
  5966.  
  5967. number_list2 ::=  number  [spaces  number] 
  5968.  
  5969.  
  5970. ΓòÉΓòÉΓòÉ 8.2.62. number_list3 ΓòÉΓòÉΓòÉ
  5971.  
  5972. number_list3 ::=  number  [spaces  number  [ spaces  number] ] 
  5973.  
  5974.  
  5975. ΓòÉΓòÉΓòÉ 8.2.63. number_list4 ΓòÉΓòÉΓòÉ
  5976.  
  5977. number_list4 ::=  number  [spaces  number  [ spaces  number  [spaces  number] ] 
  5978.  
  5979.  
  5980. ΓòÉΓòÉΓòÉ 9. Summary of Keywords, Procedures, Variables, and Keys ΓòÉΓòÉΓòÉ
  5981.  
  5982. Summary of keywords, procedures, variables and keys. 
  5983.  
  5984.  
  5985. ΓòÉΓòÉΓòÉ 9.1. Built-in Statement and Procedure Summary ΓòÉΓòÉΓòÉ
  5986.  
  5987. In this section all of E's internal procedure and statements are listed 
  5988. followed by a brief description.  See Built-in Statements and Procedures for 
  5989. more complete descriptions and parameters.  Procedures are followed by 
  5990. parentheses and can return values. Statements have no parentheses, return 
  5991. nothing, and generally perform some operation on the screen. Both statements 
  5992. and procedures can be followed by arguments.  Procedure arguments must within 
  5993. the parentheses. 
  5994.  
  5995. ABBREV() 
  5996.                     returns 1 if one string is an abbreviation of another 
  5997. ACTIVATEFILE 
  5998.                     makes a file the current file 
  5999. ADJUSTBLOCK 
  6000.                     moves a marked area by overlaying 
  6001. ADJUST_BLOCK 
  6002.                     same as ADJUSTBLOCK 
  6003. ADJUSTMARK 
  6004.                     same as ADJUSTBLOCK for any marked type 
  6005. ADJUST_MARK 
  6006.                     same as ADJUSTMARK 
  6007. ARG() 
  6008.                     returns an argument 
  6009. ASC() 
  6010.                     determins an ASCII value 
  6011. ATOI() 
  6012.                     converts a string to integer 
  6013. ATOL() 
  6014.                     converts a string to a long integer 
  6015. ATTRIBUTE_ACTION 
  6016.                     does an attribute action 
  6017. BACKTAB 
  6018.                     moves cursor to previous tab 
  6019. BACKTABWORD 
  6020.                     moves cursor to beginning of last word 
  6021. BACKTAB_WORD 
  6022.                     same as BACKTABWORD 
  6023. BEEP() 
  6024.                     emits a noise 
  6025. BEGINLINE 
  6026.                     moves cursor to beginning of line 
  6027. BEGIN_LINE 
  6028.                     same as BEGINLINE 
  6029. BOT 
  6030.                     goes to the bottom of the file 
  6031. BOTTOM 
  6032.                     same as BOT 
  6033. BEGINLINE 
  6034.                     moves cursor to beginning of the line 
  6035. BEGIN_LINE 
  6036.                     same as BEGIN_LINE 
  6037. BROWSE() 
  6038.                     turns browse mode on/off 
  6039. BUFFER() 
  6040.                     allows shared buffers 
  6041. BUILDMENUITEM 
  6042.                     builds an action bar menu item 
  6043. BUILDSUBMENU 
  6044.                     builds an action bar sub menu item 
  6045. CALL 
  6046.                     executes a procedure 
  6047. CENTER 
  6048.                     centers a string in a given length field 
  6049. CENTRE 
  6050.                     centers a string in a given length field 
  6051. CHR() 
  6052.                     finds the character from an ASCII value 
  6053. COMPARE 
  6054.                     compares two strings; returns the character position of the 
  6055.                     first difference 
  6056. COPIES 
  6057.                     returns n copies of the given string 
  6058. COPYMARK 
  6059.                     copies marked to text to the cursor pos. 
  6060. COPY_MARK 
  6061.                     same as COPYMARK 
  6062. DELETE 
  6063.                     deletes the line the cursor is on 
  6064. DELETECHAR 
  6065.                     deletes the character under the cursor 
  6066. DELETE_CHAR 
  6067.                     same as DELETECHAR 
  6068. DELETELINE 
  6069.                     deletes a line of text 
  6070. DELETEMARK 
  6071.                     removes marked text 
  6072. DELETE_MARK 
  6073.                     same as DELETEMARK 
  6074. DELETEMENU 
  6075.                     removes an action bar menu item or subitem 
  6076. DELSTR 
  6077.                     deletes a substring of a string 
  6078. DELWORD 
  6079.                     deletes a phrase from a string 
  6080. DIRECTORY( [path]) 
  6081.                     returns current directory; if path is given, changes 
  6082.                     current directory first 
  6083. DISPLAY 
  6084.                     allows screen updating etc. to be toggled 
  6085. DO 
  6086.                     start of an iteration routine 
  6087. DO_ARRAY 
  6088.                     handles arrays in E 
  6089. DO_OVERLAYWINDOWS 
  6090.                     is undisclosed 
  6091. DOWN 
  6092.                     moves the cursor down a line 
  6093. DYNAFREE() 
  6094.                     releases a dynalink library 
  6095. DYNALINK() 
  6096.                     allows PM calls thru C code 
  6097. DYNALINKC() 
  6098.                     same as DYNALINK but in C format 
  6099. ECHO() 
  6100.                     performs a command execution trace 
  6101. ENDLINE 
  6102.                     moves the cursor to the end of line 
  6103. END_LINE 
  6104.                     same as ENDLINE 
  6105. ERASEENDLINE 
  6106.                     erases text to the end of line 
  6107. ERASE_END_LINE 
  6108.                     same as ERASEENDLINE 
  6109. EXECUTE 
  6110.                     executes the command dialog box 
  6111. EXECUTEKEY 
  6112.                     executes the key specified 
  6113. EXIT 
  6114.                     exits from the current macro 
  6115. FILESINRING 
  6116.                     returns the number of files in the ring 
  6117. FILESIZE 
  6118.                     returns the sum of the lengths of all lines in the file 
  6119. FILLMARK 
  6120.                     fills the marked area 
  6121. FILL_MARK 
  6122.                     same as FILLMARK 
  6123. FINDFILE 
  6124.                     finds a file path 
  6125. FOR 
  6126.                     begining of an iterative loop 
  6127. GETFILEID 
  6128.                     gets a file id number 
  6129. GETKEYSTATE() 
  6130.                     gets the shift state of keys 
  6131. GET_KEY_STATE 
  6132.                     same as GETKEYSTATE 
  6133. GETLINE 
  6134.                     returns the current text line 
  6135. GETMARK 
  6136.                     gets the type of mark 
  6137. GETPMINFO() 
  6138.                     returns PM information 
  6139. GETSEARCH 
  6140.                     saves the last search string 
  6141. GET_SEARCH 
  6142.                     same as SETSEARCH 
  6143. HEX() 
  6144.                     returns the hex value of a char. 
  6145. IF - THEN - ELSE 
  6146.                     the beginning of a conditional stmt. 
  6147. INCLUDE 
  6148.                     includes another E file 
  6149. INSERT 
  6150.                     inserts a blank line 
  6151. INSERT_ATTRIBUTE 
  6152.                     inserts an attribute 
  6153. INSERTLINE 
  6154.                     inserts a line at a specified location 
  6155. INSERTSTATE() 
  6156.                     returns insert/replace mode 
  6157. INSERT_STATE() 
  6158.                     same as INSERTSTATE() 
  6159. INSERTSTR 
  6160.                     inserts a string into another string 
  6161. INSERTTOGGLE 
  6162.                     toggles the insert/replace modes 
  6163. INSERT_TOGGLE 
  6164.                     same as INSERTTOGGLE 
  6165. ITERATE 
  6166.                     part of a repeat loop 
  6167. ITOA() 
  6168.                     converts a integer to string 
  6169. JOIN 
  6170.                     joins two lines 
  6171. KEY 
  6172.                     executes the key specified 
  6173. KEYIN 
  6174.                     enters text into the file 
  6175. KEYS 
  6176.                     actives a keyset name 
  6177. LASTERROR() 
  6178.                     returns the last error code 
  6179. LAST_ERROR() 
  6180.                     same as LASTERROR 
  6181. LASTKEY() 
  6182.                     returns the last key hit 
  6183. LASTPOS() 
  6184.                     finds text in the file 
  6185. LEAVE 
  6186.                     leaves a repetitive loop 
  6187. LEFT 
  6188.                     moves the cursor one column left 
  6189. LEFTSTR() 
  6190.                     returns the leftmost n characters of a string 
  6191. LENGTH() 
  6192.                     retuns the length of a string 
  6193. LEXAM() 
  6194.                     access the dictionary functions 
  6195. LINK 
  6196.                     links an .EX module into EPM 
  6197. LINKED() 
  6198.                     returns if a module is linked 
  6199. LONGESTLINE() 
  6200.                     returns the length of the longest line in the file 
  6201. LOOP 
  6202.                     a iterative looping command 
  6203. LOWCASE() 
  6204.                     lowers the case on a string 
  6205. LTOA() 
  6206.                     converts a string to a long integer 
  6207. MACHINE() 
  6208.                     returns the type of Operating System 
  6209. MARKBLOCK 
  6210.                     issues a block-type mark 
  6211. MARK_BLOCK 
  6212.                     same as a MARKBLOCK 
  6213. MARKCHAR 
  6214.                     issues a character-type mark 
  6215. MARK_CHAR 
  6216.                     same as a MARKCHAR 
  6217. MARKLINE 
  6218.                     issues a line-type mark 
  6219. MARK_LINE 
  6220.                     same as a MARKLINE 
  6221. MARKTYPE() 
  6222.                     returns the marktype set 
  6223. MEMCPYX() 
  6224.                     copies information from one memory location to another 
  6225. MOUSE_SETPOINTER 
  6226.                     sets the mouse pointer 
  6227. MOVEMARK 
  6228.                     moves marked text to the cursor pos. 
  6229. MOVE_MARK 
  6230.                     same as MOVEMARK 
  6231. NEXTFILE 
  6232.                     actives the next file in the ring 
  6233. NEXT_FILE 
  6234.                     same as NEXTFILE 
  6235. OFFSET() 
  6236.                     returns the offset in binary 
  6237. OFS() 
  6238.                     returns the offset in a string format 
  6239. OVERLAY 
  6240.                     allows the overlay of strings 
  6241. OVERLAYBLOCK 
  6242.                     copies marked text without inserting 
  6243. OVERLAY_BLOCK 
  6244.                     same as OVERLAY_BLOCK 
  6245. PAGEDOWN 
  6246.                     moves the cursor one page down 
  6247. PAGE_DOWN 
  6248.                     same as PAGEDOWN 
  6249. PAGEUP 
  6250.                     moves the cursor one page up 
  6251. PAGE_UP 
  6252.                     same as PAGEUP 
  6253. PARSE 
  6254.                     parses a string 
  6255. PEEK() 
  6256.                     looks up a memory location value 
  6257. PEEKZ() 
  6258.                     returns an ASCIIZ string from memory 
  6259. POKE() 
  6260.                     inserts a value into a memory location 
  6261. PREVFILE 
  6262.                     moves to the previous file 
  6263. QUERY_ATTRIBUTE 
  6264.                     determines the attribute type set 
  6265. QUERYMENUSTRING 
  6266.                     get the command associated with an menu option 
  6267. QUERYPROFILE() 
  6268.                     gets a string from OS2.INI 
  6269. QUIETSHELL 
  6270.                     allows an OS/2 command to be executed 
  6271. REFLOW 
  6272.                     reformats text 
  6273. REFRESH 
  6274.                     updates the screen 
  6275. RELINK 
  6276.                     compiles and links .E modules 
  6277. REPEATFIND 
  6278.                     finds the next occurrence of a search 
  6279. REPEAT_FIND 
  6280.                     same as REPEATFIND 
  6281. REPLACELINE 
  6282.                     replaces a line with new text 
  6283. RETURN 
  6284.                     returns an expression to the caller 
  6285. REVERSE() 
  6286.                     returns the reverse of a string 
  6287. RIGHT 
  6288.                     moves the cursor one column right 
  6289. RIGHTSTR() 
  6290.                     returns the rightmost n characters of a string 
  6291. RUBOUT 
  6292.                     deletes the character to the left 
  6293. SAYAT 
  6294.                     writes text at a location on the screen 
  6295. SAY_AT 
  6296.                     same as SAYAT 
  6297. SAYERROR 
  6298.                     displays an error code or a message 
  6299. SAYERROR() 
  6300.                     displays a message 
  6301. SAYERRORTEXT() 
  6302.                     returns the error message associated with a given error 
  6303.                     code 
  6304. SCREENHEIGHT() 
  6305.                     returns the screen height 
  6306. SCREENWIDTH() 
  6307.                     returns the screen width 
  6308. SEG() 
  6309.                     returns the segment address as a string 
  6310. SELECTOR() 
  6311.                     returns the segment address in binary 
  6312. SETPROFILE() 
  6313.                     sets a string in OS2.INI 
  6314. SETSEARCH 
  6315.                     sets the search command string 
  6316. SET_SEARCH 
  6317.                     same as SETSEARCH 
  6318. SHIFTLEFT 
  6319.                     shifts marked text one position left 
  6320. SHIFT_LEFT 
  6321.                     same as SHIFTLEFT 
  6322. SHIFTRIGHT 
  6323.                     shifts marked text one position right 
  6324. SHIFT_RIGHT 
  6325.                     same as SHIFTRIGHT 
  6326. SHOWMENU 
  6327.                     displays a newly built action bar menu 
  6328. SPLIT 
  6329.                     splits a line of text into two lines 
  6330. STOP 
  6331.                     stops execution of a macro 
  6332. STOPONRC 
  6333.                     stops only if RC is non-zero 
  6334. STOP_ON_RC 
  6335.                     same as STOPONRC 
  6336. STRIP() 
  6337.                     strips away extra spaces 
  6338. SUBSTR() 
  6339.                     returns a sub-string from within a string 
  6340. SUBWORD 
  6341.                     returns a phrase from a string 
  6342. TAB 
  6343.                     moves to the next tab stop 
  6344. TABWORD 
  6345.                     moves to the beginning of the next word 
  6346. TAB_WORD 
  6347.                     same as TABWORD 
  6348. TEXTLINE() 
  6349.                     gets the contents of the indicated line 
  6350. TOP 
  6351.                     moves to the top of the file 
  6352. TRANSLATE() 
  6353.                     translates a string according to a given translate table 
  6354. TRYINCLUDE 
  6355.                     attempts to include a .E file 
  6356. UNDO 
  6357.                     undoes changes on a line 
  6358. UNLINK 
  6359.                     removes a .EX module from EPM 
  6360. UNMARK 
  6361.                     unmarks text 
  6362. UP 
  6363.                     moves the cursor up one key 
  6364. UPCASE() 
  6365.                     converts a string to upper case 
  6366. VER() 
  6367.                     returns the version number 
  6368. VERIFY() 
  6369.                     makes sure a string is valid in a set 
  6370. WINMESSAGEBOX() 
  6371.                     does a Dynalink call to the PM WinMessageBox function 
  6372. WORD() 
  6373.                     returns the nthe word of a string 
  6374. WORDINDEX() 
  6375.                     returns the character position of a word in a string 
  6376. WORDLENGTH() 
  6377.                     returns the length of a word in a string 
  6378. WORDPOS() 
  6379.                     returns the position of a phrase in a string 
  6380. WORDS() 
  6381.                     returns the number of words in a string 
  6382. WHILE 
  6383.                     a conditional repetitive statement 
  6384.  
  6385.  
  6386. ΓòÉΓòÉΓòÉ 9.2. Command Summary ΓòÉΓòÉΓòÉ
  6387.  
  6388. These commands can be issued from within the command line dialog box or from 
  6389. within a program. When used within the E language they must be surrounded by 
  6390. quotation marks. For example: 
  6391.  
  6392.   `CD'
  6393. or
  6394.   `CD C:\EPM\FILES'
  6395. or
  6396.   `CD` mypath
  6397.  
  6398. In the first example the macro command CD will be executed as if the user typed 
  6399. it in on the command line dialog. In the second example CD was issued with an 
  6400. argument. And in the third example, the argument was a variable name. For more 
  6401. information on the commands and their syntax see The EPM User's Guide and 
  6402. Commands Omitted From the User's Guide in this manual. 
  6403.  
  6404. #### 
  6405.                     goes to line number #### 
  6406. + [####] 
  6407.                     moves cursor forward #### lines. 
  6408. -  [####] 
  6409.                     moves cursor backward #### lines. 
  6410. /find_string/[options] 
  6411.                     same as 'L' command 
  6412. ACTIVATEFILEID 
  6413.                     activates the file specified 
  6414. ADD 
  6415.                     adds a marked block of numbers 
  6416. ALL 
  6417.                     if included, it finds all occurrences of a given string in 
  6418.                     the current file 
  6419. APP 
  6420.                     appends marked text to a file 
  6421. APPEND 
  6422.                     same as APP 
  6423. ASC 
  6424.                     determines the ASCII value of a char. 
  6425. AUTOSAVE 
  6426.                     sets the AUTOSAVE field value 
  6427. AUTOSAVEDLG 
  6428.                     brings up the AUTOSAVE dialog box 
  6429. AUTOSHELL 
  6430.                     turns AUTOSHELLing on or off 
  6431. BOT 
  6432.                     goes to the bottom of the file 
  6433. BOTTOM 
  6434.                     same as BOT 
  6435. BOX 
  6436.                     draws a box of specified style around block mark. (See 
  6437.                     BOX.E) 
  6438. BROWSE 
  6439.                     make the file read-only or read-write 
  6440.                     changes text strings 
  6441. CD 
  6442.                     changes the default drive/path 
  6443. CENTER 
  6444.                     centers marked text 
  6445. CHANGE 
  6446.                     same as C 
  6447. CHANGEDLG 
  6448.                     brings up the change dialog box 
  6449. CHR 
  6450.                     displays the character associated 
  6451. CLEARSHARBUFF 
  6452.                     clears the shared buffer 
  6453. CLOSE 
  6454.                     closes files in the ring 
  6455. COMMANDLINE 
  6456.                     brings up the command line dialog box 
  6457. COPY2DMBUFF 
  6458.                     copies marked area to "Delete Mark" buffer 
  6459. COPY2SHARBUFF 
  6460.                     copies marked area to shared buffer 
  6461. CURSOROFF 
  6462.                     turns the cursor off 
  6463. CUT 
  6464.                     moves marked text to the shared buffer 
  6465. DIR 
  6466.                     lists the directory in a temp. file 
  6467. DOLINES 
  6468.                     executes the current line or marked lines 
  6469. DPATH 
  6470.                     shows the DPATH setting 
  6471. DRAW 
  6472.                     enters draw mode 
  6473. DUPMARK 
  6474.                     executes a mark action specified 
  6475. ECHO 
  6476.                     turns command trace on 
  6477.                     edit a file 
  6478. ED 
  6479.                     same as E 
  6480. EDIT 
  6481.                     same as E and ED 
  6482. ET 
  6483.                     invoke the compiler 
  6484. ETPM 
  6485.                     same as ET 
  6486. EXPAND 
  6487.                     turns syntax expansion on/off 
  6488.                     saves and quit the current file 
  6489. FILE 
  6490.                     same as F 
  6491. FILEFIND 
  6492.                     attempts to find a file 
  6493. FILL 
  6494.                     fills the marked block with a character 
  6495. FINDDLG 
  6496.                     invokes the find dialog box 
  6497. FINDFILE 
  6498.                     same as FILEFIND 
  6499. GET 
  6500.                     gets the file into the current file 
  6501. GETDMBUFF 
  6502.                     gets text from the delete mark buffer 
  6503. GETSHARBUFF 
  6504.                     gets text from the shared buffer 
  6505. HELP 
  6506.                     brings up EPM help 
  6507. KEY 
  6508.                     allows the repeat of a key or macro 
  6509.                     searches for text 
  6510. LINK 
  6511.                     links an .EX module into EPM 
  6512. LIST 
  6513.                     same as FILEFIND and FINDFILE 
  6514. LOADDEFAULTMENU 
  6515.                     loads the default action bar menu 
  6516. LOCK 
  6517.                     prevents other users from updating a file 
  6518. LOOPKEY 
  6519.                     repeats a key in a vertical direction 
  6520. LOWERCASE 
  6521.                     converts marked text into lowercase 
  6522. MA 
  6523.                     sets/displays the margin settings 
  6524. MARGINS 
  6525.                     same as MA 
  6526. MARGINSDLG 
  6527.                     brings up the margins dialog box 
  6528. MARKWORD 
  6529.                     marks the word under the mouse pointer 
  6530. MATCHTAB 
  6531.                     sets tab stops to the words in the line above 
  6532. MATH 
  6533.                     computes an expression in base 10 
  6534. MATHO 
  6535.                     computes an expression in base 8 
  6536. MATHX 
  6537.                     computes an expression in base 16 
  6538. MESSAGEBOX 
  6539.                     brings up the message review dialog box 
  6540. MH_BEGIN_MARK 
  6541.                     mouse handler begin mark 
  6542. MH_CANCEL_MARK 
  6543.                     mouse hander cancel mark 
  6544. MH_END_MARK 
  6545.                     mouse handler end mark 
  6546. MH_GOTOPOSITION 
  6547.                     mouse handler go to position 
  6548. MULT 
  6549.                     multiplies the numbers in a marked area 
  6550.                     renames the current file 
  6551. NAME 
  6552.                     same as N 
  6553.                     loads a file into a new window 
  6554. OPEN 
  6555.                     same as O 
  6556. OPENDLG 
  6557.                     brings up the OPEN dialog box 
  6558. OS2 
  6559.                     executes an OS/2 command 
  6560. PASTE 
  6561.                     copies text from the shared buffer 
  6562. PATH 
  6563.                     displays the path settings 
  6564. PRINT 
  6565.                     prints a marked area or whole file 
  6566. PROCESSBREAK 
  6567.                     stops a macro in progress 
  6568. PROOF 
  6569.                     initiates spell checking 
  6570. PROOFWORD 
  6571.                     spell checks the current word 
  6572. PUT 
  6573.                     writes the marked text to a file 
  6574. QCONTROL 
  6575.                     determines the status of windows 
  6576. QD 
  6577.                     returns the current date 
  6578. QDATE 
  6579.                     same as QD 
  6580. QL 
  6581.                     determines if a module is linked 
  6582. QLINK 
  6583.                     same as QL 
  6584. QLINKED 
  6585.                     same as QL and QLINK 
  6586. QS 
  6587.                     executes an OS/2 command w/ no results 
  6588. QUIETSHELL 
  6589.                     same as QS 
  6590. QT 
  6591.                     displays the time 
  6592. QTIME 
  6593.                     same as QT 
  6594.                     quits the current file 
  6595. QUIT 
  6596.                     same as Q 
  6597. RC 
  6598.                     returns the error code of a command 
  6599. RELINK 
  6600.                     compiles and links and E module 
  6601.                     saves a file to disk 
  6602. SAVE 
  6603.                     same as S 
  6604. SET 
  6605.                     displays all SET parameters in a temp. file 
  6606. SETSCROLLS 
  6607.                     turns the scroll bars on/off 
  6608. SORT 
  6609.                     sorts marked text or the whole file 
  6610. SORTDLL 
  6611.                     same as SORT 
  6612. STAY 
  6613.                     sets whether to move on a find & replace 
  6614. STDFILE_READ 
  6615.                     reads in from standard input stream 
  6616. STDFILE_WRITE 
  6617.                     writes out the the standard output stream 
  6618. TABS 
  6619.                     sets the tabs stops 
  6620. TOGGLECONTROL 
  6621.                     toggles the window on/off 
  6622. TOGGLEFONT 
  6623.                     toggles between large/small fonts 
  6624. TOP 
  6625.                     goes to the top of the current file 
  6626. UNLINK 
  6627.                     removes an .EX module from EPM 
  6628. UNLOCK 
  6629.                     allows other users to update a file 
  6630. UPPERCASE 
  6631.                     makes text in a marked area uppercased 
  6632. VER 
  6633.                     displays the EPM version 
  6634. VOL 
  6635.                     displays the current drive's volume info 
  6636. XCOM 
  6637.                     executes a built in command 
  6638.  
  6639.  
  6640. ΓòÉΓòÉΓòÉ 9.3. E Language Keywords ΓòÉΓòÉΓòÉ
  6641.  
  6642. AND 
  6643.                 Boolean AND function.  That is, a logical AND like REXX, not a 
  6644.                 bit operator. 
  6645. ARG 
  6646.                 is used in parse constructs 
  6647. BASE 
  6648.                 is used in defkeys construct 
  6649. BY 
  6650.                 is used in loop constructs 
  6651. CLEAR 
  6652.                 is used in defkeys construct 
  6653. COMPILE 
  6654.                 conditional compilation instruction, followed by 
  6655.                 IF/ELSE/ELSEIF/ENDIF 
  6656. CONST 
  6657.                 defines constants that the E translator uses during translation 
  6658.                 of the E procs 
  6659. DEF 
  6660.                 defines a key or pseudo-key that belongs to the current keyset 
  6661. DEFC 
  6662.                 defines new commands 
  6663. DEFINIT 
  6664.                 allows initialization of variables for use by other E 
  6665.                 procedures 
  6666. DEFKEYS 
  6667.                 names a keyset 
  6668. DEFLOAD 
  6669.                 is executed whenever a new file is loaded 
  6670. DEFMAIN 
  6671.                 allows the user to take control of the command dialog box 
  6672.                 arguments of the editor 
  6673. DEFMODIFY 
  6674.                 is executed when .modify passes certain threshold values 
  6675. DEFPROC 
  6676.                 is used to define new procedures (functions) 
  6677. DEFSELECT 
  6678.                 is executed whenever you switch to a different file 
  6679. DO 
  6680.                 is used in loop constructs 
  6681. ELSE 
  6682.                 indicates action to take place when an IF statement proves 
  6683.                 false 
  6684. ELSEIF 
  6685.                 executes a secondary IF when an IF statement proves false 
  6686. END or ENDDO 
  6687.                 is used in loop constructs, to terminate a DO block (DO WHILE, 
  6688.                 DO (FOR), or DO FOREVER) 
  6689. ENDFOR 
  6690.                 is used in loop constructs 
  6691. ENDIF 
  6692.                 marks the end of an IF block 
  6693. ENDLOOP 
  6694.                 is used in loop constructs 
  6695. ENDWHILE 
  6696.                 is used in loop constructs 
  6697. FOR 
  6698.                 is used in loop constructs 
  6699. FOREVER 
  6700.                 is used in loop constructs 
  6701. IF 
  6702.                 changes the flow of statements depending upon a condition 
  6703. INCLUDE 
  6704.                 includes another file into the current file for compilation. 
  6705. ITERATE 
  6706.                 iterates a loop, while, or do 
  6707. LEAVE 
  6708.                 exits loop, while, or do 
  6709. LOOP 
  6710.                 is used in loop constructs 
  6711. NEW 
  6712.                 is used in defkeys construct 
  6713. NOT 
  6714.                 Boolean NOT function 
  6715. OR 
  6716.                 Boolean OR function 
  6717. OVERLAY 
  6718.                 is used in defkeys construct 
  6719. PARSE 
  6720.                 is used to extract information from a string 
  6721. RETURN 
  6722.                 returns from a defined procedure or command, with an 
  6723.                 expression. 
  6724. SAY 
  6725.                 writes a line to terminal when shelled to OS/2 
  6726. SAYS 
  6727.                 writes a line to terminal when shelled to OS/2, no CR-LF 
  6728. SET 
  6729.                 defines configuration options.  Only a few options are still 
  6730.                 set in this way:  cursors and insertstate. 
  6731. THEN 
  6732.                 indicates action to take place when an IF statement proves true 
  6733. TO 
  6734.                 is used in loop constructs 
  6735. TRYINCLUDE 
  6736.                 includes another file into the current file for compilation, 
  6737.                 similar to INCLUDE, but does not stop compilation if the file 
  6738.                 cannot be found. 
  6739. UNIVERSAL 
  6740.                 specifies that a variable is available to all procs, is not 
  6741.                 local to the current one. 
  6742. VALUE 
  6743.                 is used in Parse constructs 
  6744. VAR 
  6745.                 is used in DEFPROC definitions.  Specifies that the following 
  6746.                 variable is passed by reference.  If the procedure modifies the 
  6747.                 variable its value is also changed in the caller.  Otherwise 
  6748.                 the caller's value for the variable is not modifiable by the 
  6749.                 called procedure. 
  6750. WHILE 
  6751.                 is used in loop constructs 
  6752. WITH 
  6753.                 is used in Parse constructs 
  6754.  
  6755.  
  6756. ΓòÉΓòÉΓòÉ 9.4. Field Attributes ΓòÉΓòÉΓòÉ
  6757.  
  6758. Field attributes are variables that are unique to each file. They can be 
  6759. accessed by specifying the fileid and the attribute name separated by a period. 
  6760. If the fileid is omitted, the current file is assumed. Some are able to be 
  6761. assigned and all are able to be referenced. For example: 
  6762.  
  6763.         .line = 1
  6764.         sayerror "The current line is: "||.line
  6765.         tmpfileid.line = 1
  6766.  
  6767. The first is an assignment statement. The second is reference statement. In the 
  6768. third a fileid (in the form of the variable tmpfileid) is used. For a more 
  6769. complete description of field variables see Field Variables Listed. Valid field 
  6770. variables are: 
  6771.  
  6772. .AUTOSAVE 
  6773.                     number of changes before autosaving 
  6774. .COL 
  6775.                     the cursor column position 
  6776. .CURSORX 
  6777.                     the cursor x coordinate 
  6778. .CURSORY 
  6779.                     the cursor y coordinate 
  6780. .DRAGCOLOR 
  6781.                     the drag color 
  6782. .DRAGSTYLE 
  6783.                     the drag style 
  6784. .DRAGTHRESHHOLDX 
  6785.                     how far (in x dir.) mouse must move for a drag 
  6786. .DRAGTHRESHHOLDY 
  6787.                     how far (in y dir.) mouse must move for a drag 
  6788. .FILENAME 
  6789.                     the current file's filename 
  6790. .FONTHEIGHT 
  6791.                     the font height 
  6792. .FONTWIDTH 
  6793.                     the font width 
  6794. .KEYSET 
  6795.                     the current active keyset 
  6796. .LAST 
  6797.                     the maximum file line number 
  6798. .LINE 
  6799.                     the cursor's line number 
  6800. .LOCKHANDLE 
  6801.                     determines if the file is LOCKed 
  6802. .MARGINS 
  6803.                     contains the margin settings 
  6804. .MARKCOLOR 
  6805.                     contains the mark color 
  6806. .MESSAGECOLOR 
  6807.                     contains the message color 
  6808. .MESSAGELINE 
  6809.                     the contents of the messageline 
  6810. .MODIFY 
  6811.                     the number of modifications made 
  6812. .MOUSEX 
  6813.                     the mouse's x coordinate 
  6814. .MOUSEY 
  6815.                     the mouse's y coordinate 
  6816. .STATUSCOLOR 
  6817.                     the status bar color 
  6818. .STATUSLINE 
  6819.                     the contents of the status line 
  6820. .TABS 
  6821.                     the tab settings 
  6822. .TEXTCOLOR 
  6823.                     the text color 
  6824. .USERSTRING 
  6825.                     a user definable variable 
  6826. .VISIBLE 
  6827.                     determines if the file is visible 
  6828. .WINDOWHEIGHT 
  6829.                     contains the window height 
  6830. .WINDOWWIDTH 
  6831.                     contains the window width 
  6832. .WINDOWX 
  6833.                     the window x coordinate 
  6834. .WINDOWY 
  6835.                     the window y coordinate 
  6836.  
  6837.  
  6838. ΓòÉΓòÉΓòÉ 9.5. E-Definable Keys ΓòÉΓòÉΓòÉ
  6839.  
  6840. The following keys may be defined using E.  In all cases, the prefix A_ means 
  6841. that the Alt key must be depressed at the same time as the key to get the 
  6842. desired function.  Similarly, the prefix C_ means the Ctrl key must be used, 
  6843. and S_ means the shift key must be used. For information on the format of 
  6844. defining these keys, refer to section Key Definitions (DEF and DEFKEYS) or E 
  6845. Language Syntax. 
  6846.  
  6847. A - Z 
  6848. A_A - A_Z 
  6849. A_EQUAL 
  6850. A_F1 - A_F12 
  6851. A_LEFTBRACKET 
  6852. A_MINUS 
  6853. A_RIGHTBRACKET 
  6854. A_TAB 
  6855. A_0 - A_9 
  6856. BACKSPACE 
  6857. C_A - C_Z 
  6858. C_BACKSLASH 
  6859. C_BACKSPACE 
  6860. C_DEL 
  6861. C_DOWN 
  6862. C_END 
  6863. C_ENTER 
  6864. C_F1 - C_F10 
  6865. C_HOME 
  6866. C_INS 
  6867. C_LEFT 
  6868. C_LEFTBRACKET 
  6869. C_MINUS 
  6870. C_PGDN 
  6871. C_PGUP 
  6872. C_PRTSC 
  6873. C_RIGHT 
  6874. C_RIGHTBRACKET 
  6875. C_TAB 
  6876. C_UP 
  6877. C_2, C_6 
  6878. DEL 
  6879. DOWN 
  6880. END 
  6881. ENTER 
  6882. ESC 
  6883. F1 - F10 
  6884. HOME 
  6885. INS 
  6886. LEFT 
  6887. PGDN 
  6888. PGUP 
  6889. RIGHT 
  6890. S_F1 - S_F10 
  6891. S_PAD5 
  6892. S_TAB 
  6893. TAB 
  6894. UP 
  6895. any printable character whose ASCII value is 0 to 255. 
  6896. The following name may be defined in the same manner as keys, but is used as a 
  6897. pseudo-key: 
  6898.  
  6899. ENTRY 
  6900. The following keys are available only on enhanced keyboards, which come with 
  6901. the PS/2 and AT models: 
  6902.  
  6903. A_ENTER 
  6904.  
  6905. A_F11, A_F12 
  6906.  
  6907. A_PADENTER 
  6908.  
  6909. C_F11, C_F12 
  6910.  
  6911. C_PADENTER 
  6912.  
  6913. F11, F12 
  6914.  
  6915. PADENTER 
  6916.  
  6917. S_F11, S_F12 
  6918.  
  6919.  
  6920. ΓòÉΓòÉΓòÉ 9.5.1. PM Keys ΓòÉΓòÉΓòÉ
  6921.  
  6922. The keys listed below are used be Presentation Manager to accomplish certain 
  6923. functions standard to all PM applications (set by CUA standards). To maintain 
  6924. consistency between PM applications, these keys cannot be redefined. 
  6925.  
  6926. Key            PM Function 
  6927.   F1 
  6928.                Help 
  6929.   F10 
  6930.                Goto action bar. 
  6931.   A_F7 
  6932.                Move a PM window. 
  6933.   A_F8 
  6934.                Size a PM window. 
  6935.   A_F9 
  6936.                Minimize a PM window. 
  6937.   A_F10 
  6938.                Maximize a PM window. 
  6939.   A_Esc 
  6940.                Switch application. 
  6941.   C_Esc 
  6942.                Goto Task List. 
  6943.  
  6944.  
  6945. ΓòÉΓòÉΓòÉ 10. General Structure of E-Macro Files ΓòÉΓòÉΓòÉ
  6946.  
  6947. ALL.E               Procedure for including the ALL command and the ctrl-Q key 
  6948.                     setup for paging between ALL occurrences. This file is only 
  6949.                     included if the variable WANT_ALL is TRUE. 
  6950.  
  6951. BOX.E               Procedure for the BOX command. This is compiled separately 
  6952.                     into a BOX.EX file. The file is loaded when the user issues 
  6953.                     a BOX command. When the command finished, BOX is unlinked 
  6954.                     from EPM, thereby saving memory space. 
  6955.  
  6956. BUFF.E              Test procedures for the buffer() opcode. 
  6957.  
  6958. CHAROPS.E           Procedures for block fill, copy, delete and mark, for 
  6959.                     character-marked text. 
  6960.  
  6961. CKEYS.E             Syntax aids for C files. 
  6962.  
  6963. CKEYSEL.E           A small file which selects the C keyset.  This is a 
  6964.                     separate file to allow easy omission of the 
  6965.                     syntax-expansion feature by erasing CKEYS*.E. As of version 
  6966.                     4.12, this file is no longer needed.  The selection of the 
  6967.                     keyset is done in CKEYS.E where the keyset is defined. This 
  6968.                     is made possible by the new DEFLOAD feature.  Similarly, 
  6969.                     EKEYSEL.E and PKEYSEL.E are unnecessary. 
  6970.  
  6971. CLIPBRD.E           Contains procedures and commands that: 
  6972.  
  6973.    o allow a user to pass lines of text between edit windows 
  6974.    o allow text to be placed in the PM clipboard. 
  6975.  
  6976. COLORS.E            Defines default colors. 
  6977.  
  6978. DOSUTIL.E           Procedures interfacing to the operating system. 
  6979.  
  6980.                     Note:  No longer used under OS/2. 
  6981.  
  6982. DRAW.E              Includes the procedures for the DRAW command. This is 
  6983.                     compiled separately into a DRAW.EX file. The file is loaded 
  6984.                     when the user issues a DRAW command. The code is then 
  6985.                     unlinked when the DRAW command is finished. 
  6986.  
  6987. DRAWKEY.E           Includes the key definition for F6 to trigger the draw 
  6988.                     command. 
  6989.  
  6990. DYNATEST.E          An example program showing how to program in E using the 
  6991.                     DYNALINK command. 
  6992.  
  6993. E.E                 The main file containing all the include statements that 
  6994.                     create EPM. Do not compile this module, however. Compile 
  6995.                     the EPM.E file. 
  6996.  
  6997. E3EMUL.E            Includes the procedures and commands to enable E3EMUL host 
  6998.                     support. See The EPM User's Guide for more information on 
  6999.                     the E3EMUL package support. 
  7000.  
  7001. EKEYS.E             Key definitions for E syntax support. 
  7002.  
  7003. EKEYSEL.E           A small file which selects the E keyset.  This is a 
  7004.                     separate file to allow easy omission of the 
  7005.                     syntax-expansion feature by erasing EKEYS*.E. 
  7006.  
  7007. EPM.E               The main file for compilation. See The EPM User's Guide for 
  7008.                     information on compiling this file. 
  7009.  
  7010. EPMLEX.E            Includes spell checking and synonym support for the EPM 
  7011.                     editor. 
  7012.  
  7013. EXIT.E              Asks the user if he really wants to leave EOS2. No longer 
  7014.                     used in EPM. 
  7015.  
  7016. GET.E               Procedures for the GET command. This is an external package 
  7017.                     created to save memory space. When the user issues a GET 
  7018.                     command, EPM loads the GET.EX file. Once the GET command is 
  7019.                     completed, GET will unlink itself from memory to free up 
  7020.                     memory space. 
  7021.  
  7022. HELP.E              Procedure for the HELP command. This is an external package 
  7023.                     created to save memory space. When the user issues a HELP 
  7024.                     command, EPM loads the HELP.EX file. Once the user has 
  7025.                     finished viewing the EPMHELP.HLP file, HELP automatically 
  7026.                     unlinks itself from memory to free up memory space. 
  7027.  
  7028. LINKCMDS.E          Contains procedures and commands related to the linking of 
  7029.                     editor modules (ie. LINK, ETPM, RELINK and UNLINK). 
  7030.  
  7031. LOAD.E              This file is executed immediately after a file is loaded. 
  7032.                     It will be invoked after loading an existing file from 
  7033.                     disk, or opening a new file, but not after an error such as 
  7034.                     "Not enough memory".  In other words, a new file must be 
  7035.                     entered into the ring. 
  7036.  
  7037.                     This is the place to select a keyset (like c_keys for .C 
  7038.                     files) since keysets now stay bound to a file once 
  7039.                     assigned.  This is also a good place to do other one-time 
  7040.                     processing like returning to a saved bookmark. 
  7041.  
  7042. MAIN.E              Contains the DEFMAIN procedure, which is where E begins 
  7043.                     execution after all DEFINITs.  Processes the OS/2 command 
  7044.                     dialog box. 
  7045.  
  7046. MARKFILT.E          Defines procedures to extract and replace strings from 
  7047.                     marked text. 
  7048.  
  7049. MATH.E              Definitions for ADD and MULT commands. Also refer to the 
  7050.                     file MATHLIB.E for more math command definitions. 
  7051.  
  7052. MATHLIB.E           An extension of MATH.E created for EOS/2 to allow the 
  7053.                     components to compile only if needed. See MATH.E for more 
  7054.                     math command definitions. 
  7055.  
  7056. MODIFY.E            This file contains the procedures and commands executed 
  7057.                     when a DEMODIFY event is triggered. The DEMODIFY event 
  7058.                     occurs when a file's number of modifications (.modify): 
  7059.  
  7060.    o goes from zero to nonzero (first modification, so we can change the 
  7061.      textcolor or title to indicate that the file needs to be saved; 
  7062.    o goes from nonzero to zero (so we can return to the safe textcolor, usually 
  7063.      after a save); 
  7064.    o goes from less than .autosave to greater than or equal to .autosave. 
  7065.  
  7066.                     The DEMODIFY.E file is new as of EPM. 
  7067.  
  7068. MOUSE.E             Contains the commands and procedures associated with the 
  7069.                     MOUSE movements and actions. This file is new as of EPM. 
  7070.  
  7071. PKEYS.E             Syntax aids for Pascal files. 
  7072.  
  7073. PKEYSEL.E           A small file which selects the Pascal keyset.  This is a 
  7074.                     separate file to allow easy omission of the 
  7075.                     syntax-expansion feature by erasing PKEYS*.E. 
  7076.  
  7077. PUT.E               Contains the procedures and statements for the PUT command. 
  7078.                     This was made an external module to save space. 
  7079.  
  7080. RETREIVE.E          Used to retrieve commands from a hidden file in E3. This 
  7081.                     file is no longer used under EPM. 
  7082.  
  7083. SAVELOAD.E          Things common to loading and saving files (host file 
  7084.                     support). 
  7085.  
  7086. SELECT.E            Contains the procedure select_edit_keys() which selects 
  7087.                     options (like keysets) whenever you switch to a new file. 
  7088.  
  7089. SHELL.E             Presents an E interface to the internal shell command. 
  7090.  
  7091. SLNOHOST.E          Substitute for SAVELOAD.E, without host file support. 
  7092.  
  7093. SMALL.E             A version of E.E with several features removed to save 
  7094.                     memory. 
  7095.  
  7096. SORTDLL.E           Provides the link between the E's SORT command and the 
  7097.                     QISRTMEM sort DLL. 
  7098.  
  7099. SORTE.E             Definitions for the sorting using the E language. 
  7100.  
  7101. STDCMDS.E           Definitions of standard E commands. 
  7102.  
  7103. STDCNF.E            Mode settings and default values for the standard E 
  7104.                     configuration. 
  7105.  
  7106. STDCONST.E          Contains EPM's standard constants. 
  7107.  
  7108. STDCTRL.E           Adds LISTBOX and MENU support.  Routines to interface with 
  7109.                     EPM and PM controls are defined here. 
  7110.  
  7111. STDKEYS.E           Standard E command-key definitions. 
  7112.  
  7113. STDMENU.E           The default action bar is defined here. 
  7114.  
  7115. STDPROCS.E          Standard procedural support for other files. 
  7116.  
  7117. WINDOW.E            Definitions for tiled window support. No longer used in 
  7118.                     EPM. 
  7119.  
  7120.  
  7121. ΓòÉΓòÉΓòÉ 11. Descriptions of Procedures in Standard EPM ΓòÉΓòÉΓòÉ
  7122.  
  7123. This section lists in alphabetical order all of the procedures in the *.E files 
  7124. and gives a brief description of how they function and what they are used for. 
  7125. For more detailed information, please study the comments in the .E code itself. 
  7126.  
  7127.  
  7128. ΓòÉΓòÉΓòÉ 11.1. ALREADY_IN_RING(filename, var tryid) ΓòÉΓòÉΓòÉ
  7129.  
  7130. Attempts to find the filename in the current ring. If successful tryid returns 
  7131. the file id for the filename. This function returns a one if the filename is in 
  7132. the ring and a zero if not. 
  7133.  
  7134.  
  7135. ΓòÉΓòÉΓòÉ 11.2. APPEND_PATH(filename) ΓòÉΓòÉΓòÉ
  7136.  
  7137. For use with DOS 3.30 or higher: searches the path listed in the APPEND path 
  7138. string for filename and returns the path (ended by a trailing backslash) where 
  7139. it was found; otherwise it returns null. Only included if requested with the 
  7140. USE_APPEND option variable. 
  7141.  
  7142.  
  7143. ΓòÉΓòÉΓòÉ 11.3. ASKYESNO() ΓòÉΓòÉΓòÉ
  7144.  
  7145. Displays the message: 'Are you sure (Y/N)' and returns an uppercase keystroke 
  7146. to the caller. If called with a string parameter, the string is displayed 
  7147. before the message: 'Are you sure (Y/N)'. An optional second argument is a flag 
  7148. to prevent the 'Are you sure (Y/N)' message from appearing. For example: 
  7149.  
  7150. usersays = askyesno("About to erase")
  7151.  
  7152. The user's response would be placed in the variable usersays. 
  7153.  
  7154.  
  7155. ΓòÉΓòÉΓòÉ 11.4. BEEP(pitch,duration) ΓòÉΓòÉΓòÉ
  7156.  
  7157. Emits a tone of pitch (range 25Hz - 7FFFHz) and a duration of duration in 
  7158. milliseconds. 
  7159.  
  7160.  
  7161. ΓòÉΓòÉΓòÉ 11.5. BREAKOUT_MVS(filename,lastqual) ΓòÉΓòÉΓòÉ
  7162.  
  7163. Breaks out a filetype from a MVS filename.  PASCAL will return PAS and C will 
  7164. return C. Only included if requested with HOST_SUPPORT. 
  7165.  
  7166.  
  7167. ΓòÉΓòÉΓòÉ 11.6. CHECK_FOR_HOST_FILE() ΓòÉΓòÉΓòÉ
  7168.  
  7169. Parses arg(1) in the host filename form:  fname ftype fmode; gives an error 
  7170. message and returns zero if not in correct format; returns one if in correct 
  7171. format. Included only if HOST_SUPPORT is requested. 
  7172.  
  7173.  
  7174. ΓòÉΓòÉΓòÉ 11.7. CHECK_FOR_PRINTER(name) ΓòÉΓòÉΓòÉ
  7175.  
  7176. Tests whether name is actually a printer device. Returns zero if not a valid 
  7177. printer device and the printer number if valid. 
  7178.  
  7179.  
  7180. ΓòÉΓòÉΓòÉ 11.8. CHECK_MARK_ON_SCREEN() ΓòÉΓòÉΓòÉ
  7181.  
  7182. Tells if a mark is visible on the screen. Returns a one if the mark is on the 
  7183. visible screen and a zero if not. Use checkmark() to see if a mark exists 
  7184. anywhere in the file. 
  7185.  
  7186.  
  7187. ΓòÉΓòÉΓòÉ 11.9. checkmark() ΓòÉΓòÉΓòÉ
  7188.  
  7189. Checks if a marked area exists in the current file. Returns a one if a mark is 
  7190. set; zero if no mark exists. 
  7191.  
  7192.  
  7193. ΓòÉΓòÉΓòÉ 11.10. CURSOROFF() ΓòÉΓòÉΓòÉ
  7194.  
  7195. Turns the cursor off. 
  7196.  
  7197.  
  7198. ΓòÉΓòÉΓòÉ 11.11. DEC2HEX() ΓòÉΓòÉΓòÉ
  7199.  
  7200. Converts a decimal number, arg(1), to a number of base arg(2) (default is 
  7201. hexadecimal). Example usage is: 
  7202.  
  7203.         HexStringOut=Dec2Hex(DecimalIn)
  7204.  
  7205.  
  7206. ΓòÉΓòÉΓòÉ 11.12. DOS_COMMAND() ΓòÉΓòÉΓòÉ
  7207.  
  7208. Executes the DOS (OS/2) command specified in the arg(1) and redirects the 
  7209. output to the file specified in vTEMP_FILENAME. Used by commands like the DIR 
  7210. command. 
  7211.  
  7212.  
  7213. ΓòÉΓòÉΓòÉ 11.13. DOS_VERSION() ΓòÉΓòÉΓòÉ
  7214.  
  7215. Returns DOS version number, multiplied by 100 so it can be treated as an 
  7216. integer string.  For example DOS 3.2 is reported as "320". 
  7217.  
  7218.  
  7219. ΓòÉΓòÉΓòÉ 11.14. EINSERT_LINE() ΓòÉΓòÉΓòÉ
  7220.  
  7221. Inserts a line after current line and positions the cursor on the same column 
  7222. number of the first nonblank character of preceding line. 
  7223.  
  7224.  
  7225. ΓòÉΓòÉΓòÉ 11.15. ENTRY_BOX(title) ΓòÉΓòÉΓòÉ
  7226.  
  7227. Creates a System-Modal Dialog Box with an entry field and two push buttons. The 
  7228. format for entry_box is: 
  7229.  
  7230. userstext = entrybox(title,buttons,entrytext,cols,
  7231.             maxchars)
  7232.  
  7233. with the following field definitions: 
  7234.  
  7235. userstext is the variable that will contain the user's text entered. 
  7236. title     the text to be displayed in the title bar. 
  7237. buttons   the labels on the buttons separated by delimiting characters. If this 
  7238.           entry is null, the EPM defaults to Enter and Cancel. 
  7239. entrytext contains the text to be entered into the user's text entry area. This 
  7240.           is useful for displaying defaults for change. 
  7241. cols      is the width of the dialog box. 
  7242. maxchars  is the maximum number of characters allowed for entry. 
  7243.  
  7244. An example of a procedure (called testit) that uses the entrybox command 
  7245. follows: 
  7246.  
  7247. defc testit
  7248.   k=entrybox('This is a test box.', '/one/two/',
  7249.              'Hi!',30, 10)
  7250.     message("The character returned was = "||k)
  7251.  
  7252. In the procedure, a dialog box with the title This is a test box will appear. 
  7253. The two buttons will be labeled one and two. Initially the word Hi! will be 
  7254. entered in the text input area. This is useful for displaying current values 
  7255. and allowing the user to change them. The dialog box will be thirty characters 
  7256. wide and allow the user to input up to ten characters. The input will be stored 
  7257. in the variable k and the command message will display the input. 
  7258.  
  7259. Also see the LISTBOX procedure in this section for an alternative means of 
  7260. getting user input. 
  7261.  
  7262.  
  7263. ΓòÉΓòÉΓòÉ 11.16. ERASETEMP(filename) ΓòÉΓòÉΓòÉ
  7264.  
  7265. Erases a file quietly (no "File not found" message) on both DOS and OS/2; 
  7266. returns 0 if successful erase, and the error code (if on DOS) which is usually 
  7267. 2 for 'file not found'. 
  7268.  
  7269.  
  7270. ΓòÉΓòÉΓòÉ 11.17. EXIST(filename) ΓòÉΓòÉΓòÉ
  7271.  
  7272. Determines whether filename exists. Returns a one if it does exist; a zero if 
  7273. it doesn't. 
  7274.  
  7275.  
  7276. ΓòÉΓòÉΓòÉ 11.18. FILETYPE() -- in SLNOHOST.E ΓòÉΓòÉΓòÉ
  7277.  
  7278. Returns the extension (everything after '.') of the current filename or fileid 
  7279. specified in arg(1). 
  7280.  
  7281.  
  7282. ΓòÉΓòÉΓòÉ 11.19. FILETYPE() -- in SAVELOAD.E ΓòÉΓòÉΓòÉ
  7283.  
  7284. Returns the 'ftype' portion of the host filename. 
  7285.  
  7286.  
  7287. ΓòÉΓòÉΓòÉ 11.20. FIND_ROUTINE(utility) ΓòÉΓòÉΓòÉ
  7288.  
  7289. Used to both verify that the external utility program exists, and to get its 
  7290. path. 
  7291.  
  7292.  
  7293. ΓòÉΓòÉΓòÉ 11.21. GET_CHAR() ΓòÉΓòÉΓòÉ
  7294.  
  7295. Returns the character at the current cursor position. 
  7296.  
  7297.  
  7298. ΓòÉΓòÉΓòÉ 11.22. GET_ENV(varname) ΓòÉΓòÉΓòÉ
  7299.  
  7300. Returns whether the variable name (varname) is found in the environment. 
  7301. Returns the setting if found; zero if not found. For example: 
  7302.  
  7303.         res=get_env('DPATH')
  7304.  
  7305. In this case the contents of the DPATH environment variable would be returned 
  7306. into the variable res. 
  7307.  
  7308.  
  7309. ΓòÉΓòÉΓòÉ 11.23. GETDATE() ΓòÉΓòÉΓòÉ
  7310.  
  7311. Returns the date in the form: Weekday Month Day, Year; MonthNum. 
  7312.  
  7313.  
  7314. ΓòÉΓòÉΓòÉ 11.24. GETTIME() ΓòÉΓòÉΓòÉ
  7315.  
  7316. Returns the time in the form: hh:mm:ss xm;hour24:hund. 
  7317.  
  7318.  
  7319. ΓòÉΓòÉΓòÉ 11.25. HEX2DEC() ΓòÉΓòÉΓòÉ
  7320.  
  7321. Converts the number in arg(1) to a decimal number; arg(1) is assumed to be a 
  7322. number of base arg(2) (hexadecimal by default). See the dec2hex() procedure for 
  7323. an example. 
  7324.  
  7325.  
  7326. ΓòÉΓòÉΓòÉ 11.26. ISA_MVS_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  7327.  
  7328. Returns a zero and the error message (in error_msg) if it is not a valid MVS 
  7329. filename; and returns a one and the rest of the information if the candidate is 
  7330. a valid MVS filename. 
  7331.  
  7332.  
  7333. ΓòÉΓòÉΓòÉ 11.27. ISA_PC_FILENAME(candidate, var tempfile, var error_msg) ΓòÉΓòÉΓòÉ
  7334.  
  7335. Returns a zero and the error message (in error_msg) if it is not a valid PC 
  7336. filename; and returns a one and the rest of the information if the candidate 
  7337.  
  7338.  
  7339. ΓòÉΓòÉΓòÉ 11.28. ISA_VM_FILENAME(candidate, var hostfile, var tempfile, var thisLT, var bin, var error_msg) ΓòÉΓòÉΓòÉ
  7340.  
  7341. Returns a zero and the error message (in error_msg) if it is not a valid VM 
  7342. filename; and returns a one and the rest of the information if the candidate 
  7343.  
  7344.  
  7345. ΓòÉΓòÉΓòÉ 11.29. ISHOST(candidate, verb, var hostfile, var tempfile, var thisLT, var bin) ΓòÉΓòÉΓòÉ
  7346.  
  7347. Determines a filename's type and returns: 
  7348.  
  7349. 0 = PC filename 
  7350. 1 = VM filename 
  7351. 2 = MVS filenme 
  7352.  
  7353.  
  7354. ΓòÉΓòÉΓòÉ 11.30. ISNUM() ΓòÉΓòÉΓòÉ
  7355.  
  7356. Returns true if parameter given is a number, ignores leading and trailing 
  7357. spaces. 
  7358.  
  7359.  
  7360. ΓòÉΓòÉΓòÉ 11.31. ISOPTION(var cmdline, optionletter) ΓòÉΓòÉΓòÉ
  7361.  
  7362. Eliminates optionletter from cmdline; if optionletter occurred in the 
  7363. commandline, returns 1; returns 0 otherwise. 
  7364.  
  7365.  
  7366. ΓòÉΓòÉΓòÉ 11.32. JOINLINES() ΓòÉΓòÉΓòÉ
  7367.  
  7368. Joins the line below the cursor line with the cursor line. 
  7369.  
  7370.  
  7371. ΓòÉΓòÉΓòÉ 11.33. LISTBOX(params) ΓòÉΓòÉΓòÉ
  7372.  
  7373. Enables the dynamic creation of modal PM list boxes. A macro can pop up a list 
  7374. of items and have the user's selection returned to the macro. The entry chosen 
  7375. (with a mouse double click or enter from the keyboard) is returned. If ESC was 
  7376. hit then a null string is returned. Parameters are: 
  7377.  
  7378. param1  the list of items, separated by a common separator.  The common 
  7379.         separator is the first character in the string. 
  7380.  
  7381.                 example:     /cat/dog/fish
  7382.                              separator='/'
  7383.                              list=cat, dog, fish
  7384.                 example:     $cat/ground$fish/water
  7385.                              separator='$'
  7386.                              list=cat/ground, fish/water
  7387.  
  7388.         These lists will be displayed like the past commands are displayed in 
  7389.         the command line dialog box. If one of elements in the box is 
  7390.         double-clicked on, it will be returned. For instance, if the second 
  7391.         element of the first example list was chosen by the user, the string 
  7392.         DOG would be returned. 
  7393. param2  (optional) button names.  A maximum of four button names can be 
  7394.         specified to allow multiple buttons. If button one is clicked on, the 
  7395.         highlighted value from the list is returned and so should probably be 
  7396.         entitled ENTER. If the second button is chosen, a null string will be 
  7397.         returned as so should have a title something equivalent to Cancel. If 
  7398.         included the third and fourth boxes return the numbers 3 and 4 
  7399.         respectively. The meanings of these buttons can be defined by the 
  7400.         programmer. If no button names are given, buttons one and two will 
  7401.         default to ENTER and CANCEL respectively. 
  7402. param3  (optional) row of text in which list box will go under. If this 
  7403.         parameter is not specified or if a parameter of zero (0) is specified, 
  7404.         the box will be placed under the cursor. 
  7405. param4  (optional) column of text in which list box will go under. If this 
  7406.         parameter is not specified or if a parameter of zero (0) is specified, 
  7407.         the box will be placed under the cursor. 
  7408.  
  7409.         Note:  If the row parameter is selected the column parameter must be 
  7410.         selected as well. 
  7411. param5  (optional) height of the listbox in characters 
  7412.  
  7413.         Note:  Since the default PM font is proportional the character height 
  7414.         and width are approximate values. 
  7415. param6  (optional) width of listbox in characters. 
  7416.  
  7417. An example of listbox usage is: 
  7418.  
  7419. retvalue = listbox("/one/two/three",
  7420.                    "/Enter/Cancel/None")
  7421.  
  7422. In this example there would be three entries in the list: one, two, and three. 
  7423. There would also be three buttons entitled: Enter, Cancel, and None. Since the 
  7424. last three parameters were omitted, the box would be located at the cursor 
  7425. position and would be wide enough to accommodate the longest element of the 
  7426. list and three buttons. 
  7427.  
  7428. Also see the ENTRYBOX procedure in this section for an alternative method of 
  7429. getting user input. 
  7430.  
  7431.  
  7432. ΓòÉΓòÉΓòÉ 11.34. LOADFILE(files, options) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  7433.  
  7434. Issues edit command on the specified files with the specified options. 
  7435.  
  7436.  
  7437. ΓòÉΓòÉΓòÉ 11.35. LOADFILE(files,options) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  7438.  
  7439. Issues edit command on the specified files with the specified options, after 
  7440. checking for host file specification ('H:'). 
  7441.  
  7442.  
  7443. ΓòÉΓòÉΓòÉ 11.36. LOCK(filename) ΓòÉΓòÉΓòÉ
  7444.  
  7445. Locks a file from other users in a LAN situation. Returns a zero if successful; 
  7446. one if unsuccessful. This procedure is only available if requested with the 
  7447. WANT_LAN_SUPPORT option variable. 
  7448.  
  7449.  
  7450. ΓòÉΓòÉΓòÉ 11.37. MakeTempName() ΓòÉΓòÉΓòÉ
  7451.  
  7452. Creates a temporary filename using the optional arguments filename and fileid. 
  7453. If no arguments are specified, the current filename and current fileid are 
  7454. used. For example, if filename = `origname' and its fileid is 2, then the 
  7455. temporary filename returned will be origname.$$2. 
  7456.  
  7457.  
  7458. ΓòÉΓòÉΓòÉ 11.38. MATHCOMMON(input, suffix) ΓòÉΓòÉΓòÉ
  7459.  
  7460. Is responsible for math computations (dec, hex, or oct) done at commandline in 
  7461. E, where input is the expression to be calculated and suffix is either 'x', 'o' 
  7462. or '' depending upon the base of the number to be returned. 
  7463.  
  7464.  
  7465. ΓòÉΓòÉΓòÉ 11.39. MAX(a,b) ΓòÉΓòÉΓòÉ
  7466.  
  7467. Returns the number which has the maximum value of those numbers in the 
  7468. arguments list. As many arguments as needed can be listed. 
  7469.  
  7470.  
  7471. ΓòÉΓòÉΓòÉ 11.40. MESSAGE(mymsg) ΓòÉΓòÉΓòÉ
  7472.  
  7473. Prints the message specified by the string mymsg on the messageline. This 
  7474. procedure is a carry-over from earlier versions of E and effectively does the 
  7475. same thing as a SAYERROR statement, except this MESSAGE() procedure takes up 
  7476. more code. 
  7477.  
  7478.  
  7479. ΓòÉΓòÉΓòÉ 11.41. MESSAGENWAIT() ΓòÉΓòÉΓòÉ
  7480.  
  7481. Prints the message passed to it in the editor messages dialog box and waits for 
  7482. Cancel or ESC. 
  7483.  
  7484.  
  7485. ΓòÉΓòÉΓòÉ 11.42. MIN(a,b) ΓòÉΓòÉΓòÉ
  7486.  
  7487. Returns the number which has the minimum value of those numbers in the list of 
  7488. parameters. As many parameters as needed can be included for comparison. 
  7489.  
  7490.  
  7491. ΓòÉΓòÉΓòÉ 11.43. MY_C_ENTER() ΓòÉΓòÉΓòÉ
  7492.  
  7493. Applies to c_enter key the appropriate action defined in C_ENTER_ACTION 
  7494. constant. 
  7495.  
  7496.  
  7497. ΓòÉΓòÉΓòÉ 11.44. MY_ENTER() ΓòÉΓòÉΓòÉ
  7498.  
  7499. Applies to enter key the appropriate action defined in ENTER_ACTION constant. 
  7500.  
  7501.  
  7502. ΓòÉΓòÉΓòÉ 11.45. NAMEFILE() -- in SLNOLOAD.e ΓòÉΓòÉΓòÉ
  7503.  
  7504. Issues name command using arg(1) as the new filename. 
  7505.  
  7506.  
  7507. ΓòÉΓòÉΓòÉ 11.46. NAMEFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  7508.  
  7509. Issues name command using arg(1) as the new filename, after checking whether 
  7510. file is a host file. 
  7511.  
  7512.  
  7513. ΓòÉΓòÉΓòÉ 11.47. NO_CHAR_MARK() ΓòÉΓòÉΓòÉ
  7514.  
  7515. Checks if WANT_CHAR_OPS option was set in STDCNF.e. 
  7516.  
  7517.  
  7518. ΓòÉΓòÉΓòÉ 11.48. OPENSHELLWINDOW() ΓòÉΓòÉΓòÉ
  7519.  
  7520. Opens a edit window under a temporary filename for output. (i.e. like the DIR 
  7521. command does) 
  7522.  
  7523.  
  7524. ΓòÉΓòÉΓòÉ 11.49. PARSE_FILE_N_OPTS(argstr) ΓòÉΓòÉΓòÉ
  7525.  
  7526. Parses argstr which contains a mix of options and DOS file specs. The DOS file 
  7527. specs can contain an '=' for the path or fileid, which will be replaced by the 
  7528. corresponding part of the previous file. 
  7529.  
  7530.  
  7531. ΓòÉΓòÉΓòÉ 11.50. PARSE_FILENAME(var filename) ΓòÉΓòÉΓòÉ
  7532.  
  7533. Parses a DOS filename.  Optional second argument gives source for '=' when used 
  7534. for path of fileid.  Rc is 0 if successful, or rc is the position of '=' in 
  7535. first argument if no second argument given but was needed. 
  7536.  
  7537.  
  7538. ΓòÉΓòÉΓòÉ 11.51. PARSE_LEADING_OPTIONS(var rest, var options) ΓòÉΓòÉΓòÉ
  7539.  
  7540. Parses options portion of the edit command. It does not assume that all options 
  7541. are specified before filenames. It is called by DEFC EDIT. 
  7542.  
  7543.  
  7544. ΓòÉΓòÉΓòÉ 11.52. PBEGIN_MARK() ΓòÉΓòÉΓòÉ
  7545.  
  7546. Moves the cursor to the first character of the mark area.  If the mark area is 
  7547. not in the active file, the marked file is activated. 
  7548.  
  7549.  
  7550. ΓòÉΓòÉΓòÉ 11.53. PBEGIN_WORD() ΓòÉΓòÉΓòÉ
  7551.  
  7552. Moves the cursor to the beginning of the word if the cursor is on this word. 
  7553. If its not on a word, its moved to the beginning of the first word on the left. 
  7554. If there is no word on the left its moved to the beginning of the word on the 
  7555. right.  If the line is empty the cursor doesn't move. 
  7556.  
  7557.  
  7558. ΓòÉΓòÉΓòÉ 11.54. PBLOCK_REFLOW(option, var space, var tempofid) ΓòÉΓòÉΓòÉ
  7559.  
  7560. Reflows the text in the marked area; then the destination block area must be 
  7561. selected and a second call to this procedure to reflow the source block in the 
  7562. destination block.  The source block is filled with spaces. Option=0 saves the 
  7563. marked block in temp file; option=1 reflows temp file text and copies it to 
  7564. marked area 
  7565.  
  7566.  
  7567. ΓòÉΓòÉΓòÉ 11.55. PCENTER_MARK() ΓòÉΓòÉΓòÉ
  7568.  
  7569. Centers the strings inside a block mark. If a line mark exists, the text in the 
  7570. marked lines is centered within the current margins. If no mark exists, the 
  7571. text on the current line is centered within the current margins. 
  7572.  
  7573.  
  7574. ΓòÉΓòÉΓòÉ 11.56. PCOMMON_ADJUST_OVERLAY(letter) ΓòÉΓòÉΓòÉ
  7575.  
  7576. Implements adjust and overlay commands for character and line marks (previously 
  7577. only block marks enjoyed these privileges); parameter letter specifies 'A' for 
  7578. adjust and 'O' for overlay. This procedure is only included if requested with 
  7579. the WANT_CHAR_OPS option variable. 
  7580.  
  7581.  
  7582. ΓòÉΓòÉΓòÉ 11.57. PCOPY_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  7583.  
  7584. Implements the copymark statement for character marks; parameters specify the 
  7585. marked area. 
  7586.  
  7587.  
  7588. ΓòÉΓòÉΓòÉ 11.58. PDELETE_MARK(var destfirstline, var destlastline, var destfirstcol, var destlastcol) ΓòÉΓòÉΓòÉ
  7589.  
  7590. Implements the deletemark statement for character marks; parameters specify the 
  7591. marked area. 
  7592.  
  7593.  
  7594. ΓòÉΓòÉΓòÉ 11.59. PDISPLAY_MARGINS() ΓòÉΓòÉΓòÉ
  7595.  
  7596. Puts the margin settings on the current line. 
  7597.  
  7598.  
  7599. ΓòÉΓòÉΓòÉ 11.60. PDISPLAY_TABS() ΓòÉΓòÉΓòÉ
  7600.  
  7601. Puts the tab stops on the current line. 
  7602.  
  7603.  
  7604. ΓòÉΓòÉΓòÉ 11.61. PEND_MARK() ΓòÉΓòÉΓòÉ
  7605.  
  7606. Moves the cursor to the end of the marked area. 
  7607.  
  7608.  
  7609. ΓòÉΓòÉΓòÉ 11.62. PEND_WORD() ΓòÉΓòÉΓòÉ
  7610.  
  7611. Moves the cursor to the end of the word if the cursor is on this word.  If it's 
  7612. not on a word, it's moved to the end of the first word on the right.  If there 
  7613. is no word on the right it's moved to the end of the word on the left.  If the 
  7614. line is empty the cursor doesn't move. 
  7615.  
  7616.  
  7617. ΓòÉΓòÉΓòÉ 11.63. PFILE_EXISTS() ΓòÉΓòÉΓòÉ
  7618.  
  7619. Checks if file already exists in ring. 
  7620.  
  7621.  
  7622. ΓòÉΓòÉΓòÉ 11.64. PFILL_MARK() ΓòÉΓòÉΓòÉ
  7623.  
  7624. Implements the fillmark statement for character marks; checks arg() to see if a 
  7625. character for fill was specified, otherwise prompts for a character. This 
  7626. procedure is available only if requested with the WANT_CHAR_OPS option 
  7627. variable. 
  7628.  
  7629.  
  7630. ΓòÉΓòÉΓòÉ 11.65. PFIND_BLANK_LINE() ΓòÉΓòÉΓòÉ
  7631.  
  7632. Finds first blank line starting from current line. 
  7633.  
  7634.  
  7635. ΓòÉΓòÉΓòÉ 11.66. PFIRST_NONBLANK() ΓòÉΓòÉΓòÉ
  7636.  
  7637. Finds first nonblank character in the current line. 
  7638.  
  7639.  
  7640. ΓòÉΓòÉΓòÉ 11.67. PLOWERCASE() ΓòÉΓòÉΓòÉ
  7641.  
  7642. Changes all alphabetic characters in the marked area to lowercase. 
  7643.  
  7644.  
  7645. ΓòÉΓòÉΓòÉ 11.68. PMARGINS() ΓòÉΓòÉΓòÉ
  7646.  
  7647. Returns the current margins setting.  Uses pcommon_tab_margin(). 
  7648.  
  7649.  
  7650. ΓòÉΓòÉΓòÉ 11.69. PMARK(mt) ΓòÉΓòÉΓòÉ
  7651.  
  7652. Marks at the cursor position; receives the mark type as an argument. 
  7653.  
  7654.  
  7655. ΓòÉΓòÉΓòÉ 11.70. PMARK_WORD() ΓòÉΓòÉΓòÉ
  7656.  
  7657. Marks the word pointed at by the cursor.  If the cursor is on a space the word 
  7658. at the right is marked.  If there is no word on the right, the word on the left 
  7659. is marked. 
  7660.  
  7661.  
  7662. ΓòÉΓòÉΓòÉ 11.71. PMOVE_MARK() ΓòÉΓòÉΓòÉ
  7663.  
  7664. Implements the movemark statement for character marks by calling pcopy_mark() 
  7665. and pcopy_delete(). 
  7666.  
  7667.  
  7668. ΓòÉΓòÉΓòÉ 11.72. PPUT_STRING_BACK(string) ΓòÉΓòÉΓòÉ
  7669.  
  7670. Puts string back into marked area on current line. 
  7671.  
  7672.  
  7673. ΓòÉΓòÉΓòÉ 11.73. PRESTORE_MARK(savemark) ΓòÉΓòÉΓòÉ
  7674.  
  7675. Marks the area specified in savemark, where savemark  is a concatenated string 
  7676. composed of the components: first_line, last_line, first_col, last_col, fileid, 
  7677. marktype. 
  7678.  
  7679.  
  7680. ΓòÉΓòÉΓòÉ 11.74. PRESTORE_POS(save_pos) ΓòÉΓòÉΓòÉ
  7681.  
  7682. Resets the cursor position according to save_pos, a string composed of the 
  7683. concatenation of the fields:  .col, .line, .cursorx, and .cursory. 
  7684.  
  7685.  
  7686. ΓòÉΓòÉΓòÉ 11.75. PRINTER_READY() ΓòÉΓòÉΓòÉ
  7687.  
  7688. In EPM this procedure will always return ready. It remains for compatibility 
  7689. with previous E macros. 
  7690.  
  7691.  
  7692. ΓòÉΓòÉΓòÉ 11.76. PROOF1(word) ΓòÉΓòÉΓòÉ
  7693.  
  7694. Calls Lexam to spell check for the word specified by word. 
  7695.  
  7696.  
  7697. ΓòÉΓòÉΓòÉ 11.77. PROOF2() ΓòÉΓòÉΓòÉ
  7698.  
  7699. Calls Lexam to begin spell-checking at the current word. 
  7700.  
  7701.  
  7702. ΓòÉΓòÉΓòÉ 11.78. PSAVE_MARK(var savemark) ΓòÉΓòÉΓòÉ
  7703.  
  7704. Saves the specifications of the currently marked area in savemark, a string 
  7705. composed of the concatenation of: first_line, last_line, first_col, last_col, 
  7706. fileid, and marktype. 
  7707.  
  7708.  
  7709. ΓòÉΓòÉΓòÉ 11.79. PSAVE_POS(var save_pos) ΓòÉΓòÉΓòÉ
  7710.  
  7711. Saves the cursor position according to save_pos, a string composed of the 
  7712. concatenation of the fields:  .line, .col, .cursorx, and .cursory. 
  7713.  
  7714.  
  7715. ΓòÉΓòÉΓòÉ 11.80. PSET_MARK(firstline, lastline, firstcol, lastcol, mt, fileid) ΓòÉΓòÉΓòÉ
  7716.  
  7717. Marks the area designated by the parameters.  The firstline, lastline, firstcol 
  7718. and lastcol refer to position of the text in the file.  The mt is the mark type 
  7719. (block, line, or character).  The fileid is the id number of the file to be 
  7720. marked. 
  7721.  
  7722.  
  7723. ΓòÉΓòÉΓòÉ 11.81. PTABS() ΓòÉΓòÉΓòÉ
  7724.  
  7725. Calls pcommon_tab_margin() to return tab settings. 
  7726.  
  7727.  
  7728. ΓòÉΓòÉΓòÉ 11.82. PUPPERCASE() ΓòÉΓòÉΓòÉ
  7729.  
  7730. Converts all alphabetic characters in the marked area to uppercase letters. 
  7731.  
  7732.  
  7733. ΓòÉΓòÉΓòÉ 11.83. QUITFILE() -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  7734.  
  7735. Issues quit command after checking windowing and modify status. 
  7736.  
  7737.  
  7738. ΓòÉΓòÉΓòÉ 11.84. QUITFILE() -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  7739.  
  7740. Issues quit command after checking windowing and modify status. 
  7741.  
  7742.  
  7743. ΓòÉΓòÉΓòÉ 11.85. REGISTER_MOUSEHANDLER(IsGlobal, event, mcommand) ΓòÉΓòÉΓòÉ
  7744.  
  7745. Allows the binding of mouse actions to commands. Mouse actions can be global or 
  7746. local. Mouse actions will be processed as follows: 
  7747.  
  7748.  1. local mouse action definition 
  7749.  2. global mouse action definition 
  7750.  3. mouse action ignored 
  7751.  
  7752. The variable IsGlobal determines whether the mouse action described is local or 
  7753. global. The variable event determines the mouse action to be bound with the 
  7754. command listed in the variable mcommand. Event should be in the following 
  7755. format: 
  7756.  
  7757.         'key action state'
  7758.  
  7759. The key refers to the mouse key (either 1 or 2). The action must be one of the 
  7760. following: 
  7761.  
  7762. BEGINDRAG           activates at the beginning of the drag 
  7763. ENDDRAG             activates at the end of a drag 
  7764. CANCELDRAG          activates if a drag is cancelled 
  7765. CLICK               activates if a button (specified by key) is single clicked 
  7766. SECONDCLK           activates if a button (specified by key) is double clicked 
  7767.  
  7768. These actions must be capitalized and have exactly one space between the key 
  7769. and the state numbers. The state should be the sum of the following: 
  7770.  
  7771. 0 = no states active 
  7772. 1 = shift key active 
  7773. 2 = control key active 
  7774. 4 = alternate key active 
  7775.  
  7776. An example of a mouse action definition is: 
  7777.  
  7778. register_mousehandler(0,'2 SECONDCLK 3','quit')
  7779.  
  7780. This would set the second click of button two on the mouse with the shift and 
  7781. control states activated to do a QUIT command. This key action would be bound 
  7782. locally to a particular file. 
  7783.  
  7784.  
  7785. ΓòÉΓòÉΓòÉ 11.86. REMOVE_TRAILING_SPACES() ΓòÉΓòÉΓòÉ
  7786.  
  7787. Calls strip() to remove all trailing blanks; no longer used by standard EPM, 
  7788. but left in for compatibility --> use strip() directly. 
  7789.  
  7790.  
  7791. ΓòÉΓòÉΓòÉ 11.87. SAVEFILE(name) -- in SLNOHOST.e ΓòÉΓòÉΓòÉ
  7792.  
  7793. Issues save command with file specified in name parameter. 
  7794.  
  7795.  
  7796. ΓòÉΓòÉΓòÉ 11.88. SAVEFILE(name) -- in SAVELOAD.e ΓòÉΓòÉΓòÉ
  7797.  
  7798. Issues save command with file specified, after checking whether the file is a 
  7799. host file. 
  7800.  
  7801.  
  7802. ΓòÉΓòÉΓòÉ 11.89. SAYATBOX() ΓòÉΓòÉΓòÉ
  7803.  
  7804. Use the messageNwait command instead. 
  7805.  
  7806.  
  7807. ΓòÉΓòÉΓòÉ 11.90. SCROLL_LOCK() ΓòÉΓòÉΓòÉ
  7808.  
  7809. Determines whether or not the Scroll Lock key has been set on; if so, returns 
  7810. 1; otherwise returns 0. 
  7811.  
  7812.  
  7813. ΓòÉΓòÉΓòÉ 11.91. SEARCH_PATH(AppendPath, FileName) ΓòÉΓòÉΓòÉ
  7814.  
  7815. Searches a path specifed in AppendPath for the file specified in FileName. 
  7816. Returns the pathname, if successful; a null string if unsuccessful. 
  7817.  
  7818.  
  7819. ΓòÉΓòÉΓòÉ 11.92. SELECT_EDIT_KEYS() ΓòÉΓòÉΓòÉ
  7820.  
  7821. Calls filetype() which returns the extension of the file whose fileid is 
  7822. specified in arg(1), then activates the default keyset edit_keys. In EPM this 
  7823. function is defunct. 
  7824.  
  7825.  
  7826. ΓòÉΓòÉΓòÉ 11.93. SETLT(var LT_to_use) ΓòÉΓòÉΓòÉ
  7827.  
  7828. Sets the logical terminal to use. This procedure is only active if host editing 
  7829. is included. 
  7830.  
  7831.  
  7832. ΓòÉΓòÉΓòÉ 11.94. SET_FTO(hostfile, bin var fto) ΓòÉΓòÉΓòÉ
  7833.  
  7834. Sets the file transfer options. This procedure is only active if host editing 
  7835. is included. 
  7836.  
  7837.  
  7838. ΓòÉΓòÉΓòÉ 11.95. SetMouseSet (IsGlobal, NewMSName) ΓòÉΓòÉΓòÉ
  7839.  
  7840. Sets the current mouse action definition keys to the NewMSName. If IsGlobal is 
  7841. true then the effects will be global, if IsGlobal if false then the new 
  7842. settings will only affect the local file and not the rest of the files in the 
  7843. ring. 
  7844.  
  7845.  
  7846. ΓòÉΓòÉΓòÉ 11.96. SetTitleText() ΓòÉΓòÉΓòÉ
  7847.  
  7848. Sets the text in the editor's active title bar. 
  7849.  
  7850.  
  7851. ΓòÉΓòÉΓòÉ 11.97. SHOWWINDOW() ΓòÉΓòÉΓòÉ
  7852.  
  7853. Allows the edit window to be invisible or visible. 
  7854.  
  7855.  
  7856. ΓòÉΓòÉΓòÉ 11.98. SKIP_SPACES() ΓòÉΓòÉΓòÉ
  7857.  
  7858. Performs upon universal variables input (a string) and i (a position in the 
  7859. string) set by next_sym(); increments i beyond any blank spaces. 
  7860.  
  7861.  
  7862. ΓòÉΓòÉΓòÉ 11.99. SORT(firstline, lastline, firstcol, lastcol, fileid) ΓòÉΓòÉΓòÉ
  7863.  
  7864. Sorts the text in the area specified by the parameters. The first four 
  7865. arguements outlines the area of the text to be sorted and the fifth is the id 
  7866. number of the file to be sorted. 
  7867.  
  7868.  
  7869. ΓòÉΓòÉΓòÉ 11.100. SPELLWORD() ΓòÉΓòÉΓòÉ
  7870.  
  7871. Checks the word at the cursor position, removing punctuation characters.  It is 
  7872. assumed that the cursor is positioned at the beginning of the word.  (Used by 
  7873. proof2 and proofword.)  If it's a valid word then check the spelling of the 
  7874. word using the lexam opcode.  If a valid result is returned place it in a PM 
  7875. list box using the 'listbox' procedure. Returns the length of the word found. 
  7876. The optional argument is a string containing a button name.  E.g., '/Next' 
  7877.  
  7878.  
  7879. ΓòÉΓòÉΓòÉ 11.101. SPLITLINES() ΓòÉΓòÉΓòÉ
  7880.  
  7881. Inserts a line; moves the text from the cursor position to the end of line onto 
  7882. the new line; and indents the new line to the column of the first non-blank 
  7883. character of the line preceding it. 
  7884.  
  7885.  
  7886. ΓòÉΓòÉΓòÉ 11.102. SUBDIR() ΓòÉΓòÉΓòÉ
  7887.  
  7888. Uses SUBDIR if in DOS; uses FILEFIND if in OS/2 protect mode; then calls 
  7889. find_routine() to verify that the external utility program exists, and to get 
  7890. its path. 
  7891.  
  7892.  
  7893. ΓòÉΓòÉΓòÉ 11.103. SYNONYM() ΓòÉΓòÉΓòÉ
  7894.  
  7895. Checks the next word on the line for its possible synonyms. If synonyms are 
  7896. found a PM list box is displayed showing the possible new words. 
  7897.  
  7898.  
  7899. ΓòÉΓòÉΓòÉ 11.104. TRUNC(num) ΓòÉΓòÉΓòÉ
  7900.  
  7901. Truncates that part (if any) of num after a decimal point. 
  7902.  
  7903.  
  7904. ΓòÉΓòÉΓòÉ 11.105. UNLOCK(file) ΓòÉΓòÉΓòÉ
  7905.  
  7906. Attempts to unlock a previously locked file in a LAN situation. Returns a zero 
  7907. if successful; a one if unsuccessful. This procedure is only available if 
  7908. requested with the WANT_LAN_SUPPORT option variable. 
  7909.  
  7910.  
  7911. ΓòÉΓòÉΓòÉ 11.106. VMFILE(var name, var cmdline) ΓòÉΓòÉΓòÉ
  7912.  
  7913. Checks to make sure that a host filename (name) is of the correct form. 
  7914.  
  7915.  
  7916. ΓòÉΓòÉΓòÉ 11.107. WINDOWSIZE1(row,col,x,y) ΓòÉΓòÉΓòÉ
  7917.  
  7918. Sizes a window row high and col wide based at the lower left hand corner 
  7919. coordinates of x and y. An optional fifth argument sets: 
  7920.  
  7921. 1 = size window 
  7922. 2 = move window 
  7923. 3 = both (default) 
  7924.  
  7925.  
  7926. ΓòÉΓòÉΓòÉ 12. Return Codes ΓòÉΓòÉΓòÉ
  7927.  
  7928.   RC    Error strings
  7929.  ----  -----------------
  7930.    -1  Unable to Initialize interpreter object
  7931.    -2  File not found
  7932.    -3  Path not found
  7933.    -4  Too many open files
  7934.    -5  Access denied
  7935.    -6  DOS ERROR: Message not available
  7936.    -7  Memory control blocks destroyed. Save files and reboot.
  7937.    -8  Insufficient memory
  7938.    -9  Error Building SubMenu
  7939.   -10  Error Building Menu Item
  7940.  
  7941.   -11  Error Showing Menu
  7942.   -12  Error Deleting Menu
  7943.   -13  Too Many AVIO window
  7944.   -14  DOS ERROR: Message not available
  7945.   -15  Invalid drive
  7946.   -16  DOS ERROR: Message not available
  7947.   -17  DIS ERROR: Message not available
  7948.   -18  No more files
  7949.   -19  Disk is write-protected
  7950.   -20  Unknown unit
  7951.  
  7952.   -21  Drive not ready
  7953.   -22  Unknown command
  7954.   -23  Data error (CRC)
  7955.   -24  Bad request structure length
  7956.   -25  Seek error
  7957.   -26  Unknown media type
  7958.   -27  Sector not found
  7959.   -28  Printer out of paper
  7960.   -29  Write fault
  7961.   -30  Read fault
  7962.  
  7963.   -31  General failure
  7964.   -32  ERROR: Message not available
  7965.  ...   ERROR: Message not available
  7966.  -253  ERROR: Message not available
  7967.  -254  Numeric overflow or underflow
  7968.  -255  Invalid number of arguments
  7969.  -256  Recursion too deep
  7970.  -257  Invalid number of parameters
  7971.  -258  Out of string space
  7972.  -259  Expression stack overflow
  7973.  -260  Invalid fileid
  7974.  
  7975.  -261  Illegal opcode
  7976.  -262
  7977.  -263  Invalid argument
  7978.  -264  For loops nested too deep
  7979.  -265  Divide by zero
  7980.  -266  Unable to shrink
  7981.  -267  Invalid call by reference
  7982.  -268  Procedure needs more arguments
  7983.  -269  User Break. Command halted
  7984.  -270  Not enough memory
  7985.  
  7986.  -271  Error in margin settings
  7987.  -272  Error in tab settings
  7988.  -273  String not found
  7989.  -274  Unknown command
  7990.  -275  Missing filename
  7991.  -276  Line too long to join
  7992.  -277  Too many files
  7993.  -278  Line(s) truncated
  7994.  -279  Text already marked
  7995.  -280  Text not marked
  7996.  
  7997.  -281  Source destination conflict
  7998.  -282  New file
  7999.  -283  Line mark required
  8000.  -284  Error opening file
  8001.  -285  Error writing file
  8002.  -286  Error reading file
  8003.  -287  Insufficient disk space
  8004.  -288  Block mark required
  8005.  -289  Too many rings
  8006.  -290  Invalid EX file or incorrect version.
  8007.  
  8008.  -291  No main entry point
  8009.  -292  Error closing file
  8010.  -293  has been modified
  8011.  -294  Quit without saving?
  8012.  -295
  8013.  -296
  8014.  -297
  8015.  -298
  8016.  -299
  8017.  -300  Command dialog box too long to shell
  8018.  
  8019.  -301  Cannot unlink module in use
  8020.  -302  Cannot unlink base keyset module
  8021.  -303  Internal error: unlink invalid mod
  8022.  -304  Linking module error
  8023.  -305  DEFMAIN not found
  8024.  -306  DEFINIT not found
  8025.  -307  Link: file not found
  8026.  -308  Link: invalid filename
  8027.  -309  File already linked
  8028.  -310  Unlink: unknown module
  8029.  
  8030.  -311  Unlink: bad module filename
  8031.  -312  Call: duplicated proc
  8032.  -313  Call: unknown proc
  8033.  -314  Grep: memory error
  8034.  -315  Grep: missing ]
  8035.  -316  Grep: bad range in [a-z]
  8036.  -317  Grep: empty []
  8037.  -318  Grep: regular expression too long
  8038.  -319  Dynalink: incorrect number of parameters
  8039.  -320
  8040.  
  8041.  -321  Cannot find keyset
  8042.  -322  Dynalink: unrecognized library name
  8043.  -323  Line number invalid or too large for file
  8044.  -324  Keyboard status failed
  8045.  -325  Buffer creation size too large
  8046.  -326  Dynalink: unrecognized procedure name
  8047.  -327  Too many keysets
  8048.  -328
  8049.  -328  Invalid first parameter
  8050.  -329  Invalid second parameter
  8051.  -330  Invalid third parameter
  8052.  
  8053.  -331  Invalid fourth parameter
  8054.  -332  Invalid fifth parameter
  8055.  -333  Invalid sixth parameter
  8056.  -334  Invalid seventh parameter
  8057.  -335  Invalid Subcommand
  8058.  -336  Invalid column number
  8059.  -337  Invalid array identifier
  8060.  -338  Array already exists:
  8061.  -339  ERROR: Message not available
  8062.   ...  ERROR: Message not available
  8063.   etc.
  8064.  
  8065.  
  8066. ΓòÉΓòÉΓòÉ 13. ET Compilation Error Message Explanations ΓòÉΓòÉΓòÉ
  8067.  
  8068. If you have made changes to the configuration or have programmed your own 
  8069. macros in the E language, this section is important to you. Any syntactic or 
  8070. semantic errors in your programming, will be noted by the ET compiler. The 
  8071. following section describes each compilation error in simple terms. When you 
  8072. receive an error from ET, note the error message and look it up in the 
  8073. following list. The messages appear in alphabetic order. 
  8074.  
  8075.  
  8076. ΓòÉΓòÉΓòÉ 13.1. Column specification out of range. ΓòÉΓòÉΓòÉ
  8077.  
  8078. The value specified for a column position exceeds the compiler's maximum line 
  8079. length of 255. 
  8080.  
  8081.  
  8082. ΓòÉΓòÉΓòÉ 13.2. Comment not terminated. ΓòÉΓòÉΓòÉ
  8083.  
  8084. You have begun a comment with the '/*' string but never ended it with a 
  8085. matching '*/'. This means that all code after the comment has been ignored by 
  8086. the compiler.  Reaching an end of file has alerted the compiler to the fact 
  8087. that the comment was not terminated. 
  8088.  
  8089.  
  8090. ΓòÉΓòÉΓòÉ 13.3. DEFMAIN already defined. ΓòÉΓòÉΓòÉ
  8091.  
  8092. You have defined more than one main procedure using the DEFMAIN statement. Only 
  8093. one can be defined at a time. See User's Manual section Definition Primitives 
  8094. for more information. 
  8095.  
  8096.  
  8097. ΓòÉΓòÉΓòÉ 13.4. EX code too big. ΓòÉΓòÉΓòÉ
  8098.  
  8099. The code that ET is producing after compiling your input file is taking up more 
  8100. space than allowable. The maximum amount of memory available for a .EX file is 
  8101. 65,500 bytes. 
  8102.  
  8103.  
  8104. ΓòÉΓòÉΓòÉ 13.5. Expecting '('. ΓòÉΓòÉΓòÉ
  8105.  
  8106. The compiler was expecting a left parenthesis.  Possible reasons for this are 
  8107. that you have called a procedure and omitted the parentheses after the 
  8108. procedure name. The syntax for procedure calls is either: 
  8109.  
  8110.      proc_name([parameters])
  8111.  OR  call proc_name([parameters])
  8112.  
  8113.  
  8114. ΓòÉΓòÉΓòÉ 13.6. Expecting ')'. ΓòÉΓòÉΓòÉ
  8115.  
  8116. The compiler was expecting a right parenthesis to match a left parenthesis 
  8117. which was read in earlier.  Perhaps you have not matched each parenthesis in a 
  8118. procedure call or complex expression.  For example, if the following expression 
  8119. was typed in YOUR_FILE.E:           call proc_test( k=( (a*b)+ 8 ),  you would 
  8120. have received such an error message because there are three left parentheses 
  8121. and only two right parentheses. 
  8122.  
  8123.  
  8124. ΓòÉΓòÉΓòÉ 13.7. Expecting ';'. ΓòÉΓòÉΓòÉ
  8125.  
  8126. The compiler's newline symbol is the semi-colon (';'). Therefore, they are 
  8127. often interchangeable. A statement was encountered whose syntax requires either 
  8128. a semi-colon or a new line in a specific place, but no such semi-colon or new 
  8129. line was found. For example, each INCLUDE statement is required to end with 
  8130. either a semi-colon or a new line. All of the following examples are 
  8131. syntactically correct: 
  8132.  
  8133. include 'mystuff.e' ; include 'mykeys.e'
  8134.  
  8135. AND
  8136.  
  8137. include 'mystuff.e'
  8138. include 'mykeys.e'
  8139.  
  8140. AND
  8141.  
  8142. include 'mystuff.e' ; x = 1
  8143. However, you could not have multiple INCLUDE statements on one line without a 
  8144. semi-colon as separator. 
  8145.  
  8146.  
  8147. ΓòÉΓòÉΓòÉ 13.8. Expecting ','. ΓòÉΓòÉΓòÉ
  8148.  
  8149. A statement has been found whose syntax dictates that there should be a comma 
  8150. in a specific position, yet no comma was found there. The most likely cause of 
  8151. this error message is that you have called some built-in procedure, but have 
  8152. not given the correct number of parameters.  The compiler is looking for a 
  8153. comma which would indicate that there are more parameters still to come. 
  8154.  
  8155.  
  8156. ΓòÉΓòÉΓòÉ 13.9. Expecting '='. ΓòÉΓòÉΓòÉ
  8157.  
  8158. A statement was found whose syntax dictates that an assignment operator must 
  8159. occur at some specific place in the statement, but no such assignment symbol 
  8160. was found.  One example of such a statement is the FOR statement.  As shown in 
  8161. section Conditional and Loop Statements, there must be a '=' symbol immediately 
  8162. after the loop variable name. The other likely causes of this error are syntax 
  8163. errors in: (1) the FUNCTIONKEYTEXT statement (see Built-in Statements and 
  8164. Procedures for correct syntax) and (2) a CONST declaration (see Constants). 
  8165.  
  8166.  
  8167. ΓòÉΓòÉΓòÉ 13.10. Expecting an identifier. ΓòÉΓòÉΓòÉ
  8168.  
  8169. A statement has been found whose syntax dictates that there should be an 
  8170. identifier in a specific position, yet no such identifier was found. One 
  8171. possible cause of this error message is that you have defined a keyset with the 
  8172. DEFKEYS keyword, but forgot to name the keyset. See section Key Definitions 
  8173. (DEF and DEFKEYS) for the syntax of the DEFKEYS statement. 
  8174.  
  8175. Another less obvious reason for this error is that you have used a keyword or 
  8176. procedure name in place of an identifier. For example, if you try to declare: 
  8177.  
  8178. UNIVERSAL function_key_text
  8179. Since function_key_text is a predefined universal variable, it is a reserved 
  8180. word, and therefore is not considered an identifier. 
  8181.  
  8182.  
  8183. ΓòÉΓòÉΓòÉ 13.11. Expecting constant expression. ΓòÉΓòÉΓòÉ
  8184.  
  8185. You have begun a constant definition statement by using the CONST keyword, but 
  8186. you have not assigned a constant expression (an expression involving only 
  8187. arithmetic operators, numbers and previously defined constants) to an 
  8188. identifier. Please use the following syntax: 
  8189.  
  8190. CONST
  8191.    max_id=7
  8192.    max_len=max_id * 10
  8193.  
  8194.  
  8195. ΓòÉΓòÉΓòÉ 13.12. Expecting DEFinition primitive. ΓòÉΓòÉΓòÉ
  8196.  
  8197. The compiler is expecting a definition primitive, i.e. one of the DEFxxxx 
  8198. statements, a SET statement, an INCLUDE statement or a CONST statement. 
  8199. Unfortunately, this error message can be triggered at inappropriate times when 
  8200. the compiler is confused by the syntax it has read. This error message often 
  8201. complains about a statement in the middle of a DEF construct. Do not 
  8202. necessarily assume that you need to add a DEF. Each of these cases must be 
  8203. evaluated individually. 
  8204.  
  8205. However, this error message does have value when it reports on a statement that 
  8206. has been issued outside a DEF construct. Remember that you cannot have 
  8207. statements outside a DEFxxxx block. All statements must be contained within a 
  8208. DEFxxxx primitive. Often a statement issued outside a DEF is not reported 
  8209. because since there is no keyword or statement to terminate the DEF, the 
  8210. compiler assumes that the statement belongs to the last DEF. However, there are 
  8211. cases when it will correctly report this error. For example, assume the 
  8212. following statements occur in some file TEST.E: 
  8213.  
  8214. CONST
  8215.    stuff = 1
  8216.  
  8217. sayerror "stuff is " stuff
  8218.  
  8219. defproc test1()
  8220.    temp = 45 * 36
  8221. During compilation of TEST.E, the user would receive an "Expecting DEF" error 
  8222. message with an arrow pointing to the sayerror statement. Since a CONST 
  8223. statement is a DEF primitive, it ends all previous DEFS, and since sayerror is 
  8224. not accepted as part of a CONST construct, an error is reported. 
  8225.  
  8226.  
  8227. ΓòÉΓòÉΓòÉ 13.13. Expecting DO ΓòÉΓòÉΓòÉ
  8228.  
  8229. A WHILE construct has been started, i.e. a WHILE keyword has been found, but 
  8230. the keyword DO is missing from the statement.  Please check the section on 
  8231. Conditional and Loop Statements for the syntax of the WHILE DO statement. 
  8232.  
  8233.  
  8234. ΓòÉΓòÉΓòÉ 13.14. Expecting DO WHILE or DO FOREVER ΓòÉΓòÉΓòÉ
  8235.  
  8236. One of the DO constructs has been started, i.e.  a DO keyword was found, but 
  8237. the rest of the statement's syntax does not fit any of the DO constructs ( DO 
  8238. WHILE, DO FOREVER, and/or DO (FOR) ).  See section Conditional and Loop 
  8239. Statements for the syntax of the DO construct. 
  8240.  
  8241.  
  8242. ΓòÉΓòÉΓòÉ 13.15. Expecting END to DO loop. ΓòÉΓòÉΓòÉ
  8243.  
  8244. One of the DO constructs ( DO-WHILE, DO FOREVER or DO (FOR) ) has been started, 
  8245. but no 'END' or 'ENDDO' statement has been found to end the loop. Please refer 
  8246. to section Conditional and Loop Statements for the syntax of the DO constructs. 
  8247.  
  8248.  
  8249. ΓòÉΓòÉΓòÉ 13.16. Expecting ENDFOR. ΓòÉΓòÉΓòÉ
  8250.  
  8251. A FOR construct has been started, i.e.  a FOR keyword has been found, but no 
  8252. ENDFOR keyword has been found to end the loop. Please check the section on 
  8253. Conditional and Loop Statements for the syntax of the FOR statement. 
  8254.  
  8255.  
  8256. ΓòÉΓòÉΓòÉ 13.17. Expecting ENDIF to terminate IF statement. ΓòÉΓòÉΓòÉ
  8257.  
  8258. An IF keyword has been read, but no ENDIF statement has been found to end the 
  8259. block of statements encased by the IF condition.  See the section on 
  8260. Conditional and Loop Statements for the syntax of the IF statement. 
  8261.  
  8262.  
  8263. ΓòÉΓòÉΓòÉ 13.18. Expecting ENDLOOP to terminate LOOP. ΓòÉΓòÉΓòÉ
  8264.  
  8265. A LOOP construct has been started, but no ENDLOOP statement has been found to 
  8266. end the loop.  See section Conditional and Loop Statements for the syntax of 
  8267. the LOOP construct. 
  8268.  
  8269.  
  8270. ΓòÉΓòÉΓòÉ 13.19. Expecting ENDWHILE to terminate WHILE. ΓòÉΓòÉΓòÉ
  8271.  
  8272. A WHILE construct has been started, but no ENDWHILE statement has been found to 
  8273. end the loop. Please refer to section Conditional and Loop Statements for the 
  8274. syntax of the WHILE construct. 
  8275.  
  8276.  
  8277. ΓòÉΓòÉΓòÉ 13.20. Expecting procedure name. ΓòÉΓòÉΓòÉ
  8278.  
  8279. A procedure definition has been started, i.e. a DEFPROC keyword has been found, 
  8280. but no procedure name appeared after it to identify the procedure. Please see 
  8281. the section on Definition Primitives for the syntax of a DEFPROC statement. 
  8282.  
  8283.  
  8284. ΓòÉΓòÉΓòÉ 13.21. Expecting quoted string. ΓòÉΓòÉΓòÉ
  8285.  
  8286. A statement was found whose syntax dictates that a quoted string must occur at 
  8287. some specific place in the statement, but no such quoted string was found. An 
  8288. example of such a statement is the SAY statement. As shown in section Built-in 
  8289. Statements and Procedures, there must be a quoted string immediately after the 
  8290. SAY keyword. 
  8291.  
  8292.  
  8293. ΓòÉΓòÉΓòÉ 13.22. Expecting THEN. ΓòÉΓòÉΓòÉ
  8294.  
  8295. An IF construct has been started, i.e.  an IF keyword was found, but no THEN 
  8296. keyword can been found.  See section Conditional and Loop Statements for the 
  8297. syntax of the IF-THEN-ELSE statement. 
  8298.  
  8299.  
  8300. ΓòÉΓòÉΓòÉ 13.23. Expecting TO. ΓòÉΓòÉΓòÉ
  8301.  
  8302. A FOR construct has been started, i.e. a FOR keyword has been found, but the 
  8303. keyword TO is missing from the statement.  Please check the section Conditional 
  8304. and Loop Statements for the syntax of the FOR statement. 
  8305.  
  8306.  
  8307. ΓòÉΓòÉΓòÉ 13.24. Expecting VALUE. ΓòÉΓòÉΓòÉ
  8308.  
  8309. A PARSE statement has been started, i.e. the keyword PARSE was found, but 
  8310. neither a VALUE nor an ARG keyword can been found.  See the User's Manual 
  8311. section The Parse Statement for the syntax of the PARSE statement. 
  8312.  
  8313.  
  8314. ΓòÉΓòÉΓòÉ 13.25. Expecting variable name. ΓòÉΓòÉΓòÉ
  8315.  
  8316. A statement was found whose syntax dictates that a variable name must occur at 
  8317. some specific place in the statement, but no such variable name was found. An 
  8318. example of such a statement is the FOR statement. As shown in the section on 
  8319. Conditional and Loop Statements, there must be a variable name (the loop 
  8320. variable to be incremented) immediately after the FOR keyword. 
  8321.  
  8322.  
  8323. ΓòÉΓòÉΓòÉ 13.26. Expecting WITH. ΓòÉΓòÉΓòÉ
  8324.  
  8325. A PARSE-VALUE statement has been started, i.e.  the keywords PARSE and VALUE 
  8326. were found, but a WITH keyword cannot be found.  See the section on The Parse 
  8327. Statement for the syntax of the PARSE statement. 
  8328.  
  8329.  
  8330. ΓòÉΓòÉΓòÉ 13.27. Expression not assignment compatible. ΓòÉΓòÉΓòÉ
  8331.  
  8332. The compiler has detected an assignment in which the expression on the right 
  8333. side of the assignment operator can not be assigned to the expression or 
  8334. identifier on the left side.  The most common cause of this is that you have 
  8335. tried to assign a value to something other than a variable, i.e. a constant or 
  8336. procedure. 
  8337.  
  8338.  
  8339. ΓòÉΓòÉΓòÉ 13.28. Expression too complex. ΓòÉΓòÉΓòÉ
  8340.  
  8341. An expression is any combination of identifiers (variables, constants, and/or 
  8342. procedures), numbers and operators that fit the syntax of a language. A complex 
  8343. expression is one that contains expressions within itself. For example, the 
  8344. following is an expression: 
  8345.  
  8346. test_var + 6.
  8347. An example of a complex expression would be: 
  8348.  
  8349. ( (test_var + 6) * 8).
  8350. Each of the innermost expressions must be evaluated before the entire 
  8351. expression can be assigned a value.  The specified expression in your input 
  8352. file is too complicated, i.e.  has too many expressions within itself, for the 
  8353. compiler to evaluate it.  Please break the expression into several less complex 
  8354. expressions.  For example, let us assume that the following expression was too 
  8355. complex: 
  8356.  
  8357. call proc_test( k=( (a*b)+ 8 ) ),
  8358. You could simplify the call to proc_test by assigning some of the inner 
  8359. expressions to temporary variables.  One solution would be: 
  8360.  
  8361. temp1 = a*b
  8362. k = temp1 + 8
  8363. call proc_test(k)
  8364. Note: The above expression is a simple example. It is not too complex for the 
  8365. compiler. ET allows for 40 expressions within an expression. 
  8366.  
  8367.  
  8368. ΓòÉΓòÉΓòÉ 13.29. Extraneous parameters. ΓòÉΓòÉΓòÉ
  8369.  
  8370. You have specified too many parameters in the command dialog box.  The syntax 
  8371. is:      ET [options] inputfile[.e] [outputfile[.ex]]  Remember that any 
  8372. options MUST PRECEDE the input and output filenames! 
  8373.  
  8374.  
  8375. ΓòÉΓòÉΓòÉ 13.30. FUNCTION_KEY_TEXT exceed max number of characters. ΓòÉΓòÉΓòÉ
  8376.  
  8377. You have attempted to change the text displayed at the bottom of the screen 
  8378. which describes what function each function key performs. The text that you 
  8379. have chosen is longer than the maximum number of characters allowed, which is 
  8380. 80. 
  8381.  
  8382.  
  8383. ΓòÉΓòÉΓòÉ 13.31. Identifier already defined as same or different type. ΓòÉΓòÉΓòÉ
  8384.  
  8385. You are trying to use an identifier to name a variable, constant or procedure 
  8386. uniquely, yet the identifier has already been used in the same scope for 
  8387. another purpose. Check over your program and rename the appropriate 
  8388. identifiers. 
  8389.  
  8390.  
  8391. ΓòÉΓòÉΓòÉ 13.32. Identifier too long. ΓòÉΓòÉΓòÉ
  8392.  
  8393. The number of characters in the name of the specified variable, constant, 
  8394. procedure, etc. exceeds the maximum allowance of 255 characters. Please rename 
  8395. it with fewer letters and/or numbers. 
  8396.  
  8397.  
  8398. ΓòÉΓòÉΓòÉ 13.33. Illegal character. ΓòÉΓòÉΓòÉ
  8399.  
  8400. This character does not make sense or is not allowed in the E language. One 
  8401. example of E code which would yield this error message is if a unary minus or 
  8402. plus operator is used preceding an alphabetic character rather than a digit. 
  8403. For example, 
  8404.  
  8405. temp = +c
  8406. These unary operators make sense only with numeric operands. 
  8407.  
  8408.  
  8409. ΓòÉΓòÉΓòÉ 13.34. Illegal operator. ΓòÉΓòÉΓòÉ
  8410.  
  8411. An operator is some function to be performed on its operands. Operands are 
  8412. identifiers or constant values that are acted upon by operators.  Examples of 
  8413. operators are: '+' (addition), '=' (assignment), 'NOT' (logical negation), and 
  8414. '<=' (less than or equal). The operator you have specified does not exist in 
  8415. the E language. Please check the Operators section for a complete list of 
  8416. operators. 
  8417.  
  8418.  
  8419. ΓòÉΓòÉΓòÉ 13.35. INCLUDES nested too deep. ΓòÉΓòÉΓòÉ
  8420.  
  8421. A nested INCLUDE statement means that a file, for example FILE1.E, contains a 
  8422. statement:           include 'file2.e'  and that file2.e also contains an 
  8423. INCLUDE statement, which includes a third file. ET only allows for 5 levels of 
  8424. nested include files. You have exceeded this limit. Please reorganize your 
  8425. files. 
  8426.  
  8427.  
  8428. ΓòÉΓòÉΓòÉ 13.36. Internal error in POPS. ΓòÉΓòÉΓòÉ
  8429.  
  8430. This error is internal to the workings of the ET compiler. It has nothing to do 
  8431. with user input. Please send a note to the userid EOS2 at YORKTOWN with 
  8432. information regarding the error. 
  8433.  
  8434.  
  8435. ΓòÉΓòÉΓòÉ 13.37. Invalid argument. ΓòÉΓòÉΓòÉ
  8436.  
  8437. The argument specified in the procedure call is incorrect. Specifically, the 
  8438. string argument in the SAYERROR() procedure call does not match any of the 
  8439. strings associated with error messages known to the compiler. Read the 
  8440. description of the usage of the SAYERROR() procedure in section Built-in 
  8441. Statements and Procedures for more information. 
  8442.  
  8443.  
  8444. ΓòÉΓòÉΓòÉ 13.38. Invalid color. ΓòÉΓòÉΓòÉ
  8445.  
  8446. You are trying to redefine the colors of the E editor; however the syntax of 
  8447. your statement is incorrect.  Possible explanations of this are that: (1) you 
  8448. have not used an identifier to name the constant, (2) you have not used a valid 
  8449. color value name, or (3) you have not separated each assignment with either a 
  8450. semi-colon or a new line. An example of the syntax is:    /* color example */ 
  8451. TEXTCOLOR   = BLUE  For more information on usage, see section Changing the 
  8452. Default Configuration in The EPM User's Guide. For a list of valid color value 
  8453. names, see the top of the COLORS.E file which contains the values of the 
  8454. defaults. 
  8455.  
  8456.  
  8457. ΓòÉΓòÉΓòÉ 13.39. Invalid cursor setting. ΓòÉΓòÉΓòÉ
  8458.  
  8459. You are trying to set the default cursor sizes, but the values you have given 
  8460. in the set cursors statement are not valid. Valid values are 1 through 15. 
  8461.  
  8462.  
  8463. ΓòÉΓòÉΓòÉ 13.40. Invalid expression. ΓòÉΓòÉΓòÉ
  8464.  
  8465. This expression is not a valid expression in the E language. Please refer to E 
  8466. Language Syntax for a list of all valid expressions. 
  8467.  
  8468.  
  8469. ΓòÉΓòÉΓòÉ 13.41. Invalid field name. ΓòÉΓòÉΓòÉ
  8470.  
  8471. You have attempted to manipulate a field in the fileid structure; however the 
  8472. field you have named does not exist. Check section Fileid Structure for a list 
  8473. of all field names. 
  8474.  
  8475.  
  8476. ΓòÉΓòÉΓòÉ 13.42. Invalid key name. ΓòÉΓòÉΓòÉ
  8477.  
  8478. A KEY keyword has been found, but no valid keyname followed the keyword. There 
  8479. are a limited number of keys on the keyboard that can be redefined. For a 
  8480. complete list of those keys, see E Language Syntax. 
  8481.  
  8482.  
  8483. ΓòÉΓòÉΓòÉ 13.43. Invalid margin setting. ΓòÉΓòÉΓòÉ
  8484.  
  8485. You are trying to reset the margins for the E editor, but the column values of 
  8486. your desired margin settings are invalid. Possible causes of this error are 
  8487. that you have tried: (1) to set a margin past E's maximum margin column (254), 
  8488. (2) to set a margin in a zero or negative column, or (3) to set the left margin 
  8489. in a column greater than the right margin. Please refer to The EPM User's Guide 
  8490. for examples of the correct syntax. 
  8491.  
  8492.  
  8493. ΓòÉΓòÉΓòÉ 13.44. Invalid number of parameters. ΓòÉΓòÉΓòÉ
  8494.  
  8495. You have called a procedure with fewer parameters than it is defined to have. 
  8496. For example, in the section Built-in Statements and Procedures, look at the 
  8497. description of the procedure SUBSTR(). SUBSTR() is defined to have two, three 
  8498. or four parameters, but it requires AT LEAST two parameters to perform its 
  8499. function.  If the user invokes the function with only one argument, for example 
  8500. SUBSTR('abc'), an error will occur. 
  8501.  
  8502.  
  8503. ΓòÉΓòÉΓòÉ 13.45. Invalid numeric. ΓòÉΓòÉΓòÉ
  8504.  
  8505. You have attempted to perform some arithmetic function on variables that are 
  8506. not numeric; or you have mixed other characters in with some digits. For 
  8507. example, 35.x or 3temp_var are not valid expressions. The compiler expects 
  8508. identifiers to BEGIN WITH AN ALPHABETIC CHARACTER, and expects numbers to 
  8509. consist solely of digits and certain special characters (for example, the 
  8510. decimal point "."). 
  8511.  
  8512.  
  8513. ΓòÉΓòÉΓòÉ 13.46. Invalid option. ΓòÉΓòÉΓòÉ
  8514.  
  8515. You have specified an option in the command dialog box which does not exist. 
  8516. Check The EPM User's Guide or section Command Summary for all possible command 
  8517. dialog box options. 
  8518.  
  8519.  
  8520. ΓòÉΓòÉΓòÉ 13.47. Invalid set name. ΓòÉΓòÉΓòÉ
  8521.  
  8522. You are trying to set a configurable option for the E editor, but the option 
  8523. you have named in the SET statement does not exist. Please check The EPM User's 
  8524. Guide for a complete list of options. 
  8525.  
  8526.  
  8527. ΓòÉΓòÉΓòÉ 13.48. Invalid tab setting. ΓòÉΓòÉΓòÉ
  8528.  
  8529. You are trying to reset the tabs for the E editor, but the column values of 
  8530. your desired tab settings are invalid. Possible causes of this error are that: 
  8531. (1) you have tried to set a tab past E's maximum column (255), (2) you have 
  8532. tried to set a tab in a negative column, or (3) you have not typed the tab 
  8533. settings in ascending order. Tab settings CANNOT be listed in a mixed order, 
  8534. for example:           tabs 5 10 20 15 30 25 ...  They must be written in 
  8535. ascending order. In the above example, the statement must be rewritten as 
  8536. follows:           tabs 5 10 15 20 25 30 ... 
  8537.  
  8538.  
  8539. ΓòÉΓòÉΓòÉ 13.49. ITERATE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  8540.  
  8541. An ITERATE statement has been issued outside one of the loop constructs (WHILE, 
  8542. LOOP, or DO).  Since the ITERATE statement only makes sense in combination with 
  8543. a loop, this is an error. See section Conditional and Loop Statements for the 
  8544. rules governing and syntax of the ITERATE statement. 
  8545.  
  8546.  
  8547. ΓòÉΓòÉΓòÉ 13.50. Keyset not defined. ΓòÉΓòÉΓòÉ
  8548.  
  8549. You have issued a KEYS statement to change the keyset to a predefined keyset; 
  8550. however the named keyset has not been defined in the current scope. In order to 
  8551. use a KEYS keyset_name statement, you must have issued a DEFKEYS keyset_name 
  8552. statement to define the named keyset and then issued a series of DEF statements 
  8553. to define the new function of the desired keys.  A sample keyset definition can 
  8554. be found in section Key Definitions (DEF and DEFKEYS). 
  8555.  
  8556.  
  8557. ΓòÉΓòÉΓòÉ 13.51. LEAVE may only be executed inside a loop. ΓòÉΓòÉΓòÉ
  8558.  
  8559. A LEAVE statement has been issued outside one of the loop constructs (WHILE, 
  8560. LOOP, or DO).  Since the LEAVE statement only makes sense in combination with a 
  8561. loop, this is an error.  See section on Conditional and Loop Statements for the 
  8562. rules governing and syntax of the LEAVE statement. 
  8563.  
  8564.  
  8565. ΓòÉΓòÉΓòÉ 13.52. Line too long. ΓòÉΓòÉΓòÉ
  8566.  
  8567. The number of characters in this line exceeds the maximum. The maximum line 
  8568. length is 255 characters. Please break-up the line using the technique 
  8569. discussed in section Line Continuations. 
  8570.  
  8571.  
  8572. ΓòÉΓòÉΓòÉ 13.53. More than max number of global variables. ΓòÉΓòÉΓòÉ
  8573.  
  8574. You have defined more global variables than the compiler allows. The maximum 
  8575. number of global variables is 8200.  Note Any variable preceded by the 
  8576. UNIVERSAL keyword is considered global, i.e. any procedure can access it. 
  8577.  
  8578.  
  8579. ΓòÉΓòÉΓòÉ 13.54. More than max number of local variables. ΓòÉΓòÉΓòÉ
  8580.  
  8581. Your procedure has been defined with more than the compiler's maximum number of 
  8582. allowable local variables, i.e. variables defined within the procedure.  The 
  8583. maximum number of locals is 1038. 
  8584.  
  8585.  
  8586. ΓòÉΓòÉΓòÉ 13.55. Not enough core. ΓòÉΓòÉΓòÉ
  8587.  
  8588. Your computer does not have enough core memory (primary memory not disk space) 
  8589. to compile the specified input file and write compiled code to an output file. 
  8590. Typically, 320K of memory is required; however if you have added a great amount 
  8591. of code to the e.e file, more memory may be necessary. 
  8592.  
  8593.  
  8594. ΓòÉΓòÉΓòÉ 13.56. Number out of range or expecting number. ΓòÉΓòÉΓòÉ
  8595.  
  8596. This error could occur for a few different reasons. The first possible cause of 
  8597. the error is incorrect syntax or semantics in a parse statement. If a '+' or 
  8598. '-' was encountered in the template portion of a PARSE statement, a number is 
  8599. expected to follow it. Either a number did not follow one of these operators or 
  8600. the number that did follow exceeded 255. Remember that the numbers in the 
  8601. template represent column specifications and therefore cannot exceed the 
  8602. maximum column. Please see section The Parse Statement for the exact syntax of 
  8603. the parse statement. 
  8604.  
  8605. Another possible cause of this error is that an arithmetic operator symbol was 
  8606. found in an expression, and yet all of the operands were either not numeric or 
  8607. exceeded the compiler's maximum number of 32,767. 
  8608.  
  8609.  
  8610. ΓòÉΓòÉΓòÉ 13.57. Number too large. ΓòÉΓòÉΓòÉ
  8611.  
  8612. This error occurs only when the compiler is translating ASCII codes preceded by 
  8613. the '\' operator. Values following such a '\' cannot exceed 255. See section 
  8614. String Expressions for a more detailed explanation of this use of the backslash 
  8615. character. 
  8616.  
  8617.  
  8618. ΓòÉΓòÉΓòÉ 13.58. Numeric overflow. ΓòÉΓòÉΓòÉ
  8619.  
  8620. You have attempted to perform some arithmetic function where the result has an 
  8621. exponent greater than 999999999. 
  8622.  
  8623.  
  8624. ΓòÉΓòÉΓòÉ 13.59. Out of symbol table space. ΓòÉΓòÉΓòÉ
  8625.  
  8626. The compiler allocates a certain amount of memory space for each variable. The 
  8627. space is needed to store necessary information relevant to that variable. 
  8628. There is not enough primary memory (not disk space) on your computer to allow 
  8629. any more variables to be used. 
  8630.  
  8631.  
  8632. ΓòÉΓòÉΓòÉ 13.60. Procedure not defined. ΓòÉΓòÉΓòÉ
  8633.  
  8634. You have called or made reference to a procedure which was never defined. 
  8635. Please define the procedure or delete the call to it.  Note: the compiler will 
  8636. not tell you where the call to the undefined procedure occurred or whether 
  8637. there are many such occurrences. 
  8638.  
  8639.  
  8640. ΓòÉΓòÉΓòÉ 13.61. String not terminated. ΓòÉΓòÉΓòÉ
  8641.  
  8642. The specified string was not enclosed with quote marks. The final quote was 
  8643. omitted. 
  8644.  
  8645.  
  8646. ΓòÉΓòÉΓòÉ 13.62. Too many arguments. ΓòÉΓòÉΓòÉ
  8647.  
  8648. You have defined a procedure or function with more than the compiler's maximum 
  8649. number of allowable arguments. The maximum number of arguments is 8. 
  8650.  
  8651.  
  8652. ΓòÉΓòÉΓòÉ 13.63. Unable to open input file. ΓòÉΓòÉΓòÉ
  8653.  
  8654. The compiler could not open the file which you listed in the command dialog box 
  8655. as the input file.  This is probably due to the fact that no such file exists. 
  8656. Check your spelling of the filename and make sure the file is in the current 
  8657. directory. 
  8658.  
  8659.  
  8660. ΓòÉΓòÉΓòÉ 13.64. Unable to open output file. ΓòÉΓòÉΓòÉ
  8661.  
  8662. The compiler cannot create the file you named in the command dialog box as the 
  8663. output file. This probably occurred because you gave a nonexistent path to the 
  8664. file. Check the spelling and accuracy of the pathname. (The default pathname is 
  8665. the current directory.) 
  8666.  
  8667.  
  8668. ΓòÉΓòÉΓòÉ 13.65. Unable to read input file. ΓòÉΓòÉΓòÉ
  8669.  
  8670. The compiler was unable to read from the input file you specified in the 
  8671. command dialog box. This maybe due to the fact that the file is locked or 
  8672. damaged. Please check the file. 
  8673.  
  8674.  
  8675. ΓòÉΓòÉΓòÉ 13.66. Unable to write output file. ΓòÉΓòÉΓòÉ
  8676.  
  8677. The compiler cannot write to the file you named in the command line as the 
  8678. output file.  This error could occur because the file is read-only or because 
  8679. no space is left on the disk. 
  8680.  
  8681.  
  8682. ΓòÉΓòÉΓòÉ 13.67. Variable not initialized. ΓòÉΓòÉΓòÉ
  8683.  
  8684. You have used a variable which was never initialized.  The variable has no 
  8685. value; therefore the expression containing it cannot be evaluated. 
  8686.  
  8687. Another common cause for this error is when a command has been issued within an 
  8688. E statement, but the command has not been quoted. Please read the section Using 
  8689. EPM Commands in E Statements for information on how to use commands in an E 
  8690. program. 
  8691.  
  8692.  
  8693. ΓòÉΓòÉΓòÉ 14. Ordinal Values of Functions Accessed via DOSCALLS.DLL ΓòÉΓòÉΓòÉ
  8694.  
  8695. This list shows the mapping between the DOS system function names and their 
  8696. ordinal values.  In order to access one of these system functions in OS/2, you 
  8697. must make a call to the function DYNALINK(), and include the function's ordinal 
  8698. value in the parameter list.  For more information, see the DYNALINK() entry in 
  8699. section Built-in Statements and Procedures. 
  8700.  
  8701. Function Name                   Ordinal Value
  8702. -------------                   -------------
  8703. DBGETKVAR                           109
  8704. DBGETOWNER                          117
  8705. DBMEMFREE                           116
  8706. DBMEMLOCK                           112
  8707. DBMEMREALLOC                        115
  8708. DBMEMUNLOCK                         113
  8709. DBPHYSINFO                          118
  8710. DBSEGALLOC                          114
  8711. DOSALLOCHUGE                         40
  8712. DOSALLOCSEG                          34
  8713. DOSALLOCSHRSEG                       35
  8714. DOSBEEP                              50
  8715. DOSBUFRESET                          56
  8716. DOSCALLBACK                         157
  8717. DOSCHDIR                             57
  8718. DOSCHGFILEPTR                        58
  8719. DOSCLIACCESS                         51
  8720. DOSCLOSE                             59
  8721. DOSCLOSESEM                          23
  8722. DOSCREATECSALIAS                     43
  8723. DOSCREATESEM                         24
  8724. DOSCWAIT                              2
  8725. DOSDELETE                            60
  8726. DOSDEVCONFIG                         52
  8727. DOSDEVIOCTL                          53
  8728. DOSDEVIOCTL2                         99
  8729. DOSDUPHANDLE                         61
  8730. DOSENTERCRITSEC                       3
  8731. DOSENUMATTRIBUTE                    204
  8732. DOSERROR                            120
  8733. DOSEXIT                               5
  8734. DOSEXITCRITSEC                        6
  8735. DOSEXITLIST                           7
  8736. DOSFILELOCKS                         62
  8737. DOSFINDCLOSE                         63
  8738. DOSFINDFIRST                         64
  8739. DOSFINDNEXT                          65
  8740.  
  8741. DOSFLAGPROCESS                       15
  8742. DOSFREEMODULE                        46
  8743. DOSFREESEG                           39
  8744. DOSGETCP                            130
  8745. DOSGETDATETIME                       33
  8746. DOSGETENV                            91
  8747. DOSGETHUGESHIFT                      41
  8748. DOSGETINFOSEG                         8
  8749. DOSGETMACHINEMODE                    49
  8750. DOSGETMODHANDLE                      47
  8751. DOSGETMODNAME                        48
  8752. DOSGETPID                            94
  8753. DOSGETPROCADDR                       45
  8754. DOSGETPRTY                            9
  8755. DOSGETSEG                           121
  8756. DOSGETSHRSEG                         36
  8757. DOSGETSTDA                          119
  8758. DOSGETVERSION                        92
  8759. DOSGIVESEG                           37
  8760. DOSGLOBALSEG                        132
  8761. DOSHOLDSIGNAL                        13
  8762. DOSHUGEINCR                         136
  8763. DOSHUGESHIFT                        135
  8764. DOSICANONICALIZE                    100
  8765. DOSICREATETHREAD                      1
  8766. DOSIEXECPGM                           4
  8767. DOSIRAMSEMWAKE                      125
  8768. DOSIREAD                             79
  8769. DOSISEMREQUEST                       18
  8770. DOSISEMWAIT                          21
  8771. DOSISETCP                           131
  8772. DOSISYSSEMCLEAR                      17
  8773. DOSISYSSEMSET                        19
  8774. DOSIWRITE                            87
  8775. DOSKILLPROCESS                       10
  8776. DOSLIBINIT                           96
  8777. DOSLOADMODULE                        44
  8778. DOSLOCKSEG                          122
  8779. DOSMAKEPIPE                          16
  8780. DOSMEMAVAIL                         127
  8781. DOSMKDIR                             66
  8782. DOSMOVE                              67
  8783. DOSMUXSEMWAIT                        22
  8784. DOSNEWSIZE                           68
  8785. DOSOPEN                              70
  8786. DOSOPEN2                             95
  8787. DOSOPENSEM                           25
  8788. DOSPHYSICALDISK                     129
  8789. DOSQPATHINFO                         98
  8790. DOSSETPATHINFO                      104
  8791. DOSPOKETESTDAEMON                   104
  8792. DOSPORTACCESS                        69
  8793. DOSPROFILE                          133
  8794. DOSPTRACE                            12
  8795. DOSQCURDIR                           71
  8796. DOSQCURDISK                          72
  8797. DOSQFHANDSTATE                       73
  8798. DOSQFILEINFO                         74
  8799. DOSQFILEMODE                         75
  8800. DOSQFSINFO                           76
  8801. DOSQHANDTYPE                         77
  8802. DOSQPROCSTATUS                      154
  8803. DOSQTRACEINFO                        93
  8804. DOSQVERIFY                           78
  8805. DOSREADPHYS                         103
  8806. DOSREALLOCHUGE                       42
  8807. DOSREALLOCSEG                        38
  8808. DOSRESUMETHREAD                      26
  8809. DOSRMDIR                             80
  8810. DOSSELECTDISK                        81
  8811. DOSSEMSETWAIT                        20
  8812. DOSSENDSIGNAL                       134
  8813. DOSSETCP                            153
  8814. DOSSETDATETIME                       28
  8815. DOSSETFGND                          101
  8816. DOSSETFHANDSTATE                     82
  8817. DOSSETFILEINFO                       83
  8818. DOSSETFILEMODE                       84
  8819. DOSSETFSINFO                         97
  8820. DOSSETINFOSEG                       128
  8821. DOSSETMAXFH                          85
  8822. DOSSETPRTY                           11
  8823. DOSSETSIGHANDLER                     14
  8824. DOSSETVEC                            89
  8825. DOSSETVERIFY                         86
  8826. DOSSGSWITCH                          54
  8827. DOSSGSWITCHME                        55
  8828. DOSSGSWITCHPROC                     124
  8829. DOSSICG                              95
  8830. DOSSIZESEG                          126
  8831. DOSSLEEP                             32
  8832. DOSSUSPENDTHREAD                     27
  8833. DOSSWAPTASKINIT                     102
  8834. DOSSYSTEMSERVICE                     88
  8835. DOSSYSTRACE                          90
  8836. DOSTIMERASYNC                        29
  8837. DOSTIMERSTART                        30
  8838. DOSTIMERSTOP                         31
  8839. DOSUNLOCKSEG                        123
  8840. GETADDR                             111
  8841. GETHEADERS                          108
  8842. GETSELADDR                          110
  8843. PANICWRITE                          105
  8844. STRUCHECK                           106
  8845. STRURESUPDATE                       107
  8846. UNUSEDA                              98
  8847. UNUSEDB                              99
  8848.  
  8849. The following Operating System entry points are defined in the library 
  8850. DOSCALL1. In this case, the procedures must be called by name rather than 
  8851. ordinal value. For an example of this usage, see the explanation of the 
  8852. DYNALINK() function. 
  8853.  
  8854. DOSREAD
  8855. DOSWRITE
  8856. DOSERRCLASS
  8857. DOSSEMREQUEST
  8858. DOSSEMCLEAR
  8859. DOSSEMWAIT
  8860. DOSSEMSET
  8861. DOSEXECPGM
  8862. DOSCREATETHREAD
  8863. DOSSUBSET
  8864. DOSSUBALLOC
  8865. DOSSUBFREE
  8866. DOSREADASYNC
  8867. DOSWRITEASYNC
  8868. DOSSEARCHPATH
  8869. DOSSCANENV
  8870.  
  8871.  
  8872. ΓòÉΓòÉΓòÉ 15. Advanced Compiler Features ΓòÉΓòÉΓòÉ
  8873.  
  8874. Advanced compiler features. 
  8875.  
  8876.  
  8877. ΓòÉΓòÉΓòÉ 15.1. Compile time variables ΓòÉΓòÉΓòÉ
  8878.  
  8879. Compile time variables. 
  8880.  
  8881.  
  8882. ΓòÉΓòÉΓòÉ 15.1.1. Definition ΓòÉΓòÉΓòÉ
  8883.  
  8884. E provides certain language extensions and configuration options by means of a 
  8885. single pass symbol table access facility. This means that the macro programmer 
  8886. can assign a compile time variable and later test the value of that variable. 
  8887.  
  8888.  
  8889. ΓòÉΓòÉΓòÉ 15.1.2. Advantages ΓòÉΓòÉΓòÉ
  8890.  
  8891. The usage of compile time variables can aid in the portability of the macro 
  8892. language. This means that one set of macros can be used in DOS, OS/2, and the 
  8893. Presentation Manager environments. For examples of this see the current 
  8894. E-macros. By testing the version, the compiler can know which code to include. 
  8895. This means later versions can make use of the newest features while still 
  8896. maintain compatibility with older versions of the E family of editors. 
  8897.  
  8898. The usage of compile time variables saves disk space.  The reason for this is 
  8899. that universal variables must be actually saved on the disk in the resultant 
  8900. .EX file.  Compile-time variables are saved in far memory while the translation 
  8901. process executes and are freed when the translation process ends. 
  8902.  
  8903.  
  8904. ΓòÉΓòÉΓòÉ 15.1.3. Compile-time variable assignment ΓòÉΓòÉΓòÉ
  8905.  
  8906. We allow a compile-time variable assignment by means of the define statement in 
  8907. the macro language. An example of such as assignment is the following: 
  8908.  
  8909.  
  8910.   define compile_variable = 'this is a compile-time variable'
  8911.  
  8912.  
  8913. ΓòÉΓòÉΓòÉ 15.1.4. Compile-time variable and conditional compilation ΓòÉΓòÉΓòÉ
  8914.  
  8915. Compile-time variables can be used in concert with the translator's compile if 
  8916. statements to provide a powerful conditional compilation facility.  An example 
  8917. of the usage of compile if is the following: 
  8918.  
  8919.  
  8920.   compile if compile_variable = 'this is a compile-time variable'
  8921.     sayerror 'compile_variable exists'
  8922.   compile else
  8923.     sayerror 'compile_variable does not exists'
  8924.   compile endif
  8925.  
  8926.  
  8927. ΓòÉΓòÉΓòÉ 15.1.5. Compile `defined' test ΓòÉΓòÉΓòÉ
  8928.  
  8929. In addition to the straightforward test of a compile-time variable value,  we 
  8930. can also test whether a variable is defined or not. This is useful in cases 
  8931. where the macro programmer does not wish to expressly assign a value to a 
  8932. compile-time variable, but simply would like to know if the variable has any 
  8933. value. For example: 
  8934.  
  8935.  
  8936.   compile if defined compile_variable
  8937.     sayerror 'compile_variable is defined'
  8938.   compile else
  8939.     sayerror 'compile_variable is not defined'
  8940.   compile endif
  8941.  
  8942.  
  8943. ΓòÉΓòÉΓòÉ 15.1.6. Text replacement ΓòÉΓòÉΓòÉ
  8944.  
  8945. A powerful text replacement function is part of the translator language. This 
  8946. text replacement option allows one to literally change the text upon which the 
  8947. translator is operating during the translation process. The text replacement 
  8948. option is initiated when the translator encounters a '$' (dollar sign). When 
  8949. the text replacement character is encountered the translator  places the value 
  8950. of the compile-time variable that follows the '$' into a text buffer and begins 
  8951. to use the that buffer as the input buffer to the translator. When the buffer 
  8952. is empty, we switch back to the previous translation buffer. For example: 
  8953.  
  8954.  
  8955.   define sayinformation = 'sayerror'
  8956.   $sayinformation 'this is information'
  8957.  
  8958. In the preceding example,  we have defined our own language extension. The 
  8959. example is equivalent to the standard E code of: 
  8960.  
  8961.  
  8962.   sayerror 'this is information'
  8963.  
  8964.  
  8965. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  8966.  
  8967. ABBREV(information, info [, length]) 
  8968.  
  8969.  
  8970. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  8971.  
  8972. ABBREV returns 1 if info is equal to the leading characters of information and 
  8973. the length of info is not less than length. ABBREV returns 0 if neither of 
  8974. these conditions is met. 
  8975.  
  8976. If specified, length must be a nonnegative whole number. The default for length 
  8977. is the number of characters in info. 
  8978.  
  8979.  
  8980. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  8981.  
  8982. Here are some examples: 
  8983.  
  8984.  ABBREV('Print','Pri')      ->    1
  8985.  ABBREV('PRINT','Pri')      ->    0
  8986.  ABBREV('PRINT','PRI',4)    ->    0
  8987.  ABBREV('PRINT','PRY')      ->    0
  8988.  ABBREV('PRINT','')         ->    1
  8989.  ABBREV('PRINT','',1)       ->    0
  8990.  
  8991. Note:  A null string will always match if a length of 0 (or the default) is 
  8992.        used. This allows a default keyword to be selected automatically if 
  8993.        desired. For example:
  8994.  
  8995.           say 'Enter option:';   pull option .
  8996.           select  /* keyword1 is to be the default */
  8997.             when abbrev('keyword1',option) then ...
  8998.             when abbrev('keyword2',option) then ...
  8999.             ...
  9000.             otherwise nop;
  9001.           end;
  9002.  
  9003.  
  9004. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9005.  
  9006. ACTIVATEACCELTABLE  table_name 
  9007.  
  9008.  
  9009. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9010.  
  9011. Makes the named accelerator table the active one. 
  9012.  
  9013.  
  9014. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9015.  
  9016. ACTIVATEFILE  fileid 
  9017.  
  9018.  
  9019. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9020.  
  9021. Makes the file identified by the variable fileid the current file. 
  9022.  
  9023. Fileid must be a simple variable (as indicated by the word var)  containing a 
  9024. valid file id number.  If you give an expression, the compiler will stop and 
  9025. complain, "Expression not assignment compatible." 
  9026.  
  9027.  
  9028. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9029.  
  9030.       Correct usage:
  9031.       ACTIVATEFILE myfileid
  9032.  
  9033.       The following expressions will not work:
  9034.       ACTIVATEFILE  fileid' '
  9035.       ACTIVATEFILE ARG(1)
  9036.  
  9037.  
  9038. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9039.  
  9040. ADJUSTBLOCK | ADJUST_BLOCK 
  9041.  
  9042.  
  9043. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9044.  
  9045. Overlays marked block at cursor, like the standard key definition Alt-A.  The 
  9046. source block is filled with spaces. 
  9047.  
  9048.  
  9049. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9050.  
  9051. ADJUSTMARK 
  9052.  
  9053.  
  9054. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9055.  
  9056. Moves marked text to the location of the cursor by overlaying. The old location 
  9057. is filled with blanks. 
  9058.  
  9059.  
  9060. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9061.  
  9062. ARG([numeric_expression]) 
  9063.  
  9064.  
  9065. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9066.  
  9067. May be used only in a DEFMAIN, DEFC or DEFPROC. In the case of a DEFPROC, if 
  9068. numeric_expression is not given, the number of arguments passed to the macro is 
  9069. returned.  Otherwise the expression is evaluated to a number and the 
  9070. corresponding argument is returned. If there are fewer arguments than specified 
  9071. by the expression, a null string is returned. 
  9072.  
  9073.  
  9074. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9075.  
  9076. For example: 
  9077.  
  9078.   numofargs = arg()
  9079.   argfour = arg(4)
  9080.  
  9081. In the first example, the number of arguments that were passed is returned in 
  9082. the variable numofargs. In the second example the four argument is returned in 
  9083. the variable argfour. 
  9084.  
  9085.  
  9086. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9087.  
  9088. ASC('character') 
  9089.  
  9090.  
  9091. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9092.  
  9093. Returns the ASCII decimal value of the character expression. 
  9094.  
  9095.  
  9096. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9097.  
  9098. For example: 
  9099.  
  9100.   ASC('A') = 65
  9101.  
  9102.  
  9103. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9104.  
  9105. ATOI('numeric_expression') 
  9106.  
  9107.  
  9108. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9109.  
  9110. Converts the E language representation of a number (as a string) to the C 
  9111. language representation of an integer (data type int). Since many functions 
  9112. that are available through the function DYNALINK() require input to be in 
  9113. binary numbers as opposed to ASCII strings, we provide functions to convert 
  9114. ASCII strings into binary numbers. For an example of this usage see the 
  9115. DYNALINK() entry in this section. 
  9116.  
  9117.  
  9118. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9119.  
  9120. The following shows the high-level strings and the equivalent machine 
  9121. representation: 
  9122.  
  9123. string     machine representation  (hexadecimal digits)
  9124. '40'           34 30    /* '4' is 0x34 & '0' is 0x30 */
  9125.  
  9126. atoi('40')     28 00    /* 28 00 is 40 decimal       */
  9127.                         /* since byte swapping       */
  9128.                         /* exists in the Intel       */
  9129.                         /* architecture              */
  9130.                         /* In reality the word       */
  9131.                         /* would be 0x0028           */
  9132.  
  9133.  
  9134. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9135.  
  9136. ATOL('numeric_expression') 
  9137.  
  9138.  
  9139. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9140.  
  9141. Converts the E language representation of a number (as a string) to the C 
  9142. language representation of a long integer (data type long). For use with C 
  9143. functions that require numeric parameters, for example function calls via 
  9144. DYNALINK(). 
  9145.  
  9146.  
  9147. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9148.  
  9149. ATTRIBUTE_ACTION subop, var class, var offset, var column, var line [, var 
  9150. fileid] 
  9151.  
  9152.  
  9153. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9154.  
  9155. subop is one of the following: 
  9156.  
  9157. const
  9158.    FIND_NEXT_ATTR_SUBOP =  1
  9159.    FIND_PREV_ATTR_SUBOP =  2
  9160.    FIND_MATCH_ATTR_SUBOP = 3
  9161.    DELETE_ATTR_SUBOP =    16
  9162.  
  9163. The use of the remaining parameters varies with the operation to be performed. 
  9164.  
  9165. FIND_NEXT_ATTR_SUBOP This action finds the next occurance (not including the 
  9166.           specified location) of an attribute record of the specified class. 
  9167.  
  9168.    class   On input, this specifies the attribute class of the attribute 
  9169.            records of interest.  A value of ANY_CLASS (zero) indicates that the 
  9170.            position of the next attribute record of any class should be 
  9171.            returned. On output, the class of the found attribute.  A class of 
  9172.            zero indicates that no attribute record was found. 
  9173.    offset  On input, the location (non-inclusive) where the search is to begin. 
  9174.            On output, the location of the found attribute record.  If none was 
  9175.            found, then the parameter will not be modified. 
  9176.    column  On input, the location where the search is to begin. On output, the 
  9177.            location of the found attribute record.  If none was found, then the 
  9178.            parameter will not be modified. 
  9179.    line    On input, the location where the search is to begin. On output, the 
  9180.            location of the found attribute record.  If none was found, then the 
  9181.            parameter will not be modified. 
  9182.    fileid  The fileid of the file where the search is to occur.  The default is 
  9183.            the current file. 
  9184.  
  9185. FIND_PREV_ATTR_SUBOP This action is just like the FIND_NEXT_ATTR_SUBOP except 
  9186.           that it finds the previous occurance of an attribute record of the 
  9187.           specified class rather than the next occurance. 
  9188.  
  9189. FIND_MATCH_ATTR_SUBOP This action finds the (push/pop model) attribute record 
  9190.           that matches the specified attribute record. For example, if a push 
  9191.           attribute record was specified, the location of the corresponding pop 
  9192.           attribute record is returned. 
  9193.  
  9194.    class   Unused parameter 
  9195.    offset  On input, the location (non-inclusive) where the search for the 
  9196.            match is to begin.  An attribute record must exist at this location 
  9197.            or an error code will be flagged. On output, the location of the 
  9198.            found attribute record.  If none was found, then the parameter will 
  9199.            not be modified. 
  9200.    column  On input, the location where the search is to begin. On output, the 
  9201.            location of the found attribute record.  If none was found, then the 
  9202.            parameter will not be modified. 
  9203.    line    On input, the location where the search is to begin. On output, the 
  9204.            location of the found attribute record.  If none was found, then the 
  9205.            parameter will not be modified. 
  9206.    fileid  The fileid of the file where the search is to occur.  The default is 
  9207.            the current file. 
  9208.  
  9209. DELETE_ATTR_SUBOP Deletes the attribute record at the specified location.  If 
  9210.           attribute records exists at the specified character position having 
  9211.           an offset of the same sign as the specified attribute record but of 
  9212.           larger magnitude, then those attribute records will be shifted in 
  9213.           (their offset will be incremented or decremented) to fill in the 
  9214.           vacated location. 
  9215.  
  9216.    class   On input, this  is unused On output, the class of the deleted 
  9217.            attribute record.  Zero if no attribute record exists at the 
  9218.            specified location. 
  9219.    offset  The location of the attribute record to be deleted. 
  9220.    column  The location of the attribute record to be deleted. 
  9221.    line    The location of the attribute record to be deleted. 
  9222.    fileid  The fileid of the file where the specified attribute record is to be 
  9223.            found.  The default is the current file. 
  9224.  
  9225. See Attribute Pairs for additional information on attributes, or EPMTOOLS 
  9226. PACKAGE on the OS2TOOLS disk for the file ATTRIBUTE.DOC that more fully 
  9227. describes programming attributes. 
  9228.  
  9229.  
  9230. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9231.  
  9232. class = 1         -- 1 = COLOR_CLASS
  9233. offst1 = -255
  9234. col = .col
  9235. line = .line
  9236. getfileid fileid
  9237. attribute_action 1, class, offst1, col, line, fileid -- 1=FIND NEXT ATTR
  9238. if class & col = .col & line = .line  then  -- Found one on this character.
  9239.    offst2 = offst1
  9240.    attribute_action 3, class, offst2, col, line, fileid -- 3=FIND MATCH ATTR
  9241.    if class then      -- Found a match; delete them both.
  9242.       attribute_action 16, class, offst1, .col, .line, fileid -- 16=DELETE ATTR
  9243.       attribute_action 16, class, offst2, col, line, fileid -- 16=DELETE ATTR
  9244.    endif
  9245. endif
  9246.  
  9247. This code checks for a color attribute on the current character.  If found, it 
  9248. checks for the matching attribute.  If both a Push and Pop exist, both are 
  9249. deleted. 
  9250.  
  9251.  
  9252. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9253.  
  9254. BACKTAB 
  9255.  
  9256.  
  9257. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9258.  
  9259. Moves cursor to previous tab stop.  Like the standard Shift-Tab. 
  9260.  
  9261.  
  9262. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9263.  
  9264. BACKTABWORD | BACKTAB_WORD 
  9265.  
  9266.  
  9267. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9268.  
  9269. Positions cursor on first character of previous word, like the standard 
  9270. Ctrl-Left. If there are no more previous words the cursor is positioned at 
  9271. beginning of line. 
  9272.  
  9273.  
  9274. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9275.  
  9276. BEEP( [ pitch [, duration] ] ) 
  9277.  
  9278.  
  9279. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9280.  
  9281. Sounds a beep defined by pitch (in Hertz) and duration (in milliseconds).  The 
  9282. default pitch is 900 and the defualt duration is 500. 
  9283.  
  9284.  
  9285. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9286.  
  9287.     BEEP(850,1000)
  9288.  
  9289. This example will produce a beep with a frequency of 850 Hertz for a duration 
  9290. of 1 second. 
  9291.  
  9292.  
  9293. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9294.  
  9295. BACKWARD 
  9296.  
  9297.  
  9298. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9299.  
  9300. Same as page_up. 
  9301.  
  9302.  
  9303. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9304.  
  9305. BEGINLINE | BEGIN_LINE 
  9306.  
  9307.  
  9308. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9309.  
  9310. Moves cursor to beginning of current line, like the standard Home key. 
  9311.  
  9312.  
  9313. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9314.  
  9315. BOTTOM | BOT 
  9316.  
  9317.  
  9318. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9319.  
  9320. Moves cursor to last line of file, like the standard Ctrl-End. 
  9321.  
  9322.  
  9323. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9324.  
  9325. BROWSE([0 | 1]) 
  9326.  
  9327.  
  9328. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9329.  
  9330. Turns browse mode on for the current file. Browse mode is a read-only mode. 0 
  9331. turns the browse mode off; 1 turns it on.  If no argument is given BROWSE 
  9332. returns the current mode. 
  9333.  
  9334.  
  9335. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9336.  
  9337. BUFFER() 
  9338.  
  9339.  
  9340. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9341.  
  9342. Is for developers of advanced applications who want to share text with external 
  9343. processes.  It allows an E application to create a shared memory buffer of a 
  9344. specified name and copy text to it, so that other processes can open the buffer 
  9345. and read the text from E. (For those interested in OS/2 internals, the buffer 
  9346. creation calls DosAllocShrSeg().) 
  9347.  
  9348. The buffer function provides several subfunctions:  create a new buffer; open 
  9349. an existing buffer; free a buffer; get and put text; query the allocated and 
  9350. used size of a buffer.  You specify the subfunction you want with the first 
  9351. argument, one of: CREATEBUF, OPENBUF, FREEBUF, GETBUF, PUTBUF, MAXSIZEBUF, or 
  9352. USEDSIZEBUF. (These are only numeric constants from 0 to 6, as defined in 
  9353. STDCONST.E.)  The meaning of the remaining arguments to buffer() depends on the 
  9354. subfunction, as shown in the seven cases below. 
  9355.  
  9356. The maximum buffer size is 65535 bytes.  E uses the first 32 bytes of the 
  9357. buffer for status information: 
  9358.  
  9359.    2 bytes:  bufsize available for text,
  9360.                    without the header
  9361.    2 bytes:  amount of buffer filled, <= bufsize
  9362.    2 bytes:  format (explained below)
  9363.    2 bytes:  number of lines if known
  9364.                    (E fills this in on a PUT)
  9365.   26 bytes:  reserved for anything
  9366.                    the application might want.
  9367. Thus the maximum space available for text is 65535-32 = 65503 bytes. 
  9368.  
  9369. bufhndl = buffer( CREATEBUF, name [,size [,private]])
  9370.  
  9371. CREATEBUF allocates a shared memory segment of name "\SHAREMEM\name". The 
  9372. prefix "\SHAREMEM\" is automatic and shouldn't be supplied. The size 
  9373. specification is optional.  If it's zero or omitted, it defaults to the maximum 
  9374. size of 65503. 
  9375.  
  9376. A last optional argument, private, can be supplied with a nonzero value if you 
  9377. do not want want the buffer to be shared by other processes.  You might wish to 
  9378. create a memory buffer for use by your application only, in which case you 
  9379. should specify private to avoid using one of the limited number of OS/2 shared 
  9380. buffers.  (Technically, a private buffer is created with DosAllocSeg() rather 
  9381. than DosAllocShrSeg().) 
  9382.  
  9383. The return value from CREATEBUF is a handle or ID, to be used by the other 
  9384. subfunctions.  (Actually the handle is the buffer segment selector, in string 
  9385. form like that returned by seg(), ready for use by peek and poke.)  A return 
  9386. value of 0 means an error; RC will contain the error code given by OS/2. 
  9387.  
  9388. bufhndl = buffer( OPENBUF, name)
  9389.  
  9390. OPENBUF shares a buffer created by another process.  Again, bufhndl is 
  9391. returned; zero means a system error is returned in RC.  It is expected that the 
  9392. other process has put the format and size into the first 2 words of the buffer, 
  9393. and starts the data at offset 32. 
  9394.  
  9395. success = buffer( FREEBUF, bufhndl)
  9396.  
  9397. FREEBUF frees the buffer.  It's not required if you're exiting from E, but 
  9398. recommended.  The return value is zero if an error occurred, for consistency; 
  9399. zero means an error for all these subfunctions. 
  9400.  
  9401. noflines= buffer( GETBUF, bufhndl)
  9402.  
  9403. GETBUF loads all of a buffer into the current file at the current location, in 
  9404. the same manner as a GET command.  You have no control over the number of 
  9405. lines; normally you'll do the GETBUF into a new empty file.  The return value 
  9406. is the number of lines transferred. A zero value along with a zero RC means the 
  9407. buffer was empty. (Note:  RC is automatically zeroed at the start of any 
  9408. buffer() function.) 
  9409.  
  9410. noflines= buffer( PUTBUF, bufhndl, startline
  9411.           [,endline [,format]])
  9412.  
  9413. PUTBUF copies the current file's text from startline through endline. If 
  9414. endline is omitted, or specified as zero or a huge value, as many whole lines 
  9415. are copied as will fit, stopping at the end of file of course. The return value 
  9416. is the number of lines transferred. 
  9417.  
  9418. size    = buffer( MAXSIZEBUF, bufhndl)
  9419.  
  9420. MAXSIZEBUF returns the buffer capacity, in case some other process created it 
  9421. and you don't know its size.  (This subfunction gives the same value as 
  9422. peek(bufhndl,0,2).) 
  9423.  
  9424. size    = buffer( USEDSIZEBUF, bufhndl)
  9425.  
  9426. USEDSIZEBUF returns the size of data in the buffer. (This gives the same value 
  9427. as peek(bufhndl,2,2).) 
  9428.  
  9429. The format word in the header determines how the lines are formatted. It's a 
  9430. bit string so you can mix and match options: 
  9431.  
  9432. APPENDCR     1   append ASCII 13 after each line
  9433. APPENDLF     2   append ASCII 10 after the CR if any
  9434. APPENDNULL   4   append ASCII  0 after the CR-LF if any
  9435. TABCOMPRESS  8   tab-compress the line
  9436. STRIPSPACES 16   remove trailing spaces as usual in a save
  9437. FINALNULL   32   append a null at end of the buffer
  9438. The default format if unspecified is 19, for CR-LF and remove trailing spaces. 
  9439.  
  9440. Note:  The format is ignored on a GET.  E handles whatever characters it finds, 
  9441. in the same manner as loading a disk file.  CR-LF's are dropped, tabs are 
  9442. expanded. 
  9443.  
  9444. Note 2:  if an external process fills a buffer, it should make sure that the 
  9445. last line is properly terminated with the appropriate end-of-line.  E will 
  9446. double-check for this to protect against overrunning the end of the buffer.  E 
  9447. will deposit an end-of-line if needed and restore whatever character was there, 
  9448. but this might not be what the other process expected. 
  9449.  
  9450. For sample usages, see the file BUFF.E. 
  9451.  
  9452.  
  9453. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9454.  
  9455. BUILDACCELTABLE table_name, command, accel_flags, key, index 
  9456.  
  9457.  
  9458. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9459.  
  9460. Adds an entry to an accelerator table. 'tablename' is the name of the 
  9461. accelerator table being built (and is later passed as a parameter to the 
  9462. activateacceltable statement), 'command' is the command to be executed when the 
  9463. accelerator key is pressed, accel_flags is the sum of some AF_ constants from 
  9464. STDCONST.E, 'key' is as ASCII value for AF_CHAR, a VK_ constant for 
  9465. AF_VIRTUALKEY, etc., and 'index' is a unique index number for that table.  You 
  9466. can reuse an index value to replace an entry in the accelerator table. 
  9467.  
  9468. Note:  Index values must be unique in both the current accelerator table and 
  9469. the current action bar. 
  9470.  
  9471. Some of the VK_ constants are defined in STDCONST.E; the full set can be found 
  9472. in PMWIN.H in the OS/2 toolkit. 
  9473.  
  9474.  
  9475. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9476.  
  9477. BUILDMENUITEM 
  9478.  
  9479.  
  9480. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9481.  
  9482. Is used to build entries on the action bar menu. See Building Menus from the 
  9483. Macro Language for more information on the BUILDMENUITEM statement. 
  9484.  
  9485.  
  9486. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9487.  
  9488. BUILDSUBMENU 
  9489.  
  9490.  
  9491. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9492.  
  9493. Is used to build sub menu entries on the action bar menu. 
  9494.  
  9495.  
  9496. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9497.  
  9498. CALL  procedurename 
  9499.  
  9500.  
  9501. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9502.  
  9503. Throws away the result of the procedure call. You could substitute any 
  9504. expression for procedurename, e.g. call 2*2, but typically it will be a 
  9505. procedure call such as "call machine()". 
  9506.  
  9507. Throwing away the result of a procedure call is often necessary because 
  9508. otherwise the result is executed.  If a procedure returns 0, the valid command 
  9509. '0' is executed which takes the cursor to the "Top of File" header (line 0). 
  9510.  
  9511. Generally is always advisable to use the call statement unless the returned 
  9512. value is used in some manner. 
  9513.  
  9514.  
  9515. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9516.  
  9517. CENTER( string, length [, pad] ) 
  9518.  
  9519.  
  9520. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9521.  
  9522. Returns a string of length length with string centered in it, with pad 
  9523. characters added as necessary to make up length. The default pad character is a 
  9524. space. If the string is longer than length, it will be truncated at both ends 
  9525. to fit. If an odd number of characters are truncated or added, the right hand 
  9526. end loses or gains one more character than the left hand end. 
  9527.  
  9528.  
  9529. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9530.  
  9531. Here are some examples: 
  9532.  
  9533.  CENTER(abc,7)               ->    '  ABC  '
  9534.  CENTER(abc,8,'-')           ->    '--ABC---'
  9535.  CENTRE('The blue sky',8)    ->    'e blue s'
  9536.  CENTRE('The blue sky',7)    ->    'e blue '
  9537.  
  9538.  
  9539. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9540.  
  9541. CENTRE( string, length [, pad] ) 
  9542.  
  9543.  
  9544. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9545.  
  9546. (same as CENTER) 
  9547.  
  9548.  
  9549. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9550.  
  9551. (same as CENTER) 
  9552.  
  9553.  
  9554. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9555.  
  9556. CHR( value ) 
  9557.  
  9558.  
  9559. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9560.  
  9561. Is the inverse of ASC(), CHR() returns the character corresponding to the ASCII 
  9562. value. 
  9563.  
  9564.  
  9565. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9566.  
  9567. For example, 
  9568.  
  9569. CHR( ASC('A') ) = 'A'
  9570. CHR(65)='A'
  9571.  
  9572.  
  9573. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9574.  
  9575. CIRCLEIT style, line, col1, col2, attribute 
  9576.  
  9577.  
  9578. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9579.  
  9580. Draws a circle on the screen for highlighting a section of text. The circle 
  9581. goes away when the screen is refreshed.  'line' is the line number of the file 
  9582. to be highlighted, and col1 and col2 are the first and last columns.  There are 
  9583. two styles of circle.  1 = a perfect circle or oval; 2 = a rougher version with 
  9584. the ends crossing rather than meeting.  The highlighting is added by XORing 
  9585. onto the screen, so the color displayed is a function of the screen background 
  9586. color and can not be directly controlled.  ('Attribute' is currently unused.) 
  9587. The two styles use different XOR masks. 
  9588.  
  9589.  
  9590. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9591.  
  9592. COMPARE( string1, string2 [, pad] ) 
  9593.  
  9594.  
  9595. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9596.  
  9597. Returns 0 if the strings, string1 and string2, are identical. If they are not, 
  9598. the returned number is non-zero and is the position of the first character that 
  9599. does not match. The shorter string is padded on the right with pad if 
  9600. necessary. The default pad character is a space. 
  9601.  
  9602.  
  9603. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9604.  
  9605. Here are some examples: 
  9606.  
  9607.  COMPARE('abc','abc')         ->    0
  9608.  COMPARE('abc','ak')          ->    2
  9609.  COMPARE('ab ','ab')          ->    0
  9610.  COMPARE('ab ','ab',' ')      ->    0
  9611.  COMPARE('ab ','ab','x')      ->    3
  9612.  COMPARE('ab-- ','ab','-')    ->    5
  9613.  
  9614.  
  9615. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9616.  
  9617. COPIES( string, n ) 
  9618.  
  9619.  
  9620. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9621.  
  9622. Returns n concatenated copies of string. n must be positive or 0. 
  9623.  
  9624.  
  9625. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9626.  
  9627. Examples: 
  9628.  
  9629.     COPIES('abc',3)      ->    'abcabcabc'
  9630.     COPIES('abc',0)      ->    ''
  9631.  
  9632.  
  9633. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9634.  
  9635. COPYMARK | COPY_MARK 
  9636.  
  9637.  
  9638. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9639.  
  9640. Copies marked text to cursor position, like standard Alt-C. 
  9641.  
  9642.  
  9643. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9644.  
  9645. CURSOR_DIMENSIONS cursorw, cursorh 
  9646.  
  9647.  
  9648. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9649.  
  9650. Queries or sets the cursor dimensions. 'cursorw' and 'cursorh' must be 
  9651. variables. If their values are question marks, they will be changed to reflect 
  9652. the current dimensions. If their values are numbers, this will set the size of 
  9653. the text cursor. A positive number represents that number of pixels; a negative 
  9654. number represents a proportional value of the size of the current character. 
  9655. The absolute value of that number is used as the number of 128ths of the height 
  9656. or width of the current character that the cursor should be drawn. 
  9657.  
  9658.  
  9659. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9660.  
  9661. DELETE 
  9662.  
  9663.  
  9664. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9665.  
  9666. Deletes the line the cursor is located on. Note that the statement DELETELINE 
  9667. allows parameters, but DELETE does not. 
  9668.  
  9669. Note:  Previously, DELETE_LINE was a synonym for DELETE. This was dropped 
  9670.        because it was felt that it was too confusing to have two statements, 
  9671.        DELETE_LINE and DELETELINE, with different behaviors.
  9672.  
  9673.  
  9674. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9675.  
  9676. DELETEACCEL tablename 
  9677.  
  9678.  
  9679. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9680.  
  9681. Deletes the named accelerator table. 
  9682.  
  9683.  
  9684. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9685.  
  9686. DELETECHAR | DELETE_CHAR 
  9687.  
  9688.  
  9689. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9690.  
  9691. Deletes character under cursor, like standard Del. 
  9692.  
  9693.  
  9694. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9695.  
  9696. DELETELINE  line_number [, {;}  fileid] 
  9697.  
  9698.  
  9699. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9700.  
  9701. Deletes a specified line from a specified file. Defaulted values for omitted 
  9702. parameters are line_number = current line, and fileid = current file. 
  9703.  
  9704. This is NOT the same as DELETE_LINE: see the clarification above, under DELETE. 
  9705.  
  9706.  
  9707. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9708.  
  9709. DELETEMARK | DELETE_MARK 
  9710.  
  9711.  
  9712. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9713.  
  9714. Deletes marked text, like standard Alt-D. 
  9715.  
  9716.  
  9717. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9718.  
  9719. DELETEMENU (stmt) 
  9720.  
  9721.  
  9722. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9723.  
  9724. Deletes a menu option or submenu option from the action bar. For more 
  9725. information on DELETEMENU see Building Menus from the Macro Language. 
  9726.  
  9727.  
  9728. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9729.  
  9730. DELSTR( string, n [, length] ) 
  9731.  
  9732.  
  9733. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9734.  
  9735. Deletes the substring of string that begins at the nth character, and is of 
  9736. length length, and returns the result. If length is not specified, the rest of 
  9737. string is deleted. If n is greater than the length of string, the string is 
  9738. returned unchanged. n must be positive. 
  9739.  
  9740.  
  9741. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9742.  
  9743. Here are some examples: 
  9744.  
  9745.  DELSTR('abcd',3)       ->    'ab'
  9746.  DELSTR('abcde',3,2)    ->    'abe'
  9747.  DELSTR('abcde',6)      ->    'abcde'
  9748.  
  9749.  
  9750. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9751.  
  9752. DELWORD( string, n [,  length] ) 
  9753.  
  9754.  
  9755. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9756.  
  9757. Deletes the substring of string that begins at the nth word, and is of length 
  9758. length blank-delimited words, and returns the result. If length is not 
  9759. specified, the rest of string is deleted. n must be positive. If n is greater 
  9760. than the number of words in string, the string is returned unchanged. The 
  9761. string deleted includes any blanks following the final word involved. 
  9762.  
  9763.  
  9764. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9765.  
  9766. Here are some examples: 
  9767.  
  9768.  DELWORD('Now is the  time',2,2)  ->  'Now time'
  9769.  DELWORD('Now is the time ',3)    ->  'Now is '
  9770.  DELWORD('Now is the  time',5)    ->  'Now is the  time'
  9771.  
  9772.  
  9773. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9774.  
  9775. DIRECTORY( [string_expression] ) 
  9776.  
  9777.  
  9778. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9779.  
  9780. Returns current directory. If path parameter is given, the current drive and 
  9781. path are changed accordingly. 
  9782.  
  9783. Note:  The drive and path are changed before the current directory is returned. 
  9784.  
  9785.  
  9786. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9787.  
  9788. This provides a way of verifying that a user-supplied path is valid. 
  9789.  
  9790. current_dir = directory()                                -- Save current
  9791. if upcase(directory(user_dir)) <> upcase(user_dir) then  -- Try user's
  9792.    sayerror 'Directory 'user_dir' is invalid.'           -- Warn
  9793. endif
  9794. call directory(current_dir)                              -- Restore
  9795.  
  9796.  
  9797. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9798.  
  9799. DISPLAY -4|-2|-1|1|2|4 
  9800.  
  9801.  
  9802. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9803.  
  9804. Allows screen updates to be turned off (-1) or on (1); non-critical messages to 
  9805. be turned off (-2) or on (2); and errors to be forced to the message box (-4) 
  9806. or to the default messageline (4). 
  9807.  
  9808. These numbers can be combined. (DISPLAY -3 would turn off the screen updates 
  9809. and the error messages.) 
  9810.  
  9811. DISPLAY -1 prevents the screen from begin updated until a DISPLAY 1 statement 
  9812. is issued. This can eliminate files being flashed on the screen briefly while 
  9813. an application loads and manipulates files. 
  9814.  
  9815. When a DISPLAY 4 is in effect, all messages (unless explicitly sent to a dialog 
  9816. box) will be sent to: 
  9817.  
  9818.  1. first to the message line, unless toggled off; 
  9819.  2. next to the status line, unless toggled off; 
  9820.  3. or else overwrites the first line of text temporarily. 
  9821.  
  9822.  
  9823. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9824.  
  9825. An sample usage of DISPLAY is: 
  9826.  
  9827.   display -3            -- turn off display updates
  9828.   getfileid startfid    --      and error messages
  9829.   'xcom e profile.xxx'  -- load the profile
  9830.   getfileid profile_fid --      won't show on screen
  9831.   .visible = 0          -- make a hidden file
  9832.   'xcom 1 /define'      -- if not found, no error message
  9833.   activatefile startfid -- activate the file
  9834.   display 3             -- turn updates & messages on
  9835.  
  9836. In this example the user would see no screen flashing or "Not found" error 
  9837. message. 
  9838.  
  9839.  
  9840. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9841.  
  9842. Is described in the section Conditional and Loop Statements. 
  9843.  
  9844.  
  9845. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9846.  
  9847. Is described in the section Conditional and Loop Statements. 
  9848.  
  9849.  
  9850. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9851.  
  9852. DO_ARRAY 
  9853.  
  9854.  
  9855. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9856.  
  9857. Handles arrays in E. The DO_ARRAY statement can create an array, add to the 
  9858. array, and lookup information from the array. The syntax for these functions 
  9859. is: 
  9860.  
  9861. do_array 1, array_id, arrayname 
  9862.                                    creates an array of arrayname and returns 
  9863.                                    the array_id in the variable array_id. 
  9864. do_array 2, array_id, index, value 
  9865.                                    adds the value to the array under the index 
  9866.                                    in the array denoted by array_id. 
  9867. do_array 3, array_id, index, result 
  9868.                                    looks up the contents of the index entry of 
  9869.                                    the array specified by array_id and places 
  9870.                                    the value into result. 
  9871. do_array 4, array_id, index 
  9872.                                    This will delete an entry specified, by 
  9873.                                    INDEX, from the array. 
  9874. do_array 6, array_id, array_name 
  9875.                                    Returns the array_id associated with the 
  9876.                                    array name specified by array_name 
  9877.  
  9878. See Arrays in EPM for more information on arrays and the DO_ARRAY statement. 
  9879.  
  9880.  
  9881. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9882.  
  9883. DO_OVERLAYWINDOWS 
  9884.  
  9885.  
  9886. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9887.  
  9888. Provides various functions for the manipulation of graphics within a document. 
  9889. Further information on graphics within EPM and the E Toolkit will be made 
  9890. available. 
  9891.  
  9892.  
  9893. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9894.  
  9895. DOWN 
  9896.  
  9897.  
  9898. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9899.  
  9900. Moves the cursor down 1 line, like the standard Down key. 
  9901.  
  9902.  
  9903. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9904.  
  9905. DYNAFREE( number ) 
  9906.  
  9907.  
  9908. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9909.  
  9910. Releases a dynalink library that has been previously called using the dynalink 
  9911. statment. Also see the DYNALINK and DYNALINKC statements for more information. 
  9912.  
  9913.  
  9914. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  9915.  
  9916. DYNALINK( library_name, function_name, parameter_stack [, 
  9917. number_of_return_words ]) 
  9918.  
  9919.  
  9920. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  9921.  
  9922. Provides an interface between an E language program and external functions 
  9923. stored in a dynamic link library. The operating system functions are 
  9924. implemented via dynamic linking, and therefore DYNALINK() provides you with the 
  9925. full power of the operating system calls such as DosDelete, DosQFileMode, 
  9926. DosDevIOCtl, and video input/output calls such as VioWrtTty, VioWrtCharStrAtt, 
  9927. and much more. DYNALINK() allows you to call any dynamic link library that 
  9928. exists (files with a .DLL extension). Since application writers can develop 
  9929. general purpose dynamic link libraries, E programs can call functions written 
  9930. in other languages. For example, let us say that the "C" library functions are 
  9931. available via a dynamic link library, then we may call the library functions 
  9932. from an E program; or suppose that a spell checking dynamic link library 
  9933. exists, DYNALINK() allows you to use the spell checking. 
  9934.  
  9935. This procedure is the protect-mode equivalent of the INT86X() function of E3. 
  9936. For more information on the system functions or dynamic link libraries, please 
  9937. refer to The OS/2 Technical Reference. 
  9938.  
  9939. In order to make a system call, you must provide the following parameters to 
  9940. dynalink(): 
  9941.  
  9942. library_name             the name of the dynalink library (e.g. file 
  9943.                          library_name.DLL) which contains the function you wish 
  9944.                          to call. 
  9945.  
  9946. function_name             this is a string containing the function name in most 
  9947.                          cases. However if you are making calls to some DOS 
  9948.                          functions (DOS functions being those whose names begin 
  9949.                          with 'Dos') that are contained within the DOSCALLS.DLL 
  9950.                          library, the function name is actually the ordinal 
  9951.                          value of the DOS function, preceded by a '#'. These 
  9952.                          numbers can be found in Ordinal Values of Functions 
  9953.                          Accessed via DOSCALLS.DLL. 
  9954.  
  9955. parameter_stack          a string consisting of all of the parameters expected 
  9956.                          by the function, concatenated together into one 
  9957.                          string. Those parameters that the function requires to 
  9958.                          be pushed on the parameter stack first should appear 
  9959.                          first when concatenating. Parameter information is 
  9960.                          dependent upon the function to be called, and can be 
  9961.                          found in The OS/2 Technical Reference. 
  9962.  
  9963. number_of_return_words   an optional parameter that allows one to set the size 
  9964.                          of the return code variable that the system should 
  9965.                          expect to receive from the dynamic link function. This 
  9966.                          parameter is provided for those dynalink library 
  9967.                          functions whose return code is a long int rather than 
  9968.                          simply an int. If the user simply uses DYNALINK() for 
  9969.                          system calls to DOS and OS/2 functions, this parameter 
  9970.                          need never be specified. The default value is 1. 
  9971.  
  9972.  
  9973. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  9974.  
  9975. The numeric parameters passed by the E program must be converted from string 
  9976. form to the proper C data type via E functions like ATOI(), ATOL(), SELECTOR(), 
  9977. and OFFSET(), as shown below: 
  9978.  
  9979. defc hello =
  9980. string = 'hello'
  9981. result = dynalink( 'VIOCALLS',       /* library name   */
  9982.                    'VIOWRTTTY',      /* function name  */
  9983.                    selector(string) ||    /* address of */
  9984.                    offset(string) ||      /*   string   */
  9985.                    atoi(length(string)) ||/* length     */
  9986.                    atoi(0) )         /* vio handle     */
  9987.  
  9988. defc curdir2 =
  9989. /* create empty strings for DosQCurDir() to fill */
  9990. string = atoi(80) || substr('',1,80)
  9991. stringlen_b = substr('',1,2)
  9992. result = dynalink( 'DOSCALLS',  /* library name */
  9993.                    '#71',       /* ordinal of DosQCurDir */
  9994.                    atoi(0) ||          /* drive number    */
  9995.                    selector(string) || /* address of      */
  9996.                    offset(string) ||   /*  DirPath buffer */
  9997.                    selector(stringlen_b) || /* address of */
  9998.                    offset(stringlen_b) )   /* buf length */
  9999. stringlen = itoa(stringlen_b,10);
  10000. sayerror 'The current directory is "' ||
  10001.          substr(string,1,stringlen) || '".'
  10002.  
  10003. defc beep =
  10004. result = dynalink( 'DOSCALLS',  /* library name          */
  10005.                    '#50',       /* ordinal of Dos Beep() */
  10006.                    atoi(3000) ||  /* frequency of beep    */
  10007.                    atoi(1000) )  /* duration of beep     */
  10008.  
  10009. defc clear_semaphore =
  10010. result = dynalink( 'DOSCALL1',    /* library name     */
  10011.                    'DOSSEMCLEAR', /* function name    */
  10012.                    atol(handle) ) /* semaphore handle */
  10013.  
  10014.  
  10015. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10016.  
  10017. DYNALINKC( library_name, function_name, parameter_stack [, 
  10018. number_of_return_words ]) 
  10019.  
  10020.  
  10021. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10022.  
  10023. Is used to load and pass information to a dynalink library. It is like the 
  10024. DYNALINK() procedure except that it passes its parameters using the C language 
  10025. parameter passing convention rather than the Pascal convention. See the file 
  10026. DYNATEST.E for examples of the use of DYNALINKC(). Also see DYNAFREE() for 
  10027. information about releasing a dynalink library and DYNALINK() for information 
  10028. about calling a dynalink library procedure using standard Pascal parameter 
  10029. passing conventions. 
  10030.  
  10031.  
  10032. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10033.  
  10034. ECHO( [ON | OFF] ) 
  10035.  
  10036.  
  10037. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10038.  
  10039. Displays the command about to be executed. This is useful for debugging E code. 
  10040.  
  10041.  
  10042. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10043.  
  10044. ENDLINE | END_LINE 
  10045.  
  10046.  
  10047. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10048.  
  10049. Positions the cursor at end of current line, like standard End. 
  10050.  
  10051.  
  10052. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10053.  
  10054. ERASEENDLINE | ERASE_END_LINE 
  10055.  
  10056.  
  10057. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10058.  
  10059. Erases the rest of current line starting at cursor position, like standard 
  10060. Ctrl-E. 
  10061.  
  10062.  
  10063. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10064.  
  10065. EXECUTE 
  10066.  
  10067.  
  10068. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10069.  
  10070. Executes the contents of the command dialog box. 
  10071.  
  10072.  
  10073. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10074.  
  10075. EXECUTEKEY keyname | identifier 
  10076.  
  10077.  
  10078. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10079.  
  10080. Interprets key as if typed by user; key may be any valid expression. This is 
  10081. very similar to the KEY statement, except that KEY can take only a literal key 
  10082. name as in KEY A_L.  EXECUTEKEY can take a variable, as in k=page_down; 
  10083. executekey k.  In fact the KEY statement is superfluous, since EXECUTEKEY can 
  10084. be given a literal key name. 
  10085.  
  10086.  
  10087. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10088.  
  10089. EXIT [return_code] 
  10090.  
  10091.  
  10092. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10093.  
  10094. Exits the current E macro and all calling macros. This is useful to halt a 
  10095. macro execution if a fatal error is generated. See the RETURN statement to exit 
  10096. only the current macro. 
  10097.  
  10098. A return code can be given as an argument. 
  10099.  
  10100.  
  10101. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10102.  
  10103. FILESINRING( [ number ] ) 
  10104.  
  10105.  
  10106. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10107.  
  10108. Returns the number of files in the ring. If number is 0 or missing, the number 
  10109. of normal files in the ring is returned. If number is 1 the total number of 
  10110. files is returned, including hidden files and arrays. If number is 2 the 
  10111. maximum number of files currently allocated is returned. This corresponds to 
  10112. the size of an internal structure, and in the current release will always be a 
  10113. power of 2. An attempt to load more than this number of files will result in a 
  10114. new structure being allocated, with room for twice as many files. 
  10115.  
  10116.  
  10117. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10118.  
  10119. FILESIZE() 
  10120.  
  10121.  
  10122. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10123.  
  10124. Returns sum of the lengths of each line in the file. 
  10125.  
  10126.  
  10127. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10128.  
  10129. FILLMARK [ 'character' ] | FILL_MARK [ 'character' ] 
  10130.  
  10131.  
  10132. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10133.  
  10134. If a character is given, fills the marked area with character. If no character 
  10135. is specified, the user is asked to type a character for the fill.  Like the 
  10136. standard Alt-F. 
  10137.  
  10138.  
  10139. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10140.  
  10141. FINDFILE filename , destfilename [, environment_path_variable, (P|D)] 
  10142.  
  10143.  
  10144. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10145.  
  10146. Searches for filename in the current directory and returns its entire pathname 
  10147. in destfilename. 
  10148.  
  10149. Note:  This statement depends upon the program FILEFIND.EXE, which is available 
  10150. on the PCTOOLS disk. You must download this into a directory which is in your 
  10151. PATH environment variable (or the same directory as the E files) before this 
  10152. statement will work properly. 
  10153.  
  10154. The 'P' option specifies program searching. It forces a search for a file with 
  10155. the extension .EXE or .CMD in each directory named in the 
  10156. environment_path_variable.  If environment_path_variable is "PATH", the effect 
  10157. is the same as a normal OS/2 program search.  Some variable other than path can 
  10158. be specified, for example "EPMPATH", and that string will be looked up in the 
  10159. environment.  (The area where OS/2 keeps strings SET by the user.) 
  10160.  
  10161. The 'P' option also checks whether the filename is an internal OS/2 command. 
  10162. If so, destfilename is set up for invocation of the command processor, with 
  10163. "COMMAND.COM /C" at the start. 
  10164.  
  10165. If the 'D' option is used, the third parameter (environment_path_variable) is 
  10166. ignored (although at least a null string must be passed in anyway). The 'D' 
  10167. option will cause filename to be searched for in the following directories: 
  10168.  
  10169.  1. the current directory, and then 
  10170.  
  10171.  2. the directories listed in the EPMPATH environment variable (if it is 
  10172.     defined), and then 
  10173.  
  10174.  3. the directories in the DPATH environment variable, and then 
  10175.  
  10176.  4. the same directory as the file EPM.EXE. 
  10177.  
  10178. An example of usage is: 
  10179.  
  10180. findfile complete_filespec, 'e3help.hlp', '', 'D'
  10181.  
  10182.  
  10183. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10184.  
  10185. Examples: 
  10186.  
  10187.    findfile cmdline,'dir','','P'
  10188.       If rc is zero (no error) then cmdline could
  10189.       be 'C:\COMMAND.COM /C dir'
  10190.  
  10191.    findfile cmdline,'subdir','PATH','P'
  10192.       If rc is zero then cmdline could
  10193.       be 'C:\UTIL\subdir.com'
  10194.  
  10195.  
  10196. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10197.  
  10198. Is described in section Conditional and Loop Statements. 
  10199.  
  10200.  
  10201. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10202.  
  10203. Is described in section Conditional and Loop Statements. 
  10204.  
  10205.  
  10206. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10207.  
  10208. GETFILEID  identifier [ ',' {';'} string_expression] 
  10209.  
  10210.  
  10211. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10212.  
  10213. Is described in the section Fileid Structure. 
  10214.  
  10215.  
  10216. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10217.  
  10218. GETKEYSTATE(number ) 
  10219.  
  10220.  
  10221. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10222.  
  10223. Is used to test the shift state of the shift keys. This statement replaces E's 
  10224. previous statements of: GETSHIFTSTATE and SETSHIFTSTATE. The syntax for EPM's 
  10225. GETKEYSTATE is: 
  10226.  
  10227.   keystate = getshiftstate( virtual_key_code)
  10228.  
  10229. where the virtual_key_code is one of the VK codes from PMWIN.H. For 
  10230. convenience, the returned test states of VK codes (like PositiveOdd and 
  10231. NegativeEven) have been converted to single values as follows: 
  10232.  
  10233.   KS_DOWN       1  (NegativeEven; key is down)
  10234.   KS_DOWNTOGGLE 2  (NEgativeOdd; key is down + toggled)
  10235.   KS_UP         3  (PositiveEven; key is up)
  10236.   KS_UPTOGGLE   4  (PostiveOdd; key is up + toggled)
  10237.  
  10238.  
  10239. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10240.  
  10241. GETLINE   line [, {;} line_number [ , {;} fileid] ] 
  10242.  
  10243.  
  10244. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10245.  
  10246. Gets a specified line from a specified file into the variable line. Defaulted 
  10247. values for omitted parameters are line_number = current line, and fileid = 
  10248. current file. 
  10249.  
  10250.  
  10251. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10252.  
  10253. For example: 
  10254.  
  10255. GETLINE line
  10256. /* line = current line of current file */
  10257.  
  10258. GETLINE  line, 7
  10259. /* line = line 7 of current file */
  10260.  
  10261. GETLINE  line, 3, ThatFile
  10262. /* line = line 3 of file whose fileid
  10263.      is in variable ThatFile */
  10264. The statement: 
  10265.  
  10266. GETLINE line, 0
  10267. results in the variable line being set to null. 
  10268.  
  10269.  
  10270. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10271.  
  10272. GETMARK first_line [, {;} last_line [, {;} first_col [, {;} last_col [ , {;} 
  10273. mark_fileid ] ] ] 
  10274.  
  10275.  
  10276. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10277.  
  10278. Returns the current mark coordinates and fileid. If no mark exists, the values 
  10279. returned are meaningless; use the function MARKTYPE() to precheck whether a 
  10280. mark exists. 
  10281.  
  10282.  
  10283. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10284.  
  10285. IF MARKTYPE()<>'' THEN /* text marked? */
  10286.    /* Get active mark coordinates and fileid */
  10287.    GETMARK  first_line, last_line,first_col,
  10288.             last_col, mark_fileid
  10289. ENDIF
  10290.  
  10291.  
  10292. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10293.  
  10294. GETMARKG  first_line [, {;} last_line [, {;} first_col [, {;} last_col [, {;} 
  10295. mark_fileid ] ] ] 
  10296.  
  10297.  
  10298. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10299.  
  10300. Like GETMARK in that it returns the current mark coordinates and fileid, but 
  10301. unlike GETMARK, the last_col parameter of GEMARKG represents the right edge of 
  10302. the mark as opposed to the last column in the mark. 
  10303.  
  10304.  
  10305. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10306.  
  10307. GETPMINFO( parameter ) 
  10308.  
  10309.  
  10310. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10311.  
  10312. The following are constants values that are to be used as parameters to the 
  10313. getpminfo internal function: 
  10314.  
  10315.   HAB             0      EDITORMSGAREA       8
  10316.   OWNERCLIENT     1      EDITORVSCROLL       9
  10317.   OWNERFRAME      2      EDITORHSCROLL      10
  10318.   PARENTCLIENT    3      EDITORINTERPRETER  11
  10319.   PARENTFRAME     4      EDITVIOPS          12
  10320.   EDITCLIENT      5      EDITTITLEBAR       13
  10321.   EDITFRAME       6      EDITCURSOR         14
  10322.   EDITSTATUSAREA  7
  10323.  
  10324. Depending on the parameter passed, certain PM information will be returned. See 
  10325. the OS/2 Reference Manual for more information on the meanings of these 
  10326. constants and the meaning of the information returned. 
  10327.  
  10328. Also the the file STDCTRL.E for sample usage of the GETPMINFO command. 
  10329.  
  10330.  
  10331. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10332.  
  10333. GETSEARCH identifier 
  10334.  
  10335.  
  10336. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10337.  
  10338. Saves last search command in string variable search_cmd. See the SETSEARCH 
  10339. command for retrieving such a command, and examples of usage. 
  10340.  
  10341.  
  10342. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10343.  
  10344. HEX( 'character' ) 
  10345.  
  10346.  
  10347. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10348.  
  10349. Returns the hexadecimal value associated with the ASCII representation of 
  10350. character. 
  10351.  
  10352.  
  10353. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10354.  
  10355. HEX('A') = 41
  10356.  
  10357.  
  10358. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10359.  
  10360. Is described in Conditional and Loop Statements. 
  10361.  
  10362.  
  10363. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10364.  
  10365. Is described in Conditional and Loop Statements. 
  10366.  
  10367.  
  10368. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10369.  
  10370. Is described in section Compiler Directive Statements and in The EPM User's 
  10371. Guide. 
  10372.  
  10373.  
  10374. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10375.  
  10376. Is described in section Compiler Directive Statements and in The EPM User's 
  10377. Guide. 
  10378.  
  10379.  
  10380. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10381.  
  10382. INSERT 
  10383.  
  10384.  
  10385. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10386.  
  10387. Inserts a new line after the current line and position cursor in same column of 
  10388. new line as the first non-empty column of the previous line. 
  10389.  
  10390. Note:  Previously, INSERT_LINE was a synonym for INSERT. This was dropped 
  10391.        because it was felt that it was too confusing to have two statements, 
  10392.        INSERT_LINE and INSERTLINE, with different behaviors.
  10393.  
  10394.  
  10395. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10396.  
  10397. INSERT_ATTRIBUTE class, value, isPush, offset [, col [, line [, fileid]]] 
  10398.  
  10399.  
  10400. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10401.  
  10402. This statement (non destructively) inserts an attribute record at the specified 
  10403. location. 
  10404.  
  10405. Class   The class of the attribute record to be inserted. 
  10406.  
  10407. Value   The value field of the attribute record to be inserted. 
  10408.  
  10409. IsPush  The support field of the attribute to insert. 
  10410.  
  10411. Offset  The offset of the position being queried.  Offsets must be negative, 
  10412.         and indicate a position before the specified character location. 
  10413.  
  10414.                  ...[ar-2][ar-1][char]...
  10415.         If a negative offset is specified that is less (more negative) than the 
  10416.         smallest offset of an attribute record at the specified column, then 
  10417.         the new attribute record is placed at an offset that is one less than 
  10418.         the smallest offset. 
  10419.  
  10420.         If an attribute record already exists at the specified offset, then the 
  10421.         old attribute record (and any attribute records at an offset of larger 
  10422.         magnitude) is shifted to an offset of greater magnitude to vacate the 
  10423.         specified offset for the new attribute record. 
  10424.  
  10425. Column  The column number where the new attribute record should be placed.  If 
  10426.         this parameter is omitted, the current column of the cursor is assumed. 
  10427.  
  10428. Line    The line number where the new attribute record should be placed.  If 
  10429.         this parameter is omitted, the current line number of the cursor is 
  10430.         assumed. 
  10431.  
  10432. Fileid  The fileid of the file where the new attribute record should be placed. 
  10433.         If this parameter is omitted, the active file is assumed. 
  10434.  
  10435. See Attribute Pairs for additional information on attributes, or EPMTOOLS 
  10436. PACKAGE on the OS2TOOLS disk for the file ATTRIBUTE.DOC that more fully 
  10437. describes programming attributes. 
  10438.  
  10439.  
  10440. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10441.  
  10442.    class = 1  -- COLOR_CLASS
  10443.    val = Red + WhiteB  -- Red on a white background
  10444.    insert_attribute class, val, 1, -1, 1
  10445.    insert_attribute class, val, 0, -1, length(textline(.line))+1
  10446.    if not (.levelofattributesupport // 2) then  -- Turn on mixed color support
  10447.       .levelofattributesupport = .levelofattributesupport + 1
  10448.    endif
  10449.  
  10450. This will color the current line red.  Note that the pop attribute is put at 
  10451. the end of the line + 1, since it attaches to the left side of a character, and 
  10452. we want the last character to be colored as well. 
  10453.  
  10454.  
  10455. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10456.  
  10457. INSERTLINE  new_line [,{;} line_number [, {;} fileid] ] 
  10458.  
  10459.  
  10460. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10461.  
  10462. Inserts contents of variable new_line just before the designated line of a 
  10463. specified file. Defaulted values for omitted parameters are line_number = 
  10464. current line, and fileid = current file. Without arguments INSERTLINE is 
  10465. identical to the INSERT statement. 
  10466.  
  10467.  
  10468. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10469.  
  10470. INSERTLINE line
  10471. /* inserts line before current line of current file */
  10472.  
  10473. INSERTLINE  line, 7
  10474. /* inserts line before line 7 of current file */
  10475.  
  10476. INSERTLINE  line, 3, ThatFile
  10477. /* inserts line before line 3 of file whose fileid
  10478.      is in variable ThatFile */
  10479.  
  10480.  
  10481. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10482.  
  10483. INSERTSTATE() 
  10484.  
  10485.  
  10486. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10487.  
  10488. Returns the insert state of EPM. A 1 means insert mode is active; 0 means 
  10489. overwrite mode is active. 
  10490.  
  10491.  
  10492. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10493.  
  10494. INSERTSTR( new , target   [,  n [,  length   [,  pad]]] ) 
  10495.  
  10496.  
  10497. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10498.  
  10499. Inserts the string new, padded to length length, into the string target after 
  10500. the nth character. length and n must be non-negative. If n is greater than the 
  10501. length of the target string, padding is added there also. The default pad 
  10502. character is a blank. The default value for n is 0, which means insert before 
  10503. the beginning of the string. 
  10504.  
  10505.  
  10506. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10507.  
  10508. Here are some examples: 
  10509.  
  10510.  INSERTSTR(' ','abcdef',3)         ->    'abc def'
  10511.  INSERTSTR('123','abc',5,6)        ->    'abc  123   '
  10512.  INSERTSTR('123','abc',5,6,'+')    ->    'abc++123+++'
  10513.  INSERTSTR('123','abc')            ->    '123abc'
  10514.  INSERTSTR('123','abc',,5,'-')     ->    '123--abc'
  10515.  
  10516.  
  10517. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10518.  
  10519. INSERTTOGGLE | INSERT_TOGGLE 
  10520.  
  10521.  
  10522. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10523.  
  10524. Toggles cursor from insert mode to replace mode and vice versa.  Like pressing 
  10525. the standard Ins key. 
  10526.  
  10527.  
  10528. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10529.  
  10530. ISADIRTYLINE 
  10531.  
  10532.  
  10533. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10534.  
  10535. Boolean function that tells whether or not the current line has been modified 
  10536. but not yet "checked in".  This corresponds to whether or not the undo opcode 
  10537. will change the line; the function was added in order to enable the Undo menu 
  10538. item to be greyed if not applicable. 
  10539.  
  10540.  
  10541. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10542.  
  10543. Is described in section Conditional and Loop Statements. 
  10544.  
  10545.  
  10546. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10547.  
  10548. Is described in section Conditional and Loop Statements. 
  10549.  
  10550.  
  10551. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10552.  
  10553. ITOA( variable,  radix ) 
  10554.  
  10555.  
  10556. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10557.  
  10558. Converts a two byte binary representation of an integer stored in variable to a 
  10559. string representation of the integer, so that the E language can understand it. 
  10560. radix specifies the base of the number (i.e. base 10 = decimal; base 16 = 
  10561. hexadecimal) to be converted to a string representation. This function is often 
  10562. used to convert integers returned by dynalink library functions from binary 
  10563. representation to ASCII string representation. See DYNALINK() for an example of 
  10564. the use of ITOA(). 
  10565.  
  10566.  
  10567. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10568.  
  10569. JOIN 
  10570.  
  10571.  
  10572. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10573.  
  10574. Joins the next line with current line, with an intervening space. Like the 
  10575. standard a_J key combination. 
  10576.  
  10577.  
  10578. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10579.  
  10580. KEYIN expression 
  10581.  
  10582.  
  10583. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10584.  
  10585. Types expression at current cursor position as if typed from the keyboard 
  10586. without translation or execution. expression is most often a quoted command, 
  10587. although it can also be a numeric expression. 
  10588.  
  10589.  
  10590. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10591.  
  10592. For example, one could file the current file: 
  10593.  
  10594. keyin 'file'
  10595. key enter
  10596. One could also type graphics characters in the text by placing the cursor at 
  10597. the desired location and issuing the statement: 
  10598.  
  10599. keyin \24
  10600.  
  10601.  
  10602. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10603.  
  10604. KEYS name 
  10605.  
  10606.  
  10607. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10608.  
  10609. Changes to the keyset name. The keyset is created by the DEFKEYS statement Key 
  10610. Definitions (DEF and DEFKEYS).  The KEYS statement can be used in conjunction 
  10611. with DEFLOAD DEFLOAD. 
  10612.  
  10613.  
  10614. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10615.  
  10616. The following example changes to a keyset that enhances keys such that the C 
  10617. programming language syntax could be recognized: 
  10618.  
  10619. defload
  10620.   ext=filetype(name)  -- get file extention
  10621.   if ext='C' then     -- test file is a c file
  10622.  
  10623.      keys c_keys      -- change to new keyset
  10624.  
  10625.   endif
  10626.  
  10627.  
  10628. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10629.  
  10630. LASTERROR() 
  10631.  
  10632.  
  10633. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10634.  
  10635. Returns the last error code. The example illustrates its usage. 
  10636.  
  10637.  
  10638. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10639.  
  10640. 'tabs 0'
  10641. 'ma 75 1'
  10642. if lasterror() = -271 then
  10643.     sayerror "margin setting error"
  10644. elseif lasterror() = -272 then
  10645.     sayerror "tabs setting error"
  10646. else
  10647.     sayerror "no error"
  10648. endif
  10649.  
  10650. In the above example, an error would occur while trying to set both tabs and 
  10651. margins. LASTERROR() would return -271, and margin setting error would be 
  10652. printed. Assume the following two lines were substituted for the first two 
  10653. lines of the above example: 
  10654.  
  10655. 'tabs 0'
  10656. 'margins 1 75'
  10657. The result of LASTERROR() would be -272, and tabs setting error would be 
  10658. printed. In this way, you can retain the error code returned by a command even 
  10659. after a second command completes successfully. 
  10660.  
  10661.  
  10662. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10663.  
  10664. LASTKEY( [0 | 1] ) 
  10665.  
  10666.  
  10667. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10668.  
  10669. Returns the user's last keystroke, whether typed manually or executed by a 
  10670. KEYIN or EXECUTEKEY statement. The only values that are valid for the parameter 
  10671. key_number are 0 and 1. The LASTKEY(0) call has the same effect as a LASTKEY() 
  10672. call, which has the same behavior as it always has. This procedure call is not 
  10673. useful for checking for prefix keys. 
  10674.  
  10675.  
  10676. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10677.  
  10678. You would expect that the following example would check for the two-key 
  10679. sequence Esc followed by F5: 
  10680.  
  10681.    def f6=
  10682.       if lastkey()=esc then
  10683.          /* do the new code for Esc-F6 */
  10684.       else
  10685.          /* do the normal F5 (in this case the draw command) */
  10686.          'draw'
  10687.       endif
  10688. However, this is not the case. This definition is executed only if F5 is 
  10689. pressed, and once F5 has been pressed, it becomes the value of LASTKEY(). 
  10690. Therefore the if condition in the example never holds true. 
  10691.  
  10692. The procedure could be useful in the following case: 
  10693.  
  10694. def f5, a_f5, esc =
  10695.     if lastkey() = f5 then
  10696.         /* do something for F5 case */
  10697.     elseif lastkey() = a_f5 then
  10698.         /* do something for A_F5 case */
  10699.     else
  10700.         /* do something for Esc case */
  10701.     endif
  10702.     /* do something for all of the keys */
  10703. In this case, one DEF is defined for multiple keys. By using the LASTKEY() 
  10704. procedure, you can determine which of these keys was pressed. 
  10705.  
  10706. As of version 3.10 we have added an extension to the LASTKEY() procedure to 
  10707. handle two key sequences. The procedure call, LASTKEY(1), returns the key 
  10708. before last, and will handle the problem discussed in the first example. By 
  10709. substituting LASTKEY(1) calls for the LASTKEY() calls in the first example, 
  10710. this piece of code will work as expected: trapping the Esc followed by F5 key 
  10711. sequence. 
  10712.  
  10713.  
  10714. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10715.  
  10716. LASTPOS( needle,  haystack   [, start] ) 
  10717.  
  10718.  
  10719. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10720.  
  10721. searches for needle in haystack from startpos to beginning of string. If 
  10722. startpos is not present, the search begins from the end of string. If needle is 
  10723. not found, zero is returned. needle and haystack must be strings. 
  10724.  
  10725.  
  10726. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10727.  
  10728.    LASTPOS(' ','abc def ghi')   ==8
  10729.    LASTPOS(' ','abcdefghi')     ==0
  10730.    LASTPOS(' ','abc def ghi',7) ==4
  10731.  
  10732.  
  10733. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10734.  
  10735. Is described in section Conditional and Loop Statements. 
  10736.  
  10737.  
  10738. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10739.  
  10740. Is described in section Conditional and Loop Statements. 
  10741.  
  10742.  
  10743. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10744.  
  10745. LEFT 
  10746.  
  10747.  
  10748. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10749.  
  10750. Moves cursor 1 character to the left, like the standard Left. 
  10751.  
  10752.  
  10753. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10754.  
  10755. LEFTSTR( string,  length   [, pad] ) 
  10756.  
  10757.  
  10758. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10759.  
  10760. Returns a string of length length containing the left-most length characters of 
  10761. string. That is, padded with pad characters (or truncated) on the right as 
  10762. needed. The default pad character is a blank. length must be non-negative. 
  10763. Exactly equivalent to SUBSTR(string,1,length[,pad]). 
  10764.  
  10765.  
  10766. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10767.  
  10768. Here are some examples: 
  10769.  
  10770.  LEFTSTR('abc d',8)        ->    'abc d   '
  10771.  LEFTSTR('abc d',8,'.')    ->    'abc d...'
  10772.  LEFTSTR('abc  def',7)     ->    'abc  de'
  10773.  
  10774.  
  10775. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10776.  
  10777. LENGTH( expression ) 
  10778.  
  10779.  
  10780. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10781.  
  10782. Returns length of expression. 
  10783.  
  10784.  
  10785. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10786.  
  10787. Here are some examples: 
  10788.  
  10789.  LENGTH('abcdefgh')    ->    8
  10790.  LENGTH('abc defg')    ->    8
  10791.  LENGTH('')            ->    0
  10792.  
  10793.  
  10794. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10795.  
  10796. LEXAM( numeric_expression ) 
  10797.  
  10798.  
  10799. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10800.  
  10801. Provides spell checking and synonym support for the EPM. 
  10802.  
  10803. The LEXAM opcode allows word verification and word/dictionary lookup. The LEXAM 
  10804. opcode can take on the following syntax: 
  10805.  
  10806.     lexam('Initialize')
  10807.     lexam('Terminate')
  10808.     lexam('PIckup Dictionary',dictionary_name)
  10809.     lexam('DRop Dictionary',dictionary_name)
  10810.     lexam('SEt Addenda Language Type',addenda_type)
  10811.     lexam('Add to Transient Addenda',addenda_name)
  10812.     lexam('Read from Transient Addenda',addenda_name)
  10813.     lexam('Verification',word)
  10814.     lexam('SPelling Aid',word)
  10815.     lexam('Hyphenation',word)
  10816.     lexam('DEhyphenation',word)
  10817.     lexam('SYnonym',word)
  10818.     lexam('GRAMmar Aid',word)
  10819.     lexam('GRADe level',word)
  10820.     lexam('PArt-of-speech',word)
  10821.  
  10822.  
  10823. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10824.  
  10825. LINK string_expression 
  10826.  
  10827.  
  10828. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10829.  
  10830. Is described in section Linkable External Modules. 
  10831.  
  10832.  
  10833. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10834.  
  10835. LINKED( module ) 
  10836.  
  10837.  
  10838. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10839.  
  10840. Queries whether a module is linked.  The return value is: 
  10841.  
  10842. o module number (a small positive integer) if linked 
  10843. o -1 if found on disk but not currently linked 
  10844. o -307 if module can't be found on disk.  This RC value -307 is the same as 
  10845.   sayerror("Link: file not found"). 
  10846. o -308 if the expression is a bad module name that cannot be expanded into a 
  10847.   proper filename.  Same as sayerror("Link: invalid filename"). 
  10848.  
  10849.  
  10850. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  10851.  
  10852. Sample usage:  result = linked("draw"). 
  10853.  
  10854. Note:  If you wish to make sure a module is linked, you can always just repeat 
  10855. the link command.  E won't reload the file from disk if it's already linked, 
  10856. but it will rerun the module's DEFINIT which might not be desirable. 
  10857.  
  10858.  
  10859. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10860.  
  10861. LONGESTLINE() 
  10862.  
  10863.  
  10864. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10865.  
  10866. Returns the length of the longest line in the current file. 
  10867.  
  10868.  
  10869. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10870.  
  10871. Is described in section Conditional and Loop Statements. 
  10872.  
  10873.  
  10874. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10875.  
  10876. Is described in section Conditional and Loop Statements. 
  10877.  
  10878.  
  10879. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10880.  
  10881. LOWCASE( expression ) 
  10882.  
  10883.  
  10884. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10885.  
  10886. Returns the lower-case conversion of the expression.  (In versions earlier than 
  10887. 4.12, the input string was converted in place.  Now the input is left alone and 
  10888. the converted string is returned as the result.) 
  10889.  
  10890.  
  10891. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10892.  
  10893. LTOA( variable,  radix ) 
  10894.  
  10895.  
  10896. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10897.  
  10898. Converts the C representation of a long integer (data type long) stored in 
  10899. variable to a string representation of the same number, so that the E language 
  10900. can understand the number. radix specifies the base of the number (i.e. base 10 
  10901. = decimal; base 16 = hexadecimal) to be converted to a string representation. 
  10902. For use in converting numbers returned by C functions, for example function 
  10903. calls via DYNALINK(). 
  10904.  
  10905.  
  10906. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10907.  
  10908. MACHINE() 
  10909.  
  10910.  
  10911. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10912.  
  10913. Returns operating system and machine information string.  Return values are 
  10914. "PCDOS" or "OS2REAL" or "OS2PROTECT". 
  10915.  
  10916.  
  10917. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10918.  
  10919. MAP_POINT subop, op2, op3 [, op4 [, comment ] ] 
  10920.  
  10921.  
  10922. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10923.  
  10924. Everything other than subop must be a variable. This opcode is used to map 
  10925. between a pixel-offset in the window, a pixel-offset in the document, and a 
  10926. line, column and offset within the file. 
  10927.  
  10928.  subop               op2_in   op3_in    op4_in   op2_out  op3_out  op4_out
  10929.    1  WindowToDoc       x        y         -        x        y        =
  10930.    2  DocToLCO          x        y         -        Line     Col      Off
  10931.    3  LCOToDoc          Line     Col       Off      x        y        =
  10932.    4  Doc2Win           x        y         -        x        y        =
  10933.    5  Win2LCO           x        y         -        Line     Col      Off
  10934.    6  LCO2Win           Line     Col       Off      x        y        =
  10935. The comment field is an extra field that eventually will be used to indicate if 
  10936. the special processing had to occur.  For example, a requested point was beyond 
  10937. the EOF and the returned values are based on extrapolation. 
  10938.  
  10939.  
  10940. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10941.  
  10942. MARKBLOCK | MARK_BLOCK 
  10943.  
  10944.  
  10945. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10946.  
  10947. Starts or changes coordinates of a block mark, like the standard Alt-B. 
  10948.  
  10949.  
  10950. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10951.  
  10952. MARKBLOCKG 
  10953.  
  10954.  
  10955. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10956.  
  10957. Like MARKBLOCK, but right column must be specified one beyond the desired right 
  10958. column. 
  10959.  
  10960.  
  10961. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10962.  
  10963. MARKCHAR | MARK_CHAR 
  10964.  
  10965.  
  10966. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10967.  
  10968. Starts or changes coordinates of a character mark, like the standard Alt-Z. 
  10969.  
  10970.  
  10971. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10972.  
  10973. MARKCHARG 
  10974.  
  10975.  
  10976. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10977.  
  10978. Like MARKCHAR, but column numbers represent edges rather than characters, so 
  10979. that they can be between attributes (and right column will generally be one 
  10980. higher that it would be for MARKCHAR). 
  10981.  
  10982.  
  10983. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10984.  
  10985. MARKLINE | MARK_LINE 
  10986.  
  10987.  
  10988. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10989.  
  10990. Starts or changes coordinates of a line mark, like the standard Alt-L. 
  10991.  
  10992.  
  10993. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  10994.  
  10995. MARKLINEG 
  10996.  
  10997.  
  10998. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  10999.  
  11000. Same as MARKLINE. 
  11001.  
  11002.  
  11003. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11004.  
  11005. MARKTYPE() 
  11006.  
  11007.  
  11008. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11009.  
  11010. Returns 'BLOCK', 'LINE', or 'CHAR'.  ' ' is returned if no text is highlighted. 
  11011.  
  11012.  
  11013. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11014.  
  11015. MEMCPYX( hexadecimal_address , hexadecimal_address   , length ) 
  11016.  
  11017.  
  11018. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11019.  
  11020. Copies length bytes from source to destination. Both source and destination are 
  11021. binary far pointers; e.g. 
  11022.  
  11023. call memcpyx(atoi(ptr1) || atoi(seg1), atoi(ptr2) || atoi(seg2), len)
  11024.  
  11025.  
  11026. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11027.  
  11028. MOUSE_SETPOINTER 
  11029.  
  11030.  
  11031. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11032.  
  11033. Sets the mouse pointer to the figure specified by type. Mouse figures are: 
  11034.  
  11035. 1 = arrow pointer (can also user the constant SYSTEM_POINTER) 
  11036. 2 = a vertical bar (like those used to request text in a dialog box) 
  11037. 3 = an hour glass 
  11038. 4 = invisible 
  11039. 5 = four way arrows 
  11040. 6 = two way arrow (upper left/lower right) 
  11041. 7 = two way arrow (upper right/lower left) 
  11042. 8 = horizontal arrow 
  11043. 9 = vertical arrow 
  11044. 10 = an outlined box 
  11045. 11 = a stop octagon with a hand in a box 
  11046. 12 = the browse question mark in a box 
  11047. 13 = an explanation point in box 
  11048. 14 = an asterisk in a box 
  11049. 15 = cropping lines (as defined by the constant MARK_POINTER) 
  11050.  
  11051. For instance, when entering browse mode the mouse pointer can be changed to 
  11052. indicate that no text can be entered. 
  11053.  
  11054.  
  11055. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11056.  
  11057. MOVEMARK | MOVE_MARK 
  11058.  
  11059.  
  11060. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11061.  
  11062. Moves marked text to cursor position, like the standard Alt-M. 
  11063.  
  11064.  
  11065. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11066.  
  11067. NEXTFILE | NEXT_FILE 
  11068.  
  11069.  
  11070. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11071.  
  11072. Activates the next file in the active ring, like the standard F12 or Ctrl-N. 
  11073.  
  11074.  
  11075. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11076.  
  11077. OFFSET( variable ) 
  11078.  
  11079.  
  11080. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11081.  
  11082. Returns the offset of the memory address of variable in the form of a binary 
  11083. word. To be used with C functions like those made via DYNALINK(). 
  11084.  
  11085.  
  11086. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11087.  
  11088. OFS( variable ) 
  11089.  
  11090.  
  11091. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11092.  
  11093. Returns a string representation of the offset of the actual memory address of 
  11094. variable. See SEG() for an example of usage. 
  11095.  
  11096.  
  11097. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11098.  
  11099. OVERLAY(new,  target   [, n  [, length   [, pad] ] ]) 
  11100.  
  11101.  
  11102. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11103.  
  11104. overlays the string new, padded  to length k, onto the string target starting 
  11105. at the nth character. k must be zero or positive. If n is greater than the 
  11106. length of the target string, padding is added there also. The default pad 
  11107. character is the blank, and the default value for n is 1. n must be greater 
  11108. than 0. 
  11109.  
  11110.  
  11111. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11112.  
  11113. Examples are: 
  11114.  
  11115.   OVERLAY(' ','abcdef',3)      == 'ab def'
  11116.   OVERLAY('.','abcdef',3,2)    == 'ab. ef'
  11117.   OVERLAY('qq','abcd')         == 'qqcd'
  11118.   OVERLAY('qq','abcd',4)       == 'abcqq'
  11119.   OVERLAY('123','abc',5,6,'+') == 'abc+123+++'
  11120.  
  11121. Although E's OVERLAY procedure is similar to REXX's, they are not identical. E 
  11122. requires that each field be filled with a string, even if it is only a null 
  11123. string. REXX allows a field to be skipped. For example: 
  11124.  
  11125.   OVERLAY('qq',,5,6,'+')
  11126.  
  11127. This would be legal syntax in REXX, but would cause errors in E. The E 
  11128. equivalent would be: 
  11129.  
  11130.   OVERLAY('qq','',5,6,'+')
  11131.  
  11132.  
  11133. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11134.  
  11135. OVERLAYBLOCK | OVERLAY_BLOCK 
  11136.  
  11137.  
  11138. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11139.  
  11140. Copies marked text to cursor position without inserting, like standard Alt-O. 
  11141.  
  11142.  
  11143. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11144.  
  11145. PAGEDOWN | PAGE_DOWN 
  11146.  
  11147.  
  11148. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11149.  
  11150. Moves cursor to next page of current file, like standard PgDn. 
  11151.  
  11152.  
  11153. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11154.  
  11155. PAGEUP | PAGE_UP 
  11156.  
  11157.  
  11158. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11159.  
  11160. Moves cursor to previous page of current file, like standard PgUp. 
  11161.  
  11162.  
  11163. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11164.  
  11165. See The Parse Statement. 
  11166.  
  11167.  
  11168. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11169.  
  11170. See The Parse Statement. 
  11171.  
  11172.  
  11173. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11174.  
  11175. PEEK( segment ,  offset   ,  count ) 
  11176.  
  11177.  
  11178. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11179.  
  11180. Returns string of length count starting at the address  segment:offset.  The 
  11181. segment and offset values are used just as they are in assembler programs. See 
  11182. also POKE in the section Built-in Statement and Procedure Summary. 
  11183.  
  11184. A PEEK() call is often necessary to access the string pointed to by a pointer 
  11185. returned by a DYNALINK() function call. 
  11186.  
  11187.  
  11188. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11189.  
  11190. The following example of this type of usage is based on the procedure get_env() 
  11191. in DOSUTIL.E. 
  11192.  
  11193. seg_ptr = 1234       /* 4-byte place to put a far ptr   */
  11194. cmd_ptr = 1234
  11195. call dynalink('DOSCALLS',  /* dynamic link library name */
  11196.                '#91',       /* ordinal val for DOSGETENV */
  11197.                selector(seg_ptr) ||  /* ptr to env. seg   */
  11198.                offset(seg_ptr)   ||
  11199.                selector(cmd_ptr) || /* ptr to ofs after   */
  11200.                offset(cmd_ptr)    )/*  COMSPEC: unneeded */
  11201. env_seg = itoa(seg_ptr,10)
  11202. env_ofs = 0
  11203. start = env_ofs
  11204. do while peek(env_seg,env_ofs,1) /== \0
  11205.    env_ofs = env_ofs + 1
  11206. end
  11207. setting = peek(env_seg,start,env_ofs-start)
  11208.  
  11209. PEEK() allows us to determine where the end of the string is (marked by a null 
  11210. character: \0), and thereby determine the length of the string. 
  11211.  
  11212. WARNING: Attempts to PEEK to an area not owned by your process will cause a 
  11213. TRAP-D error. 
  11214.  
  11215.  
  11216. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11217.  
  11218. PEEKZ( hexadecimal_address ) | PEEKZ( numeric_expression ,  numeric_expression 
  11219.  
  11220.  
  11221. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11222.  
  11223. Like PEEK, but for an ASCIIZ string. Returns the contents of storage starting 
  11224. with the address given and ending with the character before the next null 
  11225. character. 
  11226.  
  11227.  
  11228. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11229.  
  11230. This lets us simplify the PEEK example to: 
  11231.  
  11232. env_seg = itoa(seg_ptr,10)
  11233. setting = peekz(env_seg,0)
  11234.  
  11235. An alternate format supported is PEEKZ(address), where address is the 4-byte 
  11236. hex address of the storage. This is useful when calling an external routine 
  11237. that returns a far pointer to an ASCIIZ string. 
  11238.  
  11239.  
  11240. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11241.  
  11242. POKE( segment , offset   ,  string ) 
  11243.  
  11244.  
  11245. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11246.  
  11247. Writes string to the address segment:offset The segment and offset values are 
  11248. used just as they are in assembler programs. 
  11249.  
  11250. WARNING: Attempts to POKE to an area not owned by your process will cause a 
  11251. TRAP-D error and crash. 
  11252.  
  11253.  
  11254. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11255.  
  11256.     -- put greeting at beginning of segment.
  11257.     SelOfSharedSeg = itoa(Selector1, 10);
  11258.     poke SelOfSharedSeg , 0 , "Bonjour"\0;
  11259.  
  11260.  
  11261. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11262.  
  11263. POS( needle,  haystack [, start] ) 
  11264.  
  11265.  
  11266. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11267.  
  11268. Returns the position of one string, needle, in another, haystack. (See also the 
  11269. LASTPOS and INDEX functions.)  If the string needle is not found, 0 is 
  11270. returned.  By default the search starts at the first character of haystack 
  11271. (that is start is of the value 1).  This may be overridden by specifying start 
  11272. (which must be a positive whole number), the point at which to start the 
  11273. search. 
  11274.  
  11275.  
  11276. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11277.  
  11278. Here are some examples:
  11279.  
  11280.   POS('day','Saturday')       ->    6
  11281.   POS('x','abc def ghi')      ->    0
  11282.   POS(' ','abc def ghi')      ->    4
  11283.   POS(' ','abc def ghi',5)    ->    8
  11284.  
  11285.  
  11286. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11287.  
  11288. PREVFILE | PREV_FILE 
  11289.  
  11290.  
  11291. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11292.  
  11293. Activates the previous file in the active ring, like the standard Alt-F11 or 
  11294. Ctrl-P key combinations. 
  11295.  
  11296.  
  11297. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11298.  
  11299. QPRINT printername 
  11300.  
  11301.  
  11302. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11303.  
  11304. Performs a WYSIWYG print of the current file to the print queue associated with 
  11305. the named printer. 
  11306.  
  11307.  
  11308. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11309.  
  11310. QUERYACCELSTRING (table_name, id) 
  11311.  
  11312.  
  11313. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11314.  
  11315. Returns the string associated with identifier 'id' in the accelerator table 
  11316. named 'table_name'. 
  11317.  
  11318.  
  11319. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11320.  
  11321.       accelstr=queryaccelstring(activeaccel, menuid)
  11322.       if accelstr <> '' then
  11323.          sayerror 'menu id' menuid 'would execute command' accelstr
  11324.       endif
  11325.  
  11326.  
  11327. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11328.  
  11329. QUERY_ATTRIBUTE class, value, ispush, offset, column, line [, fileid] 
  11330.  
  11331.  
  11332. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11333.  
  11334. This statement allows a macro program to deterine what attribute record can be 
  11335. found at the specified location. 
  11336.  
  11337. Class   returns the class of the found attribute record.  A value of zero is 
  11338.         returned if no attribute was found.  A value between 1 and 63 is 
  11339.         returned if an internally supported attribute record was found.  A 
  11340.         value from 64 to 255 is returned if an application supported attribute 
  11341.         record was found.  The meaning of an application supported attribute 
  11342.         record is not predictable at compile time.  Some administrative macros 
  11343.         will be provided for determining the meaning of a macro during runtime. 
  11344.  
  11345. Value   returns the value of the found attribute record.  Its value is 
  11346.         unchanged if no attribute record was found at the specified location. 
  11347.  
  11348. IsPush  returns the value of the support field of the found attribute.  This 
  11349.         parameter's value is unchanged if no attribute record was found at the 
  11350.         specified location. 
  11351.  
  11352. Offset  The offset of the position being queried.  Must be a negative value, 
  11353.         indicating a position before the specified character location. 
  11354.  
  11355. Column  The column number of the position being queried. 
  11356.  
  11357. Line    The line number of the position being queried. 
  11358.  
  11359. FileID  The fileid of the position being queried.  If unspecified, the current 
  11360.         file will be assumed. 
  11361.  
  11362. See Attribute Pairs for additional information on attributes, or EPMTOOLS 
  11363. PACKAGE on the OS2TOOLS disk for the file ATTRIBUTE.DOC that more fully 
  11364. describes programming attributes. 
  11365.  
  11366.  
  11367. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11368.  
  11369. QUERYFONT (font_id) 
  11370.  
  11371.  
  11372. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11373.  
  11374. Returns the font description associated with font_id, in the form 
  11375. fontname.fontsize.fontsel - e.g. 
  11376.  
  11377.    Courier.DD100WW9HH8BB.0
  11378.    Times New Roman.DD240WW0HH0.0
  11379. In fontsize, the numbers following DD are the size of the font in decipoints 
  11380. for a proportional font, and the numbers following WW and HH are the width and 
  11381. height of the font in pixels for a monospaced font.  The BB is present at the 
  11382. end if the font is a bitmapped font.  'fontsel' is any combination of 
  11383.  
  11384.   1 = Italic
  11385.   2 = Underscore
  11386.   8 = Outline
  11387.  16 = Strikeout
  11388.  32 = Bold
  11389.  
  11390.  
  11391. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11392.  
  11393. QUERYMENUSTRING( menuname , id ) 
  11394.  
  11395.  
  11396. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11397.  
  11398. Determines the command to be executed by the menu specified by the menuname and 
  11399. by id. See Building Menus from the Macro Language for more information on the 
  11400. QUERYMENUSTRING statement. 
  11401.  
  11402.  
  11403. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11404.  
  11405. QUERYPROFILE( file_handle, application , key_name ) 
  11406.  
  11407.  
  11408. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11409.  
  11410. Returns the value for key key_name listed under the application application, 
  11411. found in the .INI file given by the file_handle or the null string if not 
  11412. found. 
  11413.  
  11414. Some valid arguments for file_handle are: 
  11415.  
  11416.    HINI_PROFILE        =  0  -- Searches both OS2.INI and OS2SYS.INI
  11417.    HINI_USERPROFILE    = -1  -- Searches OS2.INI
  11418.    HINI_SYSTEMPROFILE  = -2  -- Searches OS2SYS.INI
  11419.  
  11420.  
  11421. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11422.  
  11423. QUIETSHELL | QUIET_SHELL string_expression 
  11424.  
  11425.  
  11426. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11427.  
  11428. Executes string_expression. string_expression is to be an OS/2 command. If 
  11429. string_expression is an external program, the screen and cursor are not touched 
  11430. before or after the program is executed. 
  11431.  
  11432.  
  11433. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11434.  
  11435. Use this when you know the external program will not write to the screen, and 
  11436. you prefer not to see the screen clear and to be asked to press a key. Normally 
  11437. this is used to keep redirected utilities invisible, for example quietshell 
  11438. "subdir *.* >etemp". 
  11439.  
  11440. If the command DOES write to the screen, say after an unexpected error, its 
  11441. message will appear on top of E's text screen. The text will appear messy until 
  11442. the next time E refreshes the screen.  You can manually force a screen refresh 
  11443. by pressing ESC a couple of times. 
  11444.  
  11445. Another example is quietshell "mc2", which runs Richard Redpath's MC2 
  11446. calculator. This is an unusual example because MC2 does write to the screen, 
  11447. but it takes responsibility for restoring the screen contents it found. The 
  11448. effect is that of a pop-up calculator on top of the text screen. 
  11449.  
  11450.  
  11451. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11452.  
  11453. REFLOW 
  11454.  
  11455.  
  11456. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11457.  
  11458. Reformats marked text using current margin settings, like the standard Alt-P. 
  11459.  
  11460.  
  11461. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11462.  
  11463. REFRESH 
  11464.  
  11465.  
  11466. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11467.  
  11468. Activates the active file in the top level ring. Activates the top level ring 
  11469. and updates portions of screen which need to be updated. 
  11470.  
  11471.  
  11472. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11473.  
  11474. REGISTERFONT (fontname, fontsize,fontsel) 
  11475.  
  11476.  
  11477. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11478.  
  11479. Loads the font specified and returns an identifier that can be set in the .font 
  11480. field or which can be used as the value of a font attribute. 
  11481.  
  11482. 'fontsel' is any combination of 
  11483.  
  11484.   1 = Italic
  11485.   2 = Underscore
  11486.   8 = Outline
  11487.  16 = Strikeout
  11488.  32 = Bold
  11489.  
  11490.  
  11491. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11492.  
  11493. Examples: 
  11494.  
  11495.   .font = registerfont('Times New Roman', 24, 0)  -- Set a 24-point font.
  11496.   .font = registerfont('System Monospaced','WW8HH16',0)  -- 8 x 16 font
  11497.  
  11498.  
  11499. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11500.  
  11501. Is described in section Linkable External Modules. 
  11502.  
  11503.  
  11504. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11505.  
  11506. Is described in section Linkable External Modules. 
  11507.  
  11508.  
  11509. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11510.  
  11511. REPEATFIND | REPEAT_FIND 
  11512.  
  11513.  
  11514. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11515.  
  11516. Repeats find of last string searched, like the standard Ctrl-F. The previous 
  11517. search options are preserved. (Note: If the cursor is currently at the 
  11518. beginning of a target search string, it skips to the next occurrence.) 
  11519.  
  11520.  
  11521. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11522.  
  11523. REPLACELINE new_line [, {;} line_number   [, {;} fileid] ] 
  11524.  
  11525.  
  11526. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11527.  
  11528. Replaces a specified line in the specified file with the contents of variable 
  11529. new_line Defaulted values for omitted parameters are line_number = current 
  11530. line, and fileid = current file. See example under GETLINE. 
  11531.  
  11532.  
  11533. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11534.  
  11535. For example: 
  11536.  
  11537. REPLACELINE line
  11538. /* Replaces current line of current file with line */
  11539.  
  11540. REPLACELINE  line, 7
  11541. /* Replaces line 7 of current file with line */
  11542.  
  11543. REPLACELINE  line, 3, ThatFile
  11544. /* Replace line 3 of file whose fileid
  11545.      is in variable ThatFile with line */
  11546.  
  11547.  
  11548. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11549.  
  11550. RETURN [expression] 
  11551.  
  11552.  
  11553. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11554.  
  11555. Returns expression to caller. If no expression is supplied, a null value is 
  11556. returned to the caller. From a procedure, the returned value is passed back to 
  11557. the caller as a function value (as in x=myproc()). From a command the returned 
  11558. value is assigned to RC. 
  11559.  
  11560. When returning from a key (DEF), an expression is not allowed.  A return from a 
  11561. key DEF is unusual, since keys do not return values, but a return is sometimes 
  11562. used as an easy early exit from a key's program. A return is better than a STOP 
  11563. in case some other procedure was "calling" the key with an executekey; a STOP 
  11564. prevents the caller from regaining control. 
  11565.  
  11566.  
  11567. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11568.  
  11569. REVERSE( string_expression ) 
  11570.  
  11571.  
  11572. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11573.  
  11574. Returns the reverse of the string string. 
  11575.  
  11576.  
  11577. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11578.  
  11579. Here are some examples: 
  11580.  
  11581.     REVERSE('BACKWORDS') --> 'SDROWKCAB'
  11582.     REVERSE('seluR MPE') --> 'EPM Rules'
  11583.  
  11584.  
  11585. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11586.  
  11587. RIGHT 
  11588.  
  11589.  
  11590. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11591.  
  11592. Moves cursor one character to the right, like the standard key Right. 
  11593.  
  11594.  
  11595. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11596.  
  11597. RIGHTSTR( string,  length   [, pad] ) 
  11598.  
  11599.  
  11600. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11601.  
  11602. Returns a string of length length containing the right-most length characters 
  11603. of string. That is, padded with pad characters (or truncated) on the left as 
  11604. needed. The default pad character is a blank. length must be non-negative. 
  11605.  
  11606.  
  11607. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11608.  
  11609. Here are some examples: 
  11610.  
  11611.     RIGHTSTR('abc  d',8)   -->  '  abc  d'
  11612.     RIGHTSTR('abc def',5)  -->  'c def'
  11613.     RIGHTSTR('12',5,'0')   -->  '00012'
  11614.  
  11615.  
  11616. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11617.  
  11618. RUBOUT 
  11619.  
  11620.  
  11621. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11622.  
  11623. Deletes character to left of cursor, like the standard key Backspace. 
  11624.  
  11625.  
  11626. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11627.  
  11628. SAYAT string, row, column,   attribute [, length] 
  11629.  
  11630.  
  11631. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11632.  
  11633. Writes string at the screen location specified by row (any number included in 
  11634. 1..screenheight()) and column (any number included in 1..screenwidth()). The 
  11635. parameter attribute allows you to specify any screen attribute (0..255 or any 
  11636. constant color value listed in COLORS.e) to highlight string. If length is 
  11637. omitted, E assumes length = LENGTH(string). If length < LENGTH(string), E 
  11638. writes the first length number of characters. If length > LENGTH(string), E 
  11639. changes the screen attribute to attribute for the last length - LENGTH(string) 
  11640. number of character positions without changing the text. 
  11641.  
  11642. The window option defines which text window area should be written to by the 
  11643. SAYAT statement. 0=Edit Window, 1=Extra window. The extra window is the window 
  11644. that makes up the status line and message line. The edit window is everything 
  11645. else. 
  11646.  
  11647.  
  11648. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11649.  
  11650. Examples:
  11651.  
  11652. /* write red string in upper right corner */
  11653. sayat 'mymessage', 1, 70, RED
  11654.  
  11655. /* change screen positions (10,20) to (10,24)
  11656.    to green color without changing text */
  11657. sayat '', 10, 20, GREEN, 5
  11658.  
  11659. To put a message to the message line, use the MESSAGE() defproc. 
  11660.  
  11661. Note:  that something printed with the SAYAT statement only stays on the screen 
  11662. until a screen refresh is done. Since a SAYERROR call produces a screen 
  11663. refresh, combining these two statements: 
  11664.  
  11665.   sayat 'My Procedure.', 12, 20, GREEN, 5
  11666.   sayerror "File not found!"
  11667. will result in the SAYAT message never being seen. To prevent this, you can use 
  11668. the DISPLAY statement to stop screen refreshing, for example: 
  11669.  
  11670. display -1              -- turn off display updating
  11671.   sayat 'My Procedure.', 12, 20 ,GREEN, 5
  11672.   sayerror "File not found!"
  11673. display +1              -- turn on display updating
  11674. In this way, the screen will not be refreshed (and therefore the message will 
  11675. stay on the screen) until the next screen update. 
  11676.  
  11677.  
  11678. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11679.  
  11680. SAYERROR( expression ) 
  11681.  
  11682.  
  11683. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11684.  
  11685. Should not be confused with the built-in procedure SAYERROR() described in this 
  11686. section. 
  11687.  
  11688. If expression is the number 0 or 1, any pending error messages are discarded 
  11689. and not displayed. 0 will refresh the screen; 1 will not. 
  11690.  
  11691. If expression is any number other than 0 or 1, `the interpreter displays the 
  11692. string corresponding to that numbered error message.  Error messages and their 
  11693. corresponding return codes are listed in the section Return Codes. 
  11694.  
  11695. Each command in the E language returns a code which indicates any errors that 
  11696. were encountered while trying to perform the command.  Each of these return 
  11697. codes has a corresponding string which explains the error. 
  11698.  
  11699.  
  11700. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11701.  
  11702. For example: 
  11703.  
  11704.   sayerror -275
  11705.  
  11706. This will display the text "Missing filename" on the message line. 
  11707.  
  11708. If expression is a number which does not correspond to a return code, an 
  11709. "ERROR: Message not available" message is printed on the message line. 
  11710.  
  11711. If expression is anything other than a number, the text will be displayed on 
  11712. the message line. For example: 
  11713.  
  11714.   err1 = "-275"   -- remember everything is a string
  11715.   sayerror err1   --  equivalent to: err1 = -275
  11716.  
  11717.   err2 = "David"
  11718.   sayerror err2
  11719.  
  11720. The first example will display the error message (not "-275") on the message 
  11721. line. The second example will display the text David on the message line. 
  11722.  
  11723. A combination of text and numbers will act as if it were all text. For example: 
  11724.  
  11725.    sayerror "The error message was " err1
  11726.  
  11727. The intention to display all text would not work in this case. Instead the user 
  11728. would get: 
  11729.  
  11730.   The error message was -275
  11731.  
  11732. The error code did not get translated. 
  11733.  
  11734. To help clarify this explanation, try entering and compiling the following 
  11735. defc: 
  11736.  
  11737.   defc mytest
  11738.     sayerror arg(1)
  11739.  
  11740. Then experiment by typing in the command line dialog box mytest followed by 
  11741. valid error numbers, invalid error numbers, text, and text with numbers to 
  11742. determine what will happen. 
  11743.  
  11744.  
  11745. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11746.  
  11747. SAYERROR expression 
  11748.  
  11749.  
  11750. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11751.  
  11752. Returns the return code specified by error_string. Note that this is only true 
  11753. if the sayerror procedure acts as a function and returns a return code. If the 
  11754. SAYERROR() procedure is not assigned and not used in a comparison, then the 
  11755. procedure acts the same as the SAYERROR statement (also described in this 
  11756. section). 
  11757.  
  11758.  
  11759. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11760.  
  11761. For example: 
  11762.  
  11763.   x = sayerror("new file")
  11764.   sayerror("new file")
  11765.  
  11766. The first example will put the return code for new file (ie. -282) into the 
  11767. variable x. The second example will act in the same manner as a SAYERROR 
  11768. statement and would display the words "new file" on the message line. 
  11769.  
  11770.  The case of error_string does not matter. The compiler will convert 
  11771. error_string to uppercase and then perform the lookup for error_string. The 
  11772. compiler reduces sayerror(error_string) to a constant for efficiency. 
  11773. Therefore, if the words new file were changed to gobbildy gook (not a valid 
  11774. error message), the compiler would not compile and return an "invalid 
  11775. parameter" error message. 
  11776.  
  11777. The most common usage of this is to test an return code to see if a certain 
  11778. error occurred. For example: 
  11779.  
  11780.      'e myfile'
  11781.      if rc=sayerror("new file") then
  11782. All error messages and their corresponding RC code numbers can be found in 
  11783. Return Codes. 
  11784.  
  11785.  
  11786. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11787.  
  11788. SAYERRORTEXT'(' numeric_expression ')' 
  11789.  
  11790.  
  11791. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11792.  
  11793. Returns the message that would be displayed for error code rc. 
  11794.  
  11795.  
  11796. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11797.  
  11798. SCREENHEIGHT() 
  11799.  
  11800.  
  11801. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11802.  
  11803. Returns physical screenheight, usually 25. 
  11804.  
  11805.  
  11806. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11807.  
  11808. SCREENWIDTH() 
  11809.  
  11810.  
  11811. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11812.  
  11813. Returns physical screenwidth, usually 80. 
  11814.  
  11815.  
  11816. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11817.  
  11818. SEG( variable ) 
  11819.  
  11820.  
  11821. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11822.  
  11823. Returns a string representation of the segment of the actual memory address of 
  11824. variable. 
  11825.  
  11826.  
  11827. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11828.  
  11829. For example:
  11830.  
  11831.     v = 'testing'
  11832.     sayerror peek( seg(v), ofs(v), 7 )
  11833.  
  11834. The above example prints testing. See also OFS(). 
  11835.  
  11836.  
  11837. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11838.  
  11839. SELECTOR( variable ) 
  11840.  
  11841.  
  11842. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11843.  
  11844. Returns the segment address of variable in the form of a binary word. To be 
  11845. used with C functions, like those made via DYNALINK(). 
  11846.  
  11847. This function it is to be used only during the protected mode execution. 
  11848.  
  11849.  
  11850. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11851.  
  11852. SETMARK firstline, lastline, firstcol, lastcol, marktype, fileid 
  11853.  
  11854.  
  11855. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11856.  
  11857. Sets a mark in file 'fileid' from firstline firstcol to lastline lastcol. 
  11858. marktype must be one of: 
  11859.  
  11860.  0 = line mark
  11861.  1 = char mark
  11862.  2 = block mark
  11863.  3 = charg mark
  11864.  4 = blockg mark
  11865.  
  11866.  
  11867. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11868.  
  11869. SETPROFILE( string_expression, string_expression, string_expression ) 
  11870.  
  11871.  
  11872. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11873.  
  11874. Sets the value for key key_name listed under the application application to 
  11875. data in OS2.INI. 
  11876.  
  11877.  
  11878. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11879.  
  11880. SETSEARCH identifier 
  11881.  
  11882.  
  11883. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11884.  
  11885. Retrieves the search command string saved in the variable search_cmd via a 
  11886. GETSEARCH statement. These two statements allow the user to save a search 
  11887. command, perform other searches and then retrieve the original command, so that 
  11888. Ctrl-F's and REPEATFIND statements refer to the original search pattern. 
  11889.  
  11890.  
  11891. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11892.  
  11893. For example: 
  11894.  
  11895.    'xcom L /foobar/c'
  11896.    GETSEARCH search_command
  11897.    'L /word'
  11898.    SETSEARCH search_command
  11899. The first statement in the above example issues a search command. The GETSEARCH 
  11900. statement effectively sets the variable search_command to 'xcom L/foobar/c'. 
  11901. Then another search command is issued, wiping out the first search command, but 
  11902. the SETSEARCH statement restores the first command, so that if a Ctrl-F 
  11903. (REPEAT_FIND) is now executed, the string foobar will be once again located. 
  11904.  
  11905.  
  11906. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11907.  
  11908. SHIFTLEFT | SHIFT_LEFT 
  11909.  
  11910.  
  11911. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11912.  
  11913. Shifts marked text 1 position to left, like the standard Ctrl-F7. 
  11914.  
  11915.  
  11916. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11917.  
  11918. SHIFTRIGHT | SHIFT_RIGHT 
  11919.  
  11920.  
  11921. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11922.  
  11923. Shifts marked text 1 position to right, like the standard Ctrl-F8. 
  11924.  
  11925.  
  11926. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11927.  
  11928. SHOWMENU 
  11929.  
  11930.  
  11931. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11932.  
  11933. Displays a menu after it has been built. See the section Building Menus from 
  11934. the Macro Language for more information on the SHOWMENU statement. 
  11935.  
  11936.  
  11937. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11938.  
  11939. SPLIT 
  11940.  
  11941.  
  11942. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11943.  
  11944. Splits current line at cursor position, like the standard Alt-S. 
  11945.  
  11946.  
  11947. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11948.  
  11949. STOP 
  11950.  
  11951.  
  11952. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11953.  
  11954. Stops execution of interpreter. A RETURN statement returns control to any 
  11955. calling procedures, however the STOP statement ends the execution immediately. 
  11956. RETURN is the preferred means of exiting a procedure, however, STOP is useful 
  11957. for terminating execution on a critical error. 
  11958.  
  11959.  
  11960. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11961.  
  11962. STOPONRC | STOP_ON_RC 
  11963.  
  11964.  
  11965. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11966.  
  11967. Stops execution of interpreter only if rc is non-zero. 
  11968.  
  11969.  
  11970. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  11971.  
  11972. STRIP( string [,  (L|T|B)]  [,  'char' ] ) 
  11973.  
  11974.  
  11975. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  11976.  
  11977. Removes char from string in any of the following positions depending upon the 
  11978. option specified: 
  11979.  
  11980. Option:        Position: 
  11981. 'L' 
  11982.                Leading 
  11983. 'T' 
  11984.                Trailing 
  11985. 'B' 
  11986.                Both 
  11987.  
  11988. If option is omitted, the default is B. If char is omitted, the default is the 
  11989. space character.  (Same as REXX.) 
  11990.  
  11991.  
  11992. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  11993.  
  11994.    strip('  ab c  ')     = 'ab c'
  11995.    strip('  ab c  ','L') = 'ab c  '
  11996.  
  11997. Note:  Calling the STRIP() function does not actually change the value of the 
  11998. parameter string. In order to modify a variable you must assign to it, for 
  11999. example: 
  12000.  
  12001. field = strip( field )
  12002.  
  12003.  
  12004. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12005.  
  12006. SUBSTR( string,  n [, length   [,  'pad' ] ] ) 
  12007.  
  12008.  
  12009. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12010.  
  12011. Returns the substring of string which begins at the nth character, and is of 
  12012. length, padded with blanks or the specified character (pad). If k is omitted, 
  12013. it defaults to be the rest of the string, and the default pad character is a 
  12014. blank. n must be positive. 
  12015.  
  12016.  
  12017. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12018.  
  12019.     SUBSTR('abc',2)       == 'bc'
  12020.     SUBSTR('abc',2,4)     == 'bc  '
  12021.     SUBSTR('abc',2,6,'.') == 'bc....'
  12022.  
  12023. Note: in some situations the positional (numeric) patterns of parsing templates 
  12024. are more convenient for selecting substring, especially if more than one 
  12025. substring is to be extracted from a string. 
  12026.  
  12027.  
  12028. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12029.  
  12030. SUBWORD( string , n   [,  length] ) 
  12031.  
  12032.  
  12033. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12034.  
  12035. Returns the substring of string that begins at the nth word, and is of length 
  12036. length blank-delimited words. If length is not specified, the rest of the 
  12037. string is returned. n must be positive. The returned string will never have 
  12038. leading or trailing blanks, but will include all blanks between the selected 
  12039. words. 
  12040.  
  12041.  
  12042. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12043.  
  12044. Here are some examples: 
  12045.  
  12046.  SUBWORD('Now is the  time',2,2)    ->    'is the'
  12047.  SUBWORD('Now is the  time',3)      ->    'the  time'
  12048.  SUBWORD('Now is the  time',5)      ->    ''
  12049.  
  12050.  
  12051. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12052.  
  12053. TAB 
  12054.  
  12055.  
  12056. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12057.  
  12058. Moves cursor to next tab stop, like standard key Tab. 
  12059.  
  12060.  
  12061. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12062.  
  12063. TABWORD | TAB_WORD 
  12064.  
  12065.  
  12066. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12067.  
  12068. Positions cursor on first character of next word, like the standard key 
  12069. Ctrl-Right. If there are no more words, the cursor is positioned at the end of 
  12070. the last word. 
  12071.  
  12072.  
  12073. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12074.  
  12075. TEXTLINE( line_num ) 
  12076.  
  12077.  
  12078. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12079.  
  12080. Returns the text of line number line_num. The following statements perform the 
  12081. same function: 
  12082.  
  12083.    getline line, i
  12084.  
  12085. and
  12086.  
  12087.    line = textline(i)
  12088. The TEXTLINE() procedure is simply a more economical way to do comparison loops 
  12089. like: 
  12090.  
  12091.    while textline(i) == ''
  12092.        deleteline i
  12093.  
  12094.  
  12095. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12096.  
  12097. TOP 
  12098.  
  12099.  
  12100. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12101.  
  12102. Moves cursor to top of file. 
  12103.  
  12104.  
  12105. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12106.  
  12107. TRANSLATE( string [, tableo   [, tablei   [, pad ] ] ] ) 
  12108.  
  12109.  
  12110. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12111.  
  12112.  Translates characters in string to be other characters, or may be used to 
  12113. reorder characters in a string.  If neither translate table is given, string is 
  12114. simply translated to uppercase.  tableo is the output table and tablei is the 
  12115. input translate table (the default is ASCII 0...255).  The output table 
  12116. defaults to the null string, and is padded with pad or truncated as necessary. 
  12117. The default pad is a blank.  The tables may be of any length: the first 
  12118. occurrence of a character in the input table is the one that is used if there 
  12119. are duplicates. 
  12120.  
  12121.  
  12122. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12123.  
  12124. Examples:
  12125.  
  12126.   TRANSLATE('abcdef')                    ==    'ABCDEF'
  12127.   TRANSLATE('abbc','?','b')              ==    'a??c'
  12128.   TRANSLATE('abcdef','12','ec')          ==    'ab2d1f'
  12129.   TRANSLATE('abcdef','12','abcd','.')    ==    '12..ef'
  12130.   TRANSLATE('4123','abcd','1234')        ==    'dabc'
  12131.  
  12132. Note:  The last example shows how the TRANSLATE function may be used to reorder 
  12133. the characters in a string.  In the example, any 4-character string could be 
  12134. specified as the second argument and its last character would be moved to the 
  12135. beginning of the string. 
  12136.  
  12137.  
  12138. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12139.  
  12140. Is described in section Compiler Directive Statements. 
  12141.  
  12142.  
  12143. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12144.  
  12145. Is described in section Compiler Directive Statements. 
  12146.  
  12147.  
  12148. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12149.  
  12150. UNDO 
  12151.  
  12152.  
  12153. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12154.  
  12155. Restores the current line after modification (but before leaving it), like the 
  12156. standard F9 key. Pressing the key (or issuing the statement) twice causes the 
  12157. UNDO to undo itself, i.e. the line is re-modified. 
  12158.  
  12159.  
  12160. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12161.  
  12162. UNDOACTION action, statevar 
  12163.  
  12164.  
  12165. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12166.  
  12167. Statevar must be a variable; it is used for input or output depending on the 
  12168. action.  Actions are: 
  12169.  
  12170. Action Value Result 
  12171.  
  12172. 1=GET_STATE Returns a handle for the current state of the current file.  If the 
  12173.           file hasn't changed since the the last time the file was checked, 
  12174.           then the same value is returned.  If the file has changed, the 
  12175.           current state is checkpointed and a new handle is returned. 
  12176.  
  12177. 2=GET_OLDEST_STATE The editor periodically forgets old states in order to save 
  12178.           memory.  This call allows one to determine the oldest reachable 
  12179.           state. 
  12180.  
  12181. 3=GOTO_STATE If the current state is not yet named, it is checkpointed and then 
  12182.           the content of the file is changed to reflect the specified state. 
  12183.  
  12184. 4=DISABLE_RECORDING The parameter specifies at which times state checkin should 
  12185.           no longer automatically be done.  A sideeffect of this command is to 
  12186.           checkin the current state if it is not already checked in. 
  12187.  
  12188.                                                   Times   0 upon starting each keystroke
  12189.                                                           1 upon starting each command
  12190.                                                           2 when moving the cursor from a
  12191.                                                                       modified line.
  12192.  
  12193. 5=ENABLE_RECORDING The parameter specifies at what additional times checkin 
  12194.           should be done. Unlike the disabling code, this operation does not 
  12195.           have checkin as a side effect.  See DISABLE for time codes. 
  12196.  
  12197. 6=QUERY_NAMED_SEQ This returns a string consisting of two numbers seperated by 
  12198.           an elipsis. This string represents the oldest and most recent states 
  12199.           that can be reached. These are lowlevel handles, so they can only be 
  12200.           use to call GOTO_STATE2.  The left most number returned represents 
  12201.           the oldest state the is currently remembered.  It is possible that it 
  12202.           is not reachable going to a state causes a checkpointing of the 
  12203.           current state and check pointing may require a trimming of the undo 
  12204.           tree.  If the current state is checked in, the second value 
  12205.           represents the current state.  If the current state is not checked 
  12206.           in, the second value represents the state of file when the next 
  12207.           checkin is done.  (Note a checkin will be done as a side effect of 
  12208.           the first GOTO.)  BTW, one can go to any state between the first and 
  12209.           last.  They do represent a temporal sequence. 
  12210.  
  12211. 7=GOTO_STATE2 This is like GOTO_STATE, except the parameter should be a low 
  12212.           level handle like those returned from QUERY_NAMED_SEQ. 
  12213.  
  12214.  
  12215. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12216.  
  12217. UNLINK string_expression 
  12218.  
  12219.  
  12220. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12221.  
  12222. Is described in section Linkable External Modules. 
  12223.  
  12224.  
  12225. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12226.  
  12227. UNMARK 
  12228.  
  12229.  
  12230. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12231.  
  12232. Removes text marks, like the standard key Alt-U. 
  12233.  
  12234.  
  12235. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12236.  
  12237. UP 
  12238.  
  12239.  
  12240. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12241.  
  12242. Moves cursor 1 character up, like standard Up key. 
  12243.  
  12244.  
  12245. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12246.  
  12247. UPCASE( expression ) 
  12248.  
  12249.  
  12250. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12251.  
  12252. Returns the upper-case conversion of the expression. 
  12253.  
  12254.  
  12255. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12256.  
  12257. VER() 
  12258.  
  12259.  
  12260. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12261.  
  12262. Returns the version of the editor being used. 
  12263.  
  12264. If option is 1 then VER returns the editors numeric version. If option is 2, 
  12265. VER returns the minimum allowed version number of a E macro file to be used 
  12266. within this version.  If no option is specified, the version "string" is 
  12267. returned. 
  12268.  
  12269.  
  12270. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12271.  
  12272. VERIFY( string ,  reference  [ ,(M|N)   [,  start] ]) 
  12273.  
  12274.  
  12275. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12276.  
  12277. verifies that string is composed only of characters from reference, by 
  12278. returning the position of the first character in string that is not also in 
  12279. reference.  If all the characters are present in reference, 0 is returned. The 
  12280. options are: 
  12281.  
  12282. 'Match'       and       'Nomatch'
  12283. If 'Match' is specified, i.e. the value of the third argument expression is a 
  12284. string beginning with 'M' or 'm', the position of the first character in string 
  12285. that is in reference is returned.  0 is returned if none of the characters are 
  12286. found. 'Nomatch' (or any string expression beginning with 'N' or 'n') can also 
  12287. be specified, although you would not normally do so because 'Nomatch' is the 
  12288. default. 
  12289.  
  12290. The default for start is 1, making the search start at the first character of 
  12291. string.  This can be overridden by giving a different start value, which must 
  12292. be positive. 
  12293.  
  12294. If string is null, 0 is returned regardless of the value of the third argument. 
  12295. Similarly if start is greater than length(string), 0 is returned. 
  12296.  
  12297.  
  12298. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12299.  
  12300. Examples:
  12301.  
  12302.        VERIFY('123','1234567890')      ==  0
  12303.        VERIFY('1Z3','1234567890')      ==  2
  12304.        VERIFY('AB3','1234567890','M')  ==  3
  12305. The REXX documentation includes this example: 
  12306.  
  12307.        VERIFY('1P3Q4','1234567890',,3) ==  4
  12308. Notice that the third parameter is completely omitted between two adjacent 
  12309. commas.  This causes REXX to use the default option of 'nomatch'. 
  12310.  
  12311. In general, the E compiler does not like parameters to be completely omitted in 
  12312. this way.  It expects the parameter to be present even if it's an empty string. 
  12313. Thus the same intent can be achieved by either of these: 
  12314.  
  12315.        VERIFY('1P3Q4','1234567890','',3)  ==  4
  12316.        VERIFY('1P3Q4','1234567890','N',3) ==  4
  12317.  
  12318.  
  12319. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12320.  
  12321. Is described in section Conditional and Loop Statements. 
  12322.  
  12323.  
  12324. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12325.  
  12326. Is described in section Conditional and Loop Statements. 
  12327.  
  12328.  
  12329. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12330.  
  12331. WINDOWMESSAGE(send_flag, target, message, mp1, mp2) 
  12332.  
  12333.  
  12334. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12335.  
  12336. Performs a WinPostMessage (if send_flag = 0) or WinSendMessage (if send_flag = 
  12337. 1) to the target window with the given message number and MP1 and MP2 values. 
  12338.  
  12339.  
  12340. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12341.  
  12342. /* Pop the command line and pre-fill it with 'Prompt'
  12343. call windowmessage(0,  getpminfo(EPMINFO_OWNERCLIENT),
  12344.                    5124,               -- EPM_POPCMDLINE
  12345.                    0,
  12346.                    put_in_buffer('Prompt') )
  12347.  
  12348.  
  12349. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12350.  
  12351. WINMESSAGEBOX(caption, text [, attributes]) 
  12352.  
  12353.  
  12354. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12355.  
  12356. Puts up a PM message box containing caption as the title and text as the 
  12357. contents.  attributes is any combination of the MB_ constants from PMWIN.H in 
  12358. the OS/2 Toolkit.  These are duplicated in STDCONST.E. 
  12359.  
  12360.  
  12361. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12362.  
  12363. r = WinMessageBox('Reality check',
  12364.                   'Are you sure you want to delete your thesis?',
  12365.                   MB_YESNOCANCEL + MB_WARNING + MB_DEFBUTTON3 + MB_MOVEABLE)
  12366. if r = MBID_YES then
  12367.    sayerror 'Maybe you should sleep on it...'
  12368. elseif r = MBID_NO then
  12369.    sayerror 'Good idea!'
  12370. else
  12371.    sayerror '(Forget the whole thing.)'
  12372. endif
  12373.  
  12374.  
  12375. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12376.  
  12377. WORD( string , n ) 
  12378.  
  12379.  
  12380. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12381.  
  12382. Returns the nth blank-delimited word in string. n must be positive. If there 
  12383. are less than n words in string, the null string is returned. Exactly 
  12384. equivalent to SUBWORD(string,n,1). 
  12385.  
  12386.  
  12387. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12388.  
  12389. Here are some examples: 
  12390.  
  12391.     WORD('Now is the time',3)    -->  'the'
  12392.     WORD('Now is the time',5)    -->  ''
  12393.  
  12394.  
  12395. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12396.  
  12397. WORDINDEX( string , n ) 
  12398.  
  12399.  
  12400. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12401.  
  12402. Returns the character position of the nth blank-delimited word in string. n 
  12403. must be positive. If there are less than n words in string, 0 is returned. 
  12404.  
  12405.  
  12406. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12407.  
  12408. Here are some examples: 
  12409.  
  12410.     WORDINDEX('Now is the time',3)   -->    8
  12411.     WORDINDEX('Now is the time',6)   -->    0
  12412.  
  12413.  
  12414. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12415.  
  12416. WORDLENGTH( string , n ) 
  12417.  
  12418.  
  12419. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12420.  
  12421. Returns the length of the nth blank-delimited word in string. n must be 
  12422. positive. If there are less than n words in string, 0 is returned. 
  12423.  
  12424.  
  12425. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12426.  
  12427. Here are some examples: 
  12428.  
  12429.     WORDLENGTH('Now is the time',2)    -->   2
  12430.     WORDLENGTH('Now comes the time',2) -->   5
  12431.     WORDLENGTH('Now is the time',6)    -->   0
  12432.  
  12433.  
  12434. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12435.  
  12436. WORDPOS( needle , haystack   [,  start] ) 
  12437.  
  12438.  
  12439. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12440.  
  12441. Searches haystack for the first occurrence of the sequence of blank-delimited 
  12442. words needle and returns the word number of the first word of needle in 
  12443. haystack. Multiple blanks between words in either needle or haystack are 
  12444. treated as a single blank for the comparison, but otherwise the words must 
  12445. match exactly. Returns 0 if needle is not found. 
  12446.  
  12447. By default the search starts at the first word in haystack. This may be 
  12448. overridden by specifying start (which must be positive), the word at which to 
  12449. start the search. 
  12450.  
  12451.  
  12452. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12453.  
  12454. Here are some examples: 
  12455.  
  12456.  WORDPOS('the','now is the time')              ->  3
  12457.  WORDPOS('The','now is the time')              ->  0
  12458.  WORDPOS('is the','now is the time')           ->  2
  12459.  WORDPOS('is   the','now is the time')         ->  2
  12460.  WORDPOS('is   time ','now is   the time')     ->  0
  12461.  WORDPOS('be','To be or not to be')            ->  2
  12462.  WORDPOS('be','To be or not to be',3)          ->  6
  12463.  
  12464.  
  12465. ΓòÉΓòÉΓòÉ <hidden> Syntax ΓòÉΓòÉΓòÉ
  12466.  
  12467. WORDS( string ) 
  12468.  
  12469.  
  12470. ΓòÉΓòÉΓòÉ <hidden> Definition ΓòÉΓòÉΓòÉ
  12471.  
  12472. Returns the number of blank-delimited words in string. 
  12473.  
  12474.  
  12475. ΓòÉΓòÉΓòÉ <hidden> Example ΓòÉΓòÉΓòÉ
  12476.  
  12477. Here are some examples: 
  12478.  
  12479.     WORDS('Now is the time')   -->  4
  12480.     WORDS(' ')                 -->  0
  12481.  
  12482.  
  12483. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12484.  
  12485. An alternative approach might involve having a handle to an attribute record. 
  12486. In such an approach one can still refer to an attribute record by the same 
  12487. handle even if the attribute record changes location.  On the other hand, 
  12488. implementation of this approach is often inefficient because it often includes 
  12489. generation of new handles when text containing attributes is copied so that a 
  12490. handle only refers to a single attribute record.
  12491.  
  12492.  
  12493. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12494.  
  12495. Note in this diagram, the attribute records are delimited by brackets. 
  12496. Throughout this document I will only use brackets to delimit attribute records. 
  12497. To avoid confusion, I will refrain from using brackets as a textual character 
  12498. in my examples.  The use of capital letters here between brackets is only used 
  12499. in this example as a means of referring to individual attribute records.  In 
  12500. other examples in this document, I might actually put words or numbers between 
  12501. the brackets if I want to denote some characteristic of an attribute record.
  12502.  
  12503.  
  12504. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12505.  
  12506. The last character of line in the example is the "h". There is an attribute 
  12507. record located immediately to the right of that character.  Because it is at 
  12508. the end of the line there is no character to the right of it.  This is 
  12509. acceptable because there is a virtual character to the right of it.  (In the 
  12510. case of line mode, there is a virtual space, and in the case of stream mode 
  12511. there is a virtual CR/LF or questionably a soft linebreak.)  The F attribute 
  12512. record in the example is a slightly different situation.  It is similar in that 
  12513. its positional notation is derived from the assumed existence of virtual spaces 
  12514. beyond the end of line.  It differs from the previous attribute record in that 
  12515. its location is invalid in stream mode and may not be effectively supported by 
  12516. some operations.
  12517.  
  12518.  
  12519. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12520.  
  12521. The exception to this is the '/' (search) command. When this command is 
  12522. invoked, E searches for the 'L' command definition. 
  12523.  
  12524.  
  12525. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12526.  
  12527. DEFC's and DEFPROC's cannot be redefined.  CONSTants can be redefined (to the 
  12528. same value) without penalty. 
  12529.  
  12530.  
  12531. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12532.  
  12533. The ET compiler does a simple substitution for every occurrence of a constant. 
  12534. If you define a long string constant and reference it ten times, its value is 
  12535. included ten times and takes up ten times its length in the resulting EX file. 
  12536. You might prefer to make a long string value a universal variable rather than a 
  12537. constant. 
  12538.  
  12539.  
  12540. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12541.  
  12542. By "event" we mean a procedure that is automatically invoked when a certain 
  12543. condition becomes true.  Previous examples are DEFINIT (executed when you start 
  12544. the editor or a new module) and DEFEXIT (executed when you quit the editor or a 
  12545. module).  In a sense keystrokes are also events, and in the past we sometimes 
  12546. called events "pseudo-keys". 
  12547.  
  12548.  
  12549. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12550.  
  12551. Understand that the word var is only a notational convenience. Do not include 
  12552. the word literally in your program. 
  12553.  
  12554.  
  12555. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12556.  
  12557. As described in the OS/2 Technical Reference Manual section 2.3.8.1 entitled 
  12558. Dynamic Linking. 
  12559.  
  12560.  
  12561. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12562.  
  12563. In the 'printable_char' cases, the keyname must be quoted in an E program. For 
  12564. example, the following example redefines the '~' key on the keyboard to toggle 
  12565. the cursor between the text and the command dialog box, and redefines some of 
  12566. the alphabetic keys to produce help information:      def '~' = command_toggle 
  12567. def 'a' - 'z' = 'help' However, the rest of the keynames need not be quoted, 
  12568. e.g. KEY c_end 
  12569.  
  12570.  
  12571. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12572.  
  12573. In all constructs which require a numeric_term, a numeric value is expected. 
  12574. The following can be substituted for a number: 
  12575.  
  12576. o the name of a variable representing a numeric value, or 
  12577. o a procedure call which returns a numeric value 
  12578.  
  12579.  
  12580. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12581.  
  12582. In all constructs which require a string_expression, a string value is 
  12583. expected. The following can be substituted for a string: 
  12584.  
  12585. o the name of a variable representing a string, or 
  12586. o a procedure call which returns a string 
  12587.  
  12588.  
  12589. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12590.  
  12591. In a constant_expression, any identifiers or designators must be the names of 
  12592. constants; no variables are permitted. 
  12593.  
  12594.  
  12595. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12596.  
  12597. There may not be spaces between the identifier and the '('. 
  12598.  
  12599.  
  12600. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12601.  
  12602. A macro-defined command is any command defined using a DEFC construct in the E 
  12603. macro code, whether it is part of the distributed macros written by the E 
  12604. developers or added later by a user. For an example of such a DEFC construct, 
  12605. see section Using EPM Commands in E Statements. 
  12606.  
  12607.  
  12608. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12609.  
  12610. Note: Two double quotes inside a double-quoted string will output one double 
  12611. quote character. For example, the string: "She said, ""Oh, that's 
  12612. fascinating."" " will yield the following output: She said, "Oh, that's 
  12613. fascinating." There can be no spaces between the two double quotes. 
  12614.  
  12615.  
  12616. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12617.  
  12618. Note: Two single quotes inside a single-quoted string will output one single 
  12619. quote character. For example, the string: 'I went to Jim Kennedy''s house' 
  12620. will yield the following output: I went to Jim Kennedy's house. There can be no 
  12621. spaces between the two single quotes. 
  12622.  
  12623.  
  12624. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12625.  
  12626. Any number to be interpreted or manipulated by the editor cannot exceed 32,767. 
  12627.  
  12628.  
  12629. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  12630.  
  12631. AF_ constants:   AF_CHAR     =  1  -- 'key' represents an ASCII value 
  12632. AF_VIRTUALKEY  =  2  -- 'key' is a VK_ constant   AF_SCANCODE   =  4  -- 'key' 
  12633. represents a keyboard scan code   AF_SHIFT    =  8  -- The Shift key must be 
  12634. pressed along with 'key'   AF_CONTROL   =  16  -- The Control key must be 
  12635. pressed along with 'key'   AF_ALT     =  32  -- The Alt key must be pressed 
  12636. along with 'key'   AF_LONEKEY   =  64  -- 'key' is a shift key, but is used by 
  12637. itself   AF_SYSCOMMAND  = 256  -- 'index' should be sent in a WM_SYSCOMMAND 
  12638. message   AF_HELP     = 512  -- 'index' should be sent in a WM_HELP message