
                        =============================
                        Expression v1.2 Documentation
                        =============================


   Thank you for trying Expression v1.2.

   It's a useful program to visualize numeric expressions to 2D-graphs.

   Also it's a demonstration program, to show the possiblities of 
   ExEngine v3.2 - the underlying code-module that handles variables 
   and expressions, generates P-code out of them and evaluates / executes
   it - all at runtime.

   If you are interested in having ExEngine v3.2 read the section 
   named "ExEngine".
   
   It's available as DLL you can use from nearly any programming-
   lanuage for windows, including C/C++, Basic and so on - also 
   available for other platforms or as source-code.

   Please, note also the announcement of "VPEngine" The Virtual Print 
   Engine at the end of this manual.
   






   ==========
   I. Preface
   ==========
   Expression is an easy-to-use program which can be understood and 
   handled very fast. It's optimal for schools and schoolars, nothing 
   needs to be explained for very long.

   This program is freeware. Give it to your friends, collegues and 
   anybody elso who could be interested in it. You need not to register 
   it, but if you find it useful und use it regularly, please send an
   obulus of $10 (or so) to the given address.
   Best, if you use the registration form "feedback.txt" (just enter
   "print feedback.txt" at the DOS prompt), or e-mail me on CompuServe.

   If there are enough people interested in this program, the work
   on it will continue.

   Possible updates are:
   -axis-labeling
   -entry of coordinate-pairs to draw a graph along them
   -automatic differentiation of expressions (building f'(x))
   -polar and logarithmic scaling
   -different negative and positive axis-ranges
   -printing

   You must distribute this program unchanged and intact, all files have 
   to be shipped with it, also this "readme.txt".
   Freeware/Shareware vendors may distribute the program freely provided
   they contact me first and charge less than $5 for disks/shipping/etc.
   and not for the program itself.


   My address:

   T. Radde						CompuServe: 100 430, 34 27
   Grefrather Weg 96
   41464 Neuss					Internet:   100430.3427.compuserve.com
   Germany









   ================
   II. Installation
   ================
   
   Files in this archive:
   ----------------------
   README.TXT     -- this file
   FEEDBACK.TXT   -- feedback form (ASCII text)
   EXPRESS.EXE    -- program file
   EXPRESS.INI    -- ini-file (remains in home-directory of express)
   DEFAULT.EXP    -- contains no definitions
   TRIGONOM.EXP   -- demonstration definitions (sine & cosine)
   ANALYSIS.EXP   -- demonstration definitions (f(x), f'(x) and f"(x))

    1. Create a directory on your hard drive - e.g. C:\express
       [you can use a different directory or share an existing one if you 
       want]
    2. Copy all of the files in this archive file into that directory (see
       above for a complete list).
    3. Start up Windows if you weren't already using the File Manager to 
       perform the steps above.
    4. Open the group in Program Manager you want to put Expression in.
       Select "New..." from the "File" menu in Program Manager.
    5. Select "Program Item" in the dialog box.
    6. In the Description box, type "Expression".
    7. Click the Browse... button and use the dialog box to navigate to
       the directory Expression's files are in and select EXPRESS.EXE.
    8. Select "OK". Expression should now be installed. Double-
       click on its icon to run it.







   =====================
   III. Using Expression
   =====================
   
   Expression is very easy to understand.

   The program is divided into two main parts:
   1) Graph drawing (Menu: "Actions / Draw Graph")
   2) Computing Expressions (Menu: "Actions / Expressions")

   In both dialogs you can define expressions and other parameters.
   All these definitions can be saved using the Menu: "File / Save" and 
   loaded using the Menu: "File / Open".

   Note: The "save"-function also saves the current layout - i.e. the 
   positions and sizes of the windows.
   But the last saved layout is always used for ALL definition files.

   On startup Expression automatically loads the last used definition 
   file.

   The rest of the program is explaining itself.

   -Just keep in mind, that changes only become valid, after you 
   pushed the "Insert"- or "Change"- or "Set"-button...

   -Note the "y-range" button in the "Draw Graph" dialog, which 
   calculates for all drawn functions over the specified x-range the 
   maximum y-range, to make all graphs fit into the coordinate system.

   -Also note, that you can enter real EXPRESSIONS in both, the x-unit 
   and the y-unit fields - you have two predefined variables:
   "xr" and "yr", which means the value of "x-range" and the value of
   "y-range".
   This gives you the following advantage:
   Imagine, you want to draw the sine-function over PI (=3.1415...). So 
   you enter 3.1415 in the x-range-field. If you want to have the x-units 
   drawn on PI/4 you would need to calculate these values.
   Why? - We have got an expression-evaluator build in!
   So just enter in the x-unit-field: "xr / 4"
   That's all. - Look at the "trigonom.exp" - example definition.







   ===========================
   IV. Description of ExEngine
   ===========================

   ExEngine (= Expression Engine) is the heart of Expression. In 
   fact Expression was first only planned as a pure demo for this 
   engine, before it changed to be a separate project.

   ExEngine for windows is a DLL, which can be used from any 
   programming language that supports the DLL-calling conventions. 
   (like C/C++, Pascal, Basic, SQLWindows and so on)
   It gives you the ability to define and modify variables and to use 
   them within your self-defined functions at runtime. Using it from 
   compiler-languages, such as C, you are additionally able to EXPORT 
   THE ADDRESSES OF VARIABLES AND FUNCTIONS (!!!) FROM 
   WITHIN YOUR CODE TO THE DLL, so that ExEngine can directly 
   access them. This provides you nearly unlimited possibilities. 
   Since ExEngine generates pseudo-code, computations are done 
   very fast. (All computations are done with the "double"-datatype -
   this is not the best for fast drawing graphs, but for calculations.)
   
   In this version ExEngine is linked statically to Express, so you
   won't find the DLL.
   


   Examples on using ExEngine from C:
   ----------------------------------
   double x;	// x is global

   void func()
   {
      double result;

      ExpBindVar(hExp, "x", &x);	// exports the variable's address to engine
      if (ExpGetErr(hExp))
         handle_error();	   // perhaps the variable "x" is already defined ?
                  			   // (lack of memory problems are handled also)

      result = ExpParseAndEval(hExp, "sin(x * 3) + sin(x)");	// directly compiles and evaluates
      if (ExpGetErr(hExp))
         handle_error();      // perhaps division by zero or something else...
      printf("result is %g", result);
      ExpRemoveVar(hExp, "x");
   }




   void func2()
   {
      long 		pcode_handle;
      double 	result;

      ExpDefineVar(hExp, "x", 3.14);	// creates variable within the engine, initial value is 3.14
      if (ExpGetErr(hExp))
         handle_error();	      // perhaps the variable ,x" is already defined ?
                  			      // (lack of memory problems are handled also)

      pcode_handle = ExpParseAndStore(hExp, "sin(x * 3) + sin(x)");	// just compiles - the storage of the pcode is managed by the engine
      if (ExpGetErr(hExp))
         handle_error();	      // try possible error-conditions with the "Expression Dialog"
                  			      // all error messages are directly generated by the engine!

      result = ExpEval(hExp, pcode_handle);     // execute the pcode - all current variable values are used
      if (ExpGetErr(hExp))
         handle_error();	      // perhaps division by zero or something else...
      printf("for x=%lg the result is %lg", ExpGetVar(hExp, "x"), result);

      ExpSetVar(hExp, "x", 1.57);	   			// sets variable x to value 1.57
      result = ExpEval(hExp, pcode_handle);     // execute the pcode - all current variable values are used
      if (ExpGetErr(hExp))
         handle_error();	      	// perhaps division by zero or something else...
      printf("for x=%lg the result is %lg", ExpGetVar(hExp, "x"), result);
      ExpRemoveVar(hExp, "x");		// remove variable definition from engine
   }



   The number of variables (exported or created) and the number of
   stored expressions is only limited by available memory.
   
   The engine is available as an evaluation - or "home" - version, i.e. 
   you may use it for a lifetime, but you must not give away the engine 
   to other persons.
   The evaluation version costs $50.
   If you decide to develop software with it, that you want to distribute, 
   you can get the licensed version for $200 ($150 if you bought the 
   evaluation-version before). This allows you to distribute "ExEngine" 
   with your applications completely license-free. But you must not 
   include any documentation or source-code that gives other persons
   the ability to use "ExEngine" from their own applications. If you have 
   such needs - contact me for special conditions.
   Also contact me for special conditions if you want to buy the C++ 
   source-code.
   Both, the evaluation- and the licensed-versions are shipped with full 
   documentation on disk and the source-code of "Expression" as an example.

   So far the kernel of "ExEngine" has been tested on 68K CPU based 
   machines (originally developed on 68K platform and unchanged 
   since then), on SCO-UNIX, OS/2, DOS and Windows. I think this is 
   proving the quality of the source-code.
   Since I have just begun to ready "ExEngine" for the market - i.e. 
   implementing a complete new and consistent call-interface - there 
   are currently only versions for DOS and Windows available, the 
   OS/2 version will be released in the first quarter of 1995.
   Other platforms will follow upon requests.







   =====================================================
   V. Coming soon: "VPEngine" - The Virtual Print Engine
   =====================================================
   
   Windows has made printing for programmers easier.
   VPEngine makes it really simple. - Create most complex documents 
   by programming them in an really easy way.
   Open as many virtual documents as you want.
   Use colors, lines, circles, frames, boxes, bitmaps, charts, and
   and and - for sure - text.
   Give all drawing coordinates in 1/10 mm or 1/1000 inch.
   Use all text-formatting features (left, right, centered, justified),
   underline single words, make them bold and so on.
   Create table- and sub-table-templates on-the-fly (this means while
   printing is in progress) to fill them with data.
   Print 100 virtual pages and move virtually to the first page to put in 
   some new data or to remove or just MOVE objects on the page (or to 
   other pages), change objects in size or it's contents or any other 
   attributes. (Everything you draw is in the world of VPE an Object.)
   Don't care about the printer - it's resolution or printing-offset (this 
   is the offset on the page the printer cannot print on) - your document 
   will look on every printer as much the same as technical possible.
   Don't care about previews and printing-dialogs - VPEngine does it 
   for you.
   Show the user a preview, let him make choices in your program, 
   then rework the report while letting the preview open (or hide it). 
   If you leave it open let the user watch the printing data change while 
   your program is working on it. This gives you the possibility of 
   INTERACTIVE printing.
   Let the user zoom scale-free through the preview since it's true 
   WYSIWYG-Vector-Graphics!
   In fact VPEngine renders all objects in a virtual 2540 x 2540 dpi 
   resolution and then transforms it to the specified device, be it the 
   screen, a printer, a fax or whatsoever.
   This gives best possible WYSIWYG abilities.
   Using special, optimized algorithms (since 1993 under development), 
   VPEngine is really FAST!


   This is OPTIMAL for filling pre-printed forms with data, it's also 
   optimal for such complex reports where a normal generator fails or 
   needs 10 times more work to implement.
   Use it in the same way like Expression from any programming language 
   that supports the DLL-calling conventions. (like C/C++, Pascal, Basic, 
   SQLWindows and so on)
   VPEngine is database independet since you feed it with the 
   needed data in such a simple way, you don't believe.
   VPEngine will be fair in price and license free.

   The Virtual Print Engine for Windows will be released in spring 1995.
   
