-----------------------------------------------------------------
EXPR32.dll v3.2     32-bit version
Copyright, June 1996, Minxiu Chen, All Rights Reserved
----------------------------------------------------------------
===========
The program
===========
This is a dll for win32, can be used with 32-bit of Visual Basic.
EXPR32.dll  parse the text inputed by the user to
see if it is a numerical expression.  If so,  it do infix arithmetic 
expression parsing. It also suuports variable name substitution and 
some string manipulation functions.

The source code is written in C. It use so called "recursive descent" 
technique. 

It supports operators:
 +,  -,  *,  /, %,  ^  

and functions: 
sin,  cos, tan, ctg or ctn, asin,  acos, atg, ln, lg or log10,  
exp, abs, sqrt, sqrt3, fix, rand or rnd.

and constants:
pi or Pi, e

All these functions are self-explanatory, 
	sqrt3(8) --> 2
	rand(10) --> a random value between 0 and 10
	11%4 --> 3
	15.2%4.2 --> 2.6
	230 could be written as 2.3E2
	3^3 -->27
	(123 + sin(pi/2)) * 4^5* ln(exp(56))%11->3
	a=2, b=1.5*a, a^b --> 8

'EXPR32.dll version 3'  support variable name substitution. variable must start
with alphebet.  all varibles that have not been assigned any values are
considered as zeros. It supports following string manipulation functions:
	lcase(string)		convert a string to low case
	ucase(string)		convert a string to upper case
	cat(string1,string2)	returns concatenated string
	rtrim(string, num)	returns rightmost num characters of a string
	ltrim(string, num)	returns leftmost num characters of a string
	len(string)		find length of a string
	string(string,num)	returns a string  whose num characters are 
				all the first character of a string
 
	
You may try run expr1.exe or expr2.txt, type an expression to the box then 
press either 'test dll file' button:

    expression 		--> 	value
	a=123 		--> 	123
	b=a*0.4		--> 	49.2
	c= 2*a +sin(b) 	-->	245.125
	ln(a)+ln(c) 	--> 	10.31395
	a=123,b=4,c=5,d=56,e=11,a+sin(pi/2) * b^c * ln(exp(d))%e-->3
	abcde=23	-->	23
	cat(lcase(ABc),rtrim(dee,2))--> 23

A demo VB code  are also included. If the user don't have
vbrun400.dll in his/her window/system directory, he/she should download
vbrun400.dll from SimTel, CICA or other sites and put in same directory
as expr?.exe or search path to run the expr?.exe.

The expression in expr2.exe :
	"aaaaee=12, cat(string(a,4),ltrim(string(e,6),2))"
	first define a variable aaaaee, then evaluate the value of:
	"cat(string(a,4),ltrim(string(e,6),2))".
	string(a,4)= aaaa , string(e,6)= eeeeee  and ltrim( eeeeee )= ee 
	cat( aaaa ,  ee ) = aaaaee , 2 * aaaaee= 24 

Functions provided by EXPR32.dll:

double  Expres(LPCTSTR *S)
short  Chkexpr(LPCTSTR *S)

The declare statement for VB:
Declare Function Chkexpr Lib "EXPR32.dll" Alias "ChkexprA" (ByVal S As String) As Integer
Declare Function Expres Lib "EXPR32.dll" Alias "ExpresA" (ByVal S As String) As Double

unregistered version only support 4 variable name substitutions.
After using 4 variables if you want to use other variables, you have to 
unload the dll file or restart window.
  

============
Registration                                                            	                               Registration
============

The program EXPR32.dll is distributed as a shareware program.  You have 
the right to test this program for 10 days. You are allowed to copy this 
unregistered package  and give it to any other person, as long as it 
is not modified in any way. 

After the trial period, If you find it useful and want to keep using it,
You are obliged to register your copy. Unregistered version only support 
4 variable name substitutions, registered version do not have such limit.
When updated, the registered user of EXPVBX  may get $10 discount.

This software may NOT be used for commercial purpose without registration. 
 

==========
Disclaimer
==========

The program has been tested to keep it as bug-free.  But I still 
declare that it is supplied "As is"  without warranty of any kind. 
You use it at your own risk.   I accept no responsibility for
any damage or loss, physical, financial, or otherwise, that may
result from the use.

If these terms are not acceptable to you, then you have NO license 
to use or test EXPR32.dll. You should IMMEDIATELY DELETE it from
your disks.

