swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
     
What's new

The following features are new since verion 5.3

New indexing forms

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:

  1. Indexing a shelf, attribute list, or referents
  2. do markup-parse with dtds { ... }
  3. new <shelf-name> after/before [...] to <value>
  4. new <shelf-name> after/before {...} to <value>
  5. set new <shelf-name> after/before [...] to <value>
  6. set new <shelf-name> after/before {...} to <value>
  7. set <shelf-name> [...] to <value>
  8. set <shelf-name> {...} to <value>

repeat for loop

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

New pattern matching synonyms

A \ inside character class means "except"

The symbols |= and =| are synonyms for value-start and value-end.

Take and Drop in pattern matching

The new take and drop operators enhance OmniMark's string manipulation.

New modifier on #main-output

You can now specify that the stream #main-output has domain-free.

Identity operator

The identity operator (~)is used to distinguish shelf expression from pattern expressions within a pattern.

Overloaded operators and dynamic initialization

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.

Less casting

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.

assert

You can now add assert statements to your OmniMark programs.

#args

#args is now a synonym for #command-line-names

Utilities library changes

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.

BCD and floating point libraries (ombcd and omfloat) changes

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.

Formatting in BCD and floating point

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.

Trigonometry library (omtrig)

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:

Bessel library (ombessel)

There is a new Bessel function library, ombessel, that includes the Bessel functions j0, j1, jn, y0, y1 and yn.

What's been deprecated

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.

Incompatibilities

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.

       
----

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:06:31 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.