previous up contents next
Left: Writeline Up: The DATR Standard Library Right: Length

Arithmetic functions

The examples that follow all presuppose that numbers are signed integers. Choice of type of number (and the representation thereof) can be left to implementations, but signed integers (at least) should be supported.

There's an issue about integer/string type conversion. We will assume that this is implicit, determined automatically by type expectations of the node. This may well not be workable, in general.

All these functions apply to number path prefixes. Once an element is encountered that does not represent a number (or part of an arithmetic expression, in the case of APU), then the arithmetic ceases and the rest of the path is mapped over unchanged.


---------------------------------------------------------

 

---------------------------------------------------------

Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998