Copy the value of one variable to another.
Declaration | Zeolite.h |
---|---|
Implementation | Zeolite.cpp |
bool zvar_CopyValue(ZVAR hVarDest, ZVAR hVarSrc);
Name | Type | Comment |
---|---|---|
hVarDest | ZVAR | A ZVAR handle to the destination variable, the value of which will be overwritten. |
vVarSrc | ZVAR | A ZVAR handle to the source variable, the value of which will overwrite the value of hVarDest. |
False if:
True otherwise.
If hVarDest is not of the same variable type as hVarSrc, it will automatically be re-initialised as the correct type.
The name of the variable is not changed by zvar_CopyValue
.
The following variable types cannot be copied by zvar_CopyValue
:
Type | Reason |
---|---|
VarID_void | Voids contain no data, and hence no value to copy. |
VarID_map | Maps are potentially too big to create multiple copies*. |
VarID_ProgBox | No copy operator is defined for progress dialogs*. |
VarID_ZeoFunc | No copy operator is defined for Zeolite extension functions*. |
* If you want to create a variable that can be used to access another variable of one of these types, use zvar_SetVarRef instead.