NAME
DecrDbGlobal — Find entry in the globals table and decrement it.
SYNOPSIS
DecrDbGlobal VarName ?Amount?
DESCRIPTION
Return Value
The new current value for the variable.
Arguments
VarNameName of variable in globals table to be decremented.
AmountHow much to decrement the entry values by.
More Info
If no variable with the given name can be found in the database then a new variable with that name will be created at 0 and decremented to -1. This is consistent with similar commands and specifically incr.

You may wish to take a look at the documentation about the XxxDbGlobal commands: About XxxGlobal.

Check About Configuration for Database Use for info about how to set up Gen for using database-related commands.


For information regarding exceptions / errors, see here.
EXAMPLES

This code: (1) Creates a global with a certain value, (2) Decrements it, (3) Shows that the value is one less.

% SetDbGlobal my_variable 11
11
% DecrDbGlobal my_variable
10
% GetDbGlobal my_variable
10
SEE ALSO
GetDbGlobal, IncrDbGlobal, SetDbGlobal, UnsetDbGlobal
KEYWORDS
sql