XML Script logo
_OP_DECREMENT, _OP_INCREMENT, _OP_MINUS_EQUALS, _OP_PLUS_EQUALS - usage of
Usage

_OP_DECREMENT takes a reference to an item and decrements its value. If the item named does not exist, it is created and assigned a value of -1. If the item is characters, or a mix of numbers and characters with a character first, then the item is assigned -1. If the item is a mix of numbers and characters and a number is first then the item is assigned a decremented version of that number.

_OP_INCREMENT takes a reference to an item and increments its value. If the item named does not exist, it is created and assigned a value of 1. If the item is characters, or a mix of numbers and characters with a character first, then the item is assigned 1. If the item is a mix of numbers and characters and a number is first then the item is assigned a incremented version of that number.

_OP_MINUS_EQUALS(item,num) subtracts num from item. If item does not exist it is created with contents 0 and the subtraction then takes place. If item has no numeric characters, or the first character is not numeric then item is assumed to be 0. If item has numeric characters followed by non-numeric characters then the value of item is assumed to be the numeric characters up until the first non-numeric character.

_OP_MINUS_PLUS(item,num) adds num to item. If item does not exist it is created with contents 0 and the addition then takes place. If item has no numeric characters, or the first character is not numeric then item is assumed to be 0. If item has numeric characters followed by non-numeric characters then the value of item is assumed to be the numeric characters up until the first non-numeric character.

Examples

Example of _OP_DECREMENT

Example of _OP_INCREMENT

Example of _OP_PLUS_EQUALS

Example of _OP_MINUS_EQUALS

Version

1.1

Ref

t.67

Date

23 December 1999

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited