DEPOSIT

Assign a value to a variable

WSupported on Windows
USupported on Unix
VSupported on OpenVMS

 

DEPOSIT variable=value

variable

A variable specification to which a value is assigned. See Specifying variables for more information about variable specifications.

value

Either a literal or variable to assign to variable.

The DEPOSIT command assigns a value to a variable.

You must be able to read or write to a variable specification, but a data specification can be read-only (in other words, a literal).

You can specify more than one variable=value assignment, separated by commas. When you specify more than one assignment, they’ll be processed from left to right.

Note

^VAL routine arguments cannot be deposited.

If variable is a field in an object instance, the field must be accessible and writable.

The following example assigns the value 15 to the expression a(b) in the xyz routine. (Remember, xyz must be in the current calling chain.)

DEPOSIT xyz:a(b)=15

In the example below, i is set to 15 and x(15) is set to 12.

DEPOSIT i=15, x(i)=12

The example below deposits a nonobject value into a static field by specifying a fully qualified name.

deposit ns1.ns2.myclass.myfield = value