eX version 0.4b User's Manual                         File eXMan02.txt
(C) Copyright 1995, 1996 William E, Wilgus III.   All rights reserved.


Changes from Previous Versions

An implied addition has been added to the `standard' aggregation's
left parens beginning delimiter.  This implied addition is precluded
if an aggregation accumulator hold command is given. 

`Operated addresses' have been added.

Many new eX words have been added an a few have been changed. 
Regretably, a history wasn't kept.


Overview   
  
Hopefully, the material presented in the preface to this manual is
illuminating and not presented elsewhere.  (Duplicity intended.)
I never read prefaces either. 


Why, What & How

A couple of wordprocessors, a typesetting system, a lowly text editor
never used; a spreadsheet (I can't stand any of them), a database
manager, BASIC (interpreter and compiler), three C/C++ compilers, an
assembler, PASCAL (easier to learn than C); and various and sundry
other stuff (most of it junk) at my command on the world's smartest
machine---a computer---and I still kept a five function calculator
handy because it got a lot of use.  My several thousand dollar
computer system was being blown away for practicality in math by a
$9.95 solar powered calculator!  More generally, the amount of work
involved in getting the 'puter to do any non-standard task---no matter
how small---made the task seem not worth the bother.  I decided I
needed eX. 

Of course, it has taken me at least a couple of hundred thousand hours
to get eX to this point, but I now have a tool for which I can create
and de-bug programs for small tasks in a few minutes versus the hour
or so in any other language.  And there are some things I can program
and de-bug in eX within that same few minutes that would take several
hours in any other language; and in some languages, not at
all---because of the lack of necessary facilities.  And more
satisfying yet, I no longer worry about where the calculator is! 

eX, like a computer, is `something that performs one or more
instructions.'  It discards the premise that a computer language's
design should attempt to prevent programmer errors and therefore
eliminates virtually all of the restrictions compelled by nearly all
languages except assembly.  As demonstrated in the preface, its
programs can be written to look like those of a high-level language or
those of a low-level language.  When written in the latter manner, it
becomes apparent that eX statements, functions and operators are
merely `tasks' to be performed with values recieved; and tasks can be
`stacked' to utilize the value(s) provided to another task. 

Within narrow limits, eX is also OO (object-oriented). 

(Oh?)

But you don't have to write any `methods', they're built in.

(Ooh!) 

Many of eX's tasks can process numeric or string data; and since it is
often possible to provide a value that has both a numeric component
and a string component, they can process both simultaneously. 

(Um...)

There are also ways to control which process(es) these tasks perform
in such circumstances.  Tasks that employ a single data type may be
inter-mixed in the task `stack', of course.  As it also possible to
provide a task with a value that has no component, many eX tasks are
capable of doing nothing as well.

(Uh...)

Finally, all of eX's binary operators can perform comparable numeric
by numeric, string by string, and string by numeric operations.

(... Huh?)

eX's OO limit is that it doesn't provide user-defined data types.

(Aw...)  

If you're writing a program that `cries out' for them, you've got the
wrong language anyway.  eX understands `down and dirty' a lot better
than `elegant'.

(Ah!)



eX is based upon a normally transparent array of accumulators, and
individual array elements function as as the left-hand operand data
entity for binary (two-termed) operations exemplified by addition. 
The right-hand operand is provided by a value producing component of
the language.  The result of the operation supercedes the
accumulator's prior value and is available for use in further pending 
operations.  The accumulators are addressable and may be used as data
entities. 

Functions, of course, process the values they are provided with and in
turn provide the result of the process to any preceding task that is
pending.  In keeping with the fact that an operation can be made to do
nothing---but of dissimilar nature---the value(s) provided by a
language component do not need to be used.  Statements also perform a
task with a provided value, and assignment and input/output statements
can also provide that value to any preceding pending operation.  In
fact, in eX many tasks performed by what are referred to as statements
are actually performed by functions.  Therefore, there is usually no
significance to a portion of an eX program being a statement, and
statements may appear within expressions as a component of that
expression.  If you've already deduced that a statement may appear
within an expression yet remain inert to that expression, you're
getting to know and understand eX! 

I'm aware that you're aware that a word should not be over-used, but I
hope you're aware that I'm aware of it.  The over-use of the word
`provide' in the preceding two paragraphs was intentional, as it is
the best way to describe how a task receives its value: it's provided.

I'll take some liberties and submit the following: 

     A task `looks' for a value, but never `finds' one.  Instead, a
     value looks to see if it is `needed' and if so, provides itself
     (or its mutations) as long as it is. 

If you haven't already guessed, eX is virtually context-free and any 
component of the language that can provide a value always does. 



Major Features
  
Modes of Operation
     In addition to the traditional program execution mode, an
     inter-active execution mode is provided.  The entire eX language
     is available in both modes, including the data creation/editing
     facility.  A simple command may be used in a program to switch to
     the inter-active mode, and program execution may be resumed when
     the inter-active mode is no longer desired.  The program
     execution mode may be entered from the inter-active mode by
     issuing a command to execute a program that is either in a disk
     file or memory resident---perhaps created through an inter-active
     command.  eX enters either the inter-active or program execution
     mode according to the arguments supplied in the eX invocation
     command. 

Syntax
     is virtually un-resticted, allowing an economy of programming. 

Programs as Data
     The concept of programs as data allows programs to create new
     programs or modify existing programs during or prior to
     execution.  Programs may also be created or modified
     inter-actively.  

Operators 
     In addition to the usual numeric by numeric operations, operators
     can perform comparable string (alpha-numeric) by string and
     string by numeric operations.  

Addressing Methods
     Indirect, as well as direct methods for addressing data and
     specifying execution directive objects may be employed; and
     implied, as well as explicit file operations are permitted. 

System Facilities 
     The rich system facilities allow eX to be used as a very capable
     Command or Job Control Language in the program execution mode, or
     an operating environment in the inter-active execution mode.  

Execution Monitoring and De-bugging
     Complete facilities are provided, and the process commands may be
     given on the eX invocation command line, within programs, or
     inter-actively.  



Description

The name eX is derived from the word `expression' and it is so
capitalized to indicate it is pronounced as the letter X and that
expressions written in eX are often written and perform slightly    
different than expressions in most computer languages.  (Please
re-write that awkward sentence!)  I'm now aware that the name
conflicts with Berkley's EX, a text editor for its version of UNIX, so
at some point I'll change the name.  Perhaps `wY' is a logICAL
successor?
 
eX is an inter-active expression interpreter for performing procedural
system, numeric, and/or alpha-numeric data tasks.  It was designed to
minimize programming effort and provide capabilities not available in
most other programming languages. 

The language features a rich set of numeric and alpha-numeric
operators.  eX is unusual in that some of its language components can
or do return both a numeric value and an alpha-numeric value;
therefore all of its operators can perform the usual numeric by
numeric operation and a string by string counterpart simultaneously. 
All of the binary operators can also be made to perform comparable
string by numeric operations.  
 
eX programs are written in ASCII code and may be stored in ordinary
text files.  Termed `macros', they may consist of one or more of the
following eX language component types: 

    eX words                          statements
    operators                         program branching statements
    terms (data entities / functions) conditional test structures 
    functions                         conditional execution structures
    sub-programs                      iteration structures
    eXpressions                       eX commands
    data type filters

which are conceptually identical to their counterparts in typical
computer languages.  

Macros have no required format and no punctuation other than argument 
separators.  A macro may begin with any type of eX language component
and end with any type of eX language component, regardless of which
type of component it began with.  Further, macros may consist of a
single language component (even a single ASCII space), allowing
sub-programming to be taken to ridiculous extremes. 



Version Information

Version 0.4b is a further development of the prototype interpreter and
language.


System Requirements

Computer            IBM-PC compatable (8088/86 or subsequent).        
                    However, given eX's lack of speed, anything less
                    than a 25MHz 80286 will DEFINITELY prove
                    inadaquate.
Memory              640 Kb
Video Display       80 column x 25 line text mode
Operating System    MS-DOS/PC-DOS 2.10 or subsequent.
                    Optionally as an MS-DOS application under Windows.
Other Software      EDIT.COM (Supplied with MS-DOS 4 & subsequent)
                    It is used by eX's `browse' facility to edit macros.

A numeric data co-processor is optional and will be utilized if
installed.  A printer is also optional.  eX currently supports only
LPT1 (parallel printer).  The communications ports (COM1--COMn) and
extended memory (under MS-DOS) are not currently supported. However,
The following devices may be `opened' for file operations:

    Device                      Restrictions
COM1: -- COMn:    EOF, FPOS, LOF, SEEK have different meanings
CONS:             No input or append mode, EOF, FPOS, LOF, SEEK use
KYBD:             No input or append mode, EOF, FPOS, LOF, SEEK use
LPT1: -- LPTn:    No input or append mode, EOF, FPOS, LOF, SEEK use
SCRN:             No input or append mode, EOF, FPOS, LOF, SEEK use


eX will run as an MS-DOS application (or non-Windows application)
without any known restrictions under Windows 3.11, and in 386 enhanced
mode can run in a window.  It will also run under MS-DOS from Windows'
`MS-DOS Prompt'.  I assume it WILL NOT run under Windows NT and 95, but 
neither has been tried.  

eX's execution speed is considerably less an obstacle when employed
for larger tasks while running in a window, as it can be made to run
in the `background'.  The phrase `without any known restriction' above
includes running other MS-DOS applications from eX via its os command,
whether those applications have .PIF files or not. 


Installation

eX is not copy-protected.  To install it simply copy the file  

                        EX.EXE

to the disk drive and directory you wish to execute it from.  eX uses 
MS-DOS's EDIT.COM and QBASIC.EXE to edit macros in its browse mode. 
It will need to be able to find them either in the logged (current) 
directory or via the environment variable PATH if you wish to edit 
macros from the browse mode.

Be sure to check the disk for additional files that may have been
included for distribution subsequent to the printing of this manual. 
In particular, look for a text file named README, which will contain
any information updates.  It would be prudent to make a `back-up' copy
of the files on the eX distribution disk on seperate removable media
(floppy disk or tape) for safe keeping.  

I have eX in the directory DOS, which was already in the path 
environment.  You might want to create a sub-directory for eX
programs, perhaps named EXPROGS. 

I used the default .PIF (Program Information File) and named the icon
`eX Interpreter' when I set it up in Windows' Applications Group, but
since I'm not much on windows, perhaps there's a better way... or possibly
didn't do what I think I did?



Typographic Conventions


Some eX language words are written in MixedCase simply because they
are somewhat more easily read.

The symbols << >> are used to enclose optional language elements. 

eev is an abbreviation for `expression evaluation value' and the 
following are used to represent the data type(s) returned by a term or

eXpression:  

          eev# represents a numeric value, 
          eev$ represents a string value,  
          eev  represents a numeric and/or a string value. 

Where the purpose of the value returned by a term or eXpression  
adds understanding of the topic under discussion, English
Language-like phrases may be used similarly, as exemplified by

                         FileSpecification$.



Testing the Waters

If you'd like to get your toe wet now, rather than later, enter eX by 
typing the operating system command EX.  eX will enter the
inter-active mode and be ready for any command you wish to give. 
If you wish to save your experience in a file for posterity, type
Function Key 1, `Captur' to open a capture file, to which eX will 
write everything you type.  How about typing "eXProg1" in response
to the prompt "Capture to ->"? 

We'll start out with an example similar to the one given in the
preface, and do it in the conventional manner first. 
Carefully please, type 

                         $alpha := "Hello!"

and then press the ENTER or RETURN key.  You won't see anything
happen, of course.  Next, type in 

                             show $alpha

and then press the ENTER or RETURN key. 

Now we'll do it the easier way, using a new variable and value. 
Type in 

                    show $beta := "Hello again!"

and press the ENTER or RETURN key.  Just to prove the assignment was
made, type in

                             show $beta

and press the RETURN or ENTER key.  If you'd like to confirm that
$alpha still exists, type in 

                             show $alpha

and press the RETURN or ENTER key.  You might also like to `BROWSE'
the variables via the Browse function key followed by the `$' function
key menu selection. 

If you've been capturing, you can close the capture file by typing 
Function Key 1.  If you'd like to run the program again, simply type

                           goto "eXProg1"

and press the RETURN or ENTER key.  (eX automatically loads the
program for you.)  If you'd like to watch it run via the monitor, 
type 

                          /m goto "eXProg1"

and press the RETURN or ENTER key. 

I apologize for asking you to be careful earlier, but you'll find out
that eX isn't real great at recovering from errors yet, and I wanted
you to avoid experiencing any aggrevation as a result of your bravery.



Beware!

The worst thing that can happen as one learns a subject is to be
presented with incorrect material.  As with any prototype, there may
be discrepancies between how the language/interpreter works and how
the manual says it does.  While the manual has been proof-read several
times, errers may still exist. 
