Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   . . .
   Introduction to EEL
      Epsilon Extension Language Features
      EEL Tutorial
   Epsilon Extension Language
      . . .
      Constant Expressions
      Global Definitions
      Differences Between EEL And C
      Syntax Summary
   Primitives and EEL Subroutines
      Buffer Primitives
      Display Primitives
      File Primitives
      . . .
      Defining Language Modes
   . . .

Previous   Up    Next
Function Definitions  Epsilon Extension Language   Syntax Summary


Epsilon User's Manual and Reference > Epsilon Extension Language >

Differences Between EEL And C

  • Global variables may not be initialized with any expression involving pointers. This includes strings, which may only be used to directly initialize a declared array of characters. That is,

    char example[ ] = "A string.";

    is legal, while

    char *example = "A string.";

    is not.

  • There are no static variables or functions. All local variables vanish when the function returns, and all global objects have names that separately compiled files can refer to.

  • The C reserved word "extern" does not exist. In EEL, you may define variables multiple times with no problems, as long as they are declared to have the same type. The first definition read into Epsilon provides the initialization of the variable, and further initializations have no effect. However, if the variable is later declared with a different size, the size changes and the new initialization takes effect. To declare a function without defining it in a particular source file, see Function Definitions.

  • The C types "long", "enum", "void", "float", and "double" do not exist. Ints and shorts are always signed. Chars and bytes are always unsigned. There are no C bit fields. The C reserved words "long", "float", and "double" are not reserved in EEL.

  • EEL provides the basic data type spot, and understands color class expressions and declarations using the color_class and color_scheme keywords.

  • You may not cast between pointers and ints, except that function pointers may be cast to shorts, and vice versa. The constant zero may be cast to any pointer type. A pointer may be cast to a pointer of another type, with the exception of function pointers.

  • You can use the reserved word keytable to declare empty key tables, as in

    keytable reg_tab, cx_tab;

    Local key tables are not permitted.

  • The reserved word command is syntactically like a storage class. Use it to indicate that the function is normally called by the user, so command completion will work. The user can also call other functions (as long as they have no arguments) but the completion facility on command names ignores them.

  • After the head of any function definition with no arguments, you can use the reserved word on to give a binding. It is followed by the name of a key table already declared, and an index (constant int expression) in square brackets. There may be more than one (separated by commas). For example,

    command visit_file() on cx_tab[CTRL('V')]

  • You can use the reserved word buffer as a storage class for global variables. It declares a variable to have a different value for each buffer, plus a default value. As you switch between buffers, a reference to a buffer-specific variable will refer to a different value.

  • You can also use the reserved word window as a storage class for global variables. This declares the variable to have a different value for each window, plus a default value. As you switch between windows, a reference to a window-specific variable will refer to a different value.

  • The reserved words zeroed and user do not exist in C. See Global Definitions. The reserved word volatile does exist in ANSI C, but serves a different purpose in EEL. See Initialization.

  • The EEL statements save_var, save_spot, and on_exit do not exist in C. See Save_var Statements.

  • In each compile, an include file with a certain name is only read once, even if there are several #include directives that request it.



Previous   Up    Next
Function Definitions  Epsilon Extension Language   Syntax Summary


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.