What's
New?
See Also: Upgrading Issues, uCalc Language Builder
New or enhanced in
version 3.99
·
Improvements in this version are mainly related
to the underlying parser shared by uCalc products. {@End} is now properly tallied when used in a
pattern. {@If:}
can now be preceded by a pattern variable.
New or enhanced in
version 3.98
·
FIX: In the previous version, the 64-bit DLL process
remained in memory even after a 64-bit application using this DLL was
closed. This was fixed.
New or enhanced in
version 3.96
Most enhancements in this upgrade relate to uCalc Fast Math Parser only indirectly. For instance there were fixes in the UCase()
and LCase() functions in the uCalc
String Library, which can also be called from uCalc
Fast Math Parser. The uCalc String Library Range() function was fixed so that it
works better with calls to uCalc FMP through {@Eval} or {@Evaluate}.
The fix has to do with ensuring a common evaluation space for Range() in
FMP, String Library, and Transform, such that variables defined in Transform
are directly accessible in the Range() function.
New or enhanced in
version 3.95
·
NEW: Provisional 64-bit version is no longer
limited to being called by only one process at a time.
·
NEW: Provisional 64-bit version now supports
native callbacks (for user functions, error handling, output format, etc).
·
FIX: The provisional 64-bit version was broken
in v 3.9 and didn't work at all, and wasn't intended to be included in that zip
file.
·
FIX: If a construct passed to ucDefineSyntax is invalid, the error does not carry over to
the next call to ucDefineSyntax.
·
FIX: Pattern handling improvements etc., allow better coordination between uCalc
FMP, uCalc String Lib, and uCalc
Transform.
New or enhanced in
version 3.90
·
NEW: "Not" operator.
·
FIX: Ambiguity between ++ and --
increment/decrement ops and successive + and - ops.
·
FIX: Include files for VC++ w/ MFC and Delphi.
New or enhanced in
version 3.80
·
FIX: Memory corruption issues affecting .NET
compilers were resolved.
·
FIX: uCalc can now
return string values to programs compiled using VC++ .NET w/ VS 2012.
·
The 64-bit and 32-bit DLLs are now included in
the same zip file.
·
uCalc
FMP can parse numbers that end with a decimal point (Ex: 5. + 25. * 2).
·
Headers specifically targeting VC++ Native with
MFC and VC++ without MFC were added.
·
Headers for various compilers overall were
improved.
·
Numerous fixes and enhancements make all uCalc products of the latest generation parse and/or
execute faster, use memory more efficiently, and interact better with each
other. Parsing logic is more
consistent. Invalid, intricate, or
unusual patterns are less likely to cause a crash or freeze.
New or enhanced in
version 3.15
·
Incorrectly exported string routines were fixed.
·
Some missing demo programs were added.
·
ucSetOutput() was missing. Now it’s available.
New or enhanced in
version 3.0
·
A function can be redefined in such a way that
other functions that call it will be affected by the updated definition as well
(useful for dependent spreadsheet cells for instance).
·
The output format for numbers can be configured.
·
Operators can be defined with right to left
associativity.
·
The speed for Min() and
Max() was drastically improved. They are
now defined as functions instead of recursive syntax macros.
·
When a definition fails (such as for syntax
errors), the error handler is invoked (assuming you’ve defined one). In the previous version, definition errors
were aborted silently.
·
There is a very large number of parsing
improvements that are beyond the scope of the math parser.
·
Thread handling with ucThread() has improved.
·
FIX: Implicit multiplication has the same
precedence level as explicit multiplication.
·
FIX: Better parsing; better at resolving
potentially ambiguous expressions.
·
FIX: Invalid expressions are less likely to
cause the program to crash.
New or enhanced in version 2.96
- Better
documentation. The help file includes
examples for the various supported compilers, and more comprehensive
explanations. The source code in
the demo is interspersed with comments.
The Spreadsheet and Equation Solver examples are included in the
main zip file, instead of as separate downloads.
- Much
simpler method for native callbacks.
- Local variable construct (this is used in the
Equation Solver, and Summation examples).
- End-users
can also use ucDefine.
- Speed. Version 2.96 is faster than any previous
version. In some cases the
difference is dramatic.
- The
^ operator, and the Log and Sqr functions are
faster.
- ucParam,
ucParamStr, ucParamCount, ucReturn and ucReturnStr were
optimized for use with native callbacks.
Pointers are no longer necessary for achieving a faster speed than
non-native callbacks.
- Operations
involving an automatic conversion between Long
and Double are much faster.
- PowerBASIC users in particular will notice that ucEvaluate()
runs faster for them.
- ^,
Log, and Sqr were improved. If the left operand of ^ is a negative
number, and the right operand is a non-integer, or the argument of Log or Sqr is negative, then it raises an exception (or
returns NaN), instead of returning an incorrect
value. Also, an infix operator,
such as ^, no longer causes a problem if followed by a unary operator (for
instance 3 ^ - 2).
- The
last argument of IIF is optional.
- Version
2.96 is better at catching errors and exceptions overall.
- ucTrigMode,
which was present in 2.0 was restored.
It allows you to choose between radian, grad, or degree mode for
trigonometric routines.
- ucExprThread
is a new function that lets your callback know what thread the current
callback is being called from.
- ucRaiseError
lets your callback raise an error (based on the given error number
constant).
- ucRaiseErrorMessage allows your callback to
raise an error with a customized error message.
- ucReRaise
lets your error handler re-raise an exception, allowing your host program
to catch it with try / except (or the equivalent error handler for
your compiler).
- ucErrLocation
returns the location of an error in an expression.
- ucErrSymbol
(formerly ucGetSymbol) returns the name of the
offending symbol when an error occurs during parsing.
- The Error function lets you raise an
error from within your expression.
- SetVar, which
was already in the DLL, is now declared in the header / include file, and
explained in the help file. It lets
your expression set the value of a variable.
- ucSetVariableValue
sets the value of a variable using the variable's handle. This is a replacement for the ucSetValueDbl routine that was available for some
compilers.
- Arrays are supported.
- Both
DLLs now contain version information (before, only the main DLL did).
- Unicode for VC++.
- Miscellaneous
features beyond the scope of this help file (and which are subject to
change):
- ~Eval (which evaluates a sub-expression in place
during pre-parsing) now has sister routines ~Eval_1, which substitutes
the result of the evaluation, and moves on without passing over it a
second time, and ~Eval_P, which evaluates
during the parsing stage. Likewise
~Expand has a ~Expand_1 counterpart.
- Batch
evaluation (for faster speed).
- ucGetCodeBlock.
- End-user
routines: ucHandle(), ucRename()
- Partial
list of bug fixes:
- The
numeric pattern in the header / include file was fixed so that variable
names that start with an "e" and a number, such as
e123_somename, no longer cause a problem.
- The
leading 0 in a fractional number between 0 and 1 is optional again, as it
was in 2.0. For instance .5 is
accepted (as the equivalent of 0.5).
- Syntax
errors in ucDefine (and related routines, such
as ucDefineVariable, ucDefineFunction,
etc.) will no longer cause a crash.
- ByExpr no longer has to be the last argument when
present in a function definition.
- ByExpr now works with operators definitions as well.
- Defining
a something such as "f(x=-1) = ..." didn't work if there was no
space between the = sign and -. Fixed.
- FPU
exceptions are handled more consistently.
- AndAlso,
and OrElse were fixed.
New or enhanced in version 2.95
- Speed. Versions 2.9 and 2.91 were slower than
2.0 in some ways, so the product was temporarily renamed uCalc Free Math Parser and then uCalc
FMP. Version 2.95 is now faster
than ever, so the original uCalc Fast Math
Parser product name was reclaimed.
Optimizations were implemented for user-defined functions (and
operators), and for compilers that support Double precision so that
extraneous conversions to Extended precision are no longer performed. The speed bump in updating variable
values under VB.NET was also diminished.
- More
direct .NET support. A special .NET
DLL is included, which should work with any .NET compiler, and not just
VB.NET.
- Better
error handling; particularly for errors that occur elsewhere other than
the default thread, as well as when defining an item.
- Memory
leak for ucStrReturn, which affected some
compilers, is fixed.
New or enhanced in version 2.91: (minor upgrade)
- Documentation
was revised, licensing options were made less confusing, and include files
were cleaned up.
New or enhanced in version 2.9:
The improvements mentioned below are relevant mainly in the
context of moving from uCalc Fast Math Parser 2.0 to
version 2.9. More advanced features that
are also new can be found in the uCalc Language Builder, which is a superset of uCalc FMP, and available separately.
- The
IIF() function evaluates either the True argument or the False argument,
depending on the value of the Condition argument, but not both, unlike
version 2.0 which always evaluated both.
- You
can define callback functions similar to IIF()
such that arguments passed ByExpr (as opposed to
ByRef or ByVal) are
not evaluated ahead of time. This
was not possible in version 2.0.
- It is
no longer necessary to set up definition space boundaries ahead of
time. Memory is gradually allocated
as needed. You won't need ucReset (though you can release an entire thread using
ucReleaseItem), and you won't have to worry
about running out of definition space (assuming you don't intentionally,
or inadvertently devise a way to consume all your gigs of memory). And there is no maximum number of
arguments per function.
- FMP
2.0 only allowed you to define infix (binary) operators. Now you can also define prefix
and postfix operators as well.
See DemoDefs.Txt for examples.
- FMP
2.0 operator definitions didn't allow you to set individual precedence
levels for each operator, as you can do now. See DemoDefs.Txt for examples.
- Case
sensitivity can be turned on or off.
(It's off by default).
- User-friendly
form-based demos for PowerBASIC, Borland C++
Builder, VC++, and VB.NET are now included. (VB classic,
and Delphi already had form-based demos).
- Support
for VB.NET was added.
- Speed.
The new uCalc should be much faster, both in
terms of parsing speed, and in evaluation speed. The difference in speed may range from
barely noticeable to very dramatic, depending on what you are doing, how
you choose to implement things, and in some cases which compiler you are
using. By default, compilers that
have native support for 80-bit precision can benefit the most in numeric
calculations. Compilers that
support pointers can create callbacks that use uCalc's
NativeCall (an advanced Language Builder feature) for more
efficiency.
- You
can attach a uCalc
variable to the address of a variable defined in your source code. See the source code for the Plotting and
Sum examples in the demo files (excluding VB.NET).
- Specific
data types (Single, Double, Long, String, WideString,
LPCSTR, etc.) are supported, replacing generic numeric and string types.
- There
is no longer a problem with using ucEval or ucEvalStr in your callbacks.
- Function
overloading is supported.
- Function
bootstrapping is supported.
- Function
recursion is supported.
- More
function definition flexibility is supported.
- Multi-threading
is supported.
- Multi-statement
expressions are supported.
- Overall
syntax was simplified.
- The
FPU word of the host program and uCalc's FPU
word are insulated from each other.
- FPU
errors such as Overflow, Underflow, Division-by-0, etc., can be caught, or
masked.
- uCalc()
is a function that encapsulates all of uCalc's
functionality. This function can be
made available even to the end-user.