mumps.increment()

Atomically increments a global node. If the global node is not defined, will set it to count, if specified, otherwise, sets the global node to 0.

Arguments

ArgumentData TypeRequiredDescription
globalNamestringYesThe name of the global to examine
subscriptsarrayYesAn array of subscripts
countnumericNoThe number by which to increment

Return Value

Returns the incremented value.

Example

CFScript
var mumps = new lib.cfmumps.Mumps();
mumps.open();

// increments ^myCounter by 2 if it exists, otherwise, sets ^myCounter to 2.
mumps.increment("myCounter", [], 2);

mumps.close();


CFML
<cfset mumps = new lib.cfmumps.Mumps()>
<cfset mumps.open()>

<cfset mumps.increment("myCounter", [], 2);

<cfset mumps.close()>