Lugaru's Epsilon
Editor 14.04

Epsilon User's Manual and Reference
   . . .
   Introduction to EEL
      Epsilon Extension Language Features
      EEL Tutorial
   Epsilon Extension Language
      . . .
      Lexical Rules
      Scope of Variables
      Data Types
         Simple Declarators
         Pointer Declarators
         . . .
         Type Names
      . . .
   Primitives and EEL Subroutines
      Buffer Primitives
      Display Primitives
      File Primitives
      . . .
      Defining Language Modes
   . . .

Previous   Up    Next
Scope of Variables  Epsilon Extension Language   Declarations

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

Data Types

EEL supports a rich set of data types. First there are the basic types:
These are 64 bit signed quantities. These correspond to integers.

These are 32 bit signed quantities. The value of an int32 ranges from -2,147,483,648 to 2,147,483,647.

These are like ints, except they are only 16 bits. Thus the value ranges from -32768 to 32767.

These are 16 bit unsigned quantities. They correspond to characters. For example, the buffer primitive curchar( ) returns an object of type char. The values range from 0 to 65535.

These are 8 bit unsigned quantities.

These are references to buffer positions. A spot can remember a buffer position in such a way that after inserting or deleting characters in the buffer, the spot will still be between the same two characters. Like pointers, spots can also hold the special value zero. See Spots.

Besides basic types, there is an infinite set of types derived from these. They are defined recursively as follows:

If t is some type, then pointer to t is also a type. Conceptually, this is the address of some object of type t. When you dereference an object of type pointer to t, the result is of type t.

If t is some type, then array of t is also a type.

If t1, ... , tn are types, then structure of t1, ... , tn is also a type. Conceptually, a structure is a sequence of objects, where the jth object is of type tj.

If t1, ... , tn are types, then union of t1, ... , tn is also a type. Conceptually, a union is an object that can be of any of type t1, ... , tn at different times.

If t is a type, then function returning t is also a type.

Any function has a type, which is the type of the value it returns. If the function returns no value, it is of int type, but it is illegal to attempt to use the function's value.

Regardless of its type, you may declare any function to be a command (using the command keyword) if it takes no parameters. Commands like named-command on Alt-x will then complete on its name, but there is no other difference between commands and subroutines (user-defined functions which are not commands). Functions that the user is expected to invoke directly (by pressing a key, for example) are generally commands, while functions that act as helpers to commands are generally subroutines. Nothing prevents an EEL function from calling a command directly, though, and the user can invoke any subroutine directly as well (providing that it takes no arguments). Though a command may not have arguments, it may return a value (which is ignored when the user directly invokes it).

While it's possible for one command to call another command, commands are usually written to be called in the context of Epsilon's main loop (see The Main Loop), not from other commands. New Epsilon commands should generally call EEL primitives and subroutines, not other commands, except in the case of a new command that simply adds some functionality to an existing single command.

Previous   Up    Next
Scope of Variables  Epsilon Extension Language   Declarations

Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.