Action Statement
Copy indirectly from a constant or variable into a variable.
use "indcopy" SOURCE_NAME_STRING TARGET_NAME_STRING
SOURCE_NAME_STRING
A string expression whose value is the name of a constant or variable to be copied from. It may be a string, float, integer, or boolean. It may not be part of a structure or an array, nor may it be the argument or local variable of a subroutine.
TARGET_NAME_STRING
A string expression whose value is the name of a variable to be copied to. It may be a string, float, integer, or boolean. It may not be part of a structure or an array, nor may it be the argument or local variable of a subroutine.
Description
This action copies a value from a constant or variable into a variable. The names of the constant and variables are indirectly specified by string expressions. This is the same as using copy, except that the variable names are not determined until runtime. The source and destination may be different types; the value will be converted in the same manner as with copy.
This action cannot be used with the arguments or local variables of a subroutine. To use them you need to use a non-local variable as a temporary holding place and use copy to put the value into or get it out of the parameter or local variable.
This statement may be used to write generic actions for objects, such as setting or querying the value of an object using the name of a variable that is stored in the object's parameter.
Example
response to entry field on validation
# When the user finishes with any entry field,
# copy its value to the string variable whose
# name is stored in the parameter of that
# entry field.
copy (text of object) to Temp_SV
use "indcopy" ("Temp_SV") (parameter)
See Also
copy Action Statement