Cast the value of a variable to another variable type.
Declaration | helper/zVarCast.h |
---|---|
Implementation | helper/zVarCast.cpp |
bool zvar_Cast(ZVAR hVarDest, long DestVarID, ZVAR hVarSrc);
Name | Type | Comment |
---|---|---|
hVarDest | ZVAR | A handle to a variable that is to receive the value of hVarSrc after type casting. |
DestVarID | long | The desired variable type of the variable addressed by hVarDest (see comments). |
hVarSrc | ZVAR | A handle to the variable containing the value to be cast to another variable type. |
False if:
True otherwise.
If the variable type given by DestVarID different to the actual variable type of hVarDest, this funciton will automatically call zvar_ReInit on hVarDest to re-initialise it as the correct output variable type.