|
|||||||||
|
|||||||||
What's new |
The following features have been added:
define input function foo as output "some stuff%n" output " more stuff%n"
vfsChangeOwner
and vfsChangePermissions
The following features have been added:
The following features have been added:
OmniMark Studio now does the following
For further information, see the OmniMark Studio Windows help file.
The following features have been added:
OmniMark Studio now does the following
The following features have been added:
OmniMark Studio now does the following
The following features are new in version 6.0:
For years, OmniMark programmers have been writing and using code like
the following:
((lookahead not <terminating-pattern>) any)* <terminating-pattern>
Now you can write:
any** <terminating-pattern>
See pattern matching for details.
The ++ occurrence indicator has also been added. It is identical in function and form to the **
occurrence indicator except that it is required to match one or more characters from the given character set before the terminating pattern.
In other words, if the terminating pattern is the next sequence in the input, ++
will fail whereas **
would have succeeded.
OmniMark now has a repeat for
loop. You can write loops that repeat for each allowed value of a control variable:
repeat for integer i from 12 to 144 by 6 output "d" % i || "%n" again
A new looping construct, repeat to
has been added. It allows you to repeat a loop a specified number of times.
You can now capture the pattern matched in a lookahead
to a pattern variable:
find lookahead any => next-char output "The next character in the input is '" || next-char || "'.%n"
You can allow a pattern to match zero characters, even where OmniMark's restriction on two consecutive zero-length pattern matches in the same scan would normally prevent it, by prefixing the pattern with null
.
The keyword instance
is now optional when you are parsing well-formed XML using do xml-parse
.
For example, the following routine will parse well-formed XML:
do xml-parse scan file my-instance output "%c" done
If you are parsing XML using a DTD, however, you need to specify "do xml-parse document".
Item indexing of a shelf has been replaced by '[ numeric-expression ]'
For example:
set lookuptable[5] to "epsilon"
Key indexing of a shelf has been replaced by '{ string-expression }'
For example:
set lookuptable{"epsilon"} to 5
These new forms are supported in the following contexts:
Positional patterns are now allowed in more contexts.
A \ inside character class means "except"
The symbols |=
and =|
are synonyms for value-start
and value-end
.
The new take
and drop
operators enhance OmniMark's string manipulation.
You can now specify that the stream #main-output
has domain-free
.
The identity operator (~
)is used to distinguish shelf expression from pattern expressions within a pattern.
OmniMark has been adding overloaded operators over the past few releases. This work is not yet finished. However, new libraries, notably the Binary Coded Decimal library, are taking advantage of the work done to date.
As part of this ongoing work, the latest visible functionality is the addition of dynamic initialization of variables. Dynamic initializers can be applied to both global
and local
variables.
Underscores are now allowed in numbers, including integers and BCD numbers, but not in floating point numbers.
For example, you can specify an integer with underscores:
process local integer x set x to 1_000_000 output "Number is %d(x)" ; The output will be "Number is 1000000"
You can also specify a BCD number with underscores:
include "ombcd.xin" process local bcd y set y to 1_000_000 output "bcd Number is " || "<,NNZ.ZZ>" % y ; The output will be "BCD Number is 1,000,000.00"
When a literal of an externally-defined numeric type is used, it no longer requires explicit type casting where the intended type of the numeric literal is clear.
You can now add assert
statements to your OmniMark programs.
#args
is now a synonym for #command-line-names
log-message
is now part of the language and is no longer part of the builtins library. You no longer need to include "builtins.xin" to use log-message
.
The global stream shelf, UTIL_Env, has been added to the utilities library. This shelf is populated with all of the environment variables. Using this shelf makes it easy to find HTTP parameter variables.
New versions of the BCD and floating point libraries have been released, and the operations allowed in both libraries are largely identical.
Both the floating point and the BCD libraries now use these arithmetic operators and the comparison operators in the same way:
The absolute value function, abs, has also been extended to the floating point library.
The new power operator, **, has been added to both the floating point library and the BCD library.
The floating point library now implements the same rounding operations as the BCD library:
Both the floating point library and the BCD library now support the same exponential functions:
Both libraries define the constant e.
The format operator, %
, has been extended to the floating
point library so that floating point numbers can be formatted
in the same way as BCD numbers.
The format operator supports both template formatting and the "d" format command. The "d" format modifiers ("u", "l", "f", and "k") are now supported for floating point numbers.
The "d" format command supports the new "e" format modifier for both floating point and BCD numbers. This modifier formats a number in exponential notation.
The OmniMark trigonometry library is a collection of trigonometric functions based on the C math library. It serves as a "wrapper" around a particular math library. You can use the functions in this library to write OmniMark applications that can perform double-precision floating point arithmetic.
The functions in this library are the following:
There is a new Bessel function library, ombessel, that includes the Bessel functions j0, j1, jn, y0, y1 and yn.
item and key in all contexts where they serve as an indexer. Use [...] and {...} respectively instead.
@ and ^ are deprecated in all contexts.
The following functions and constants are now deprecated (but still supported for backwards compatibility): FP_add, FP_sub, FP_mul, FP_div, FP_mod, FP_eq, FP_le, FP_ge, FP_lt, FP_gt, FP_ne, FP_pow, FP_ceil, FP_floor, FP_nearest, FP_trunc, FP_exp, FP_log, FP_log10, FP_sqrt, FP_s, FP_d, FP_v, FP_e, FP_pi, FP_cos, FP_sin, FP_tan, FP_acos, FP_asin, FP_atan, FP_atan2, FP_cosh, FP_sinh, FP_tanh, FP_hypot.
The omvfile library has been removed from the product. Use omvfs instead.
The omfsys library has been deprecated. Use omvfs instead.
External libraries compiled for previous versions of OmniMark are not compatible with OmniMark 6. This includes both libraries supplied by OmniMark Technologies and third party libraries. Older libraries must be recompiled with the OmniMark 6 external function developers library before they can be used with OmniMark 6.
With the introduction of dynamic initializers, OmniMark no longer supports multiple global variable definitions. In earlier versions the following was legal:
global integer message-count global integer message-count
Now this is not legal code. One of the declarations must be removed.
OmniMark Studio now does the following
---- |