engine/source/scriptlib/Interpreter.c
/******************************************************************************
*  GetValue -- This method copies the VARIANT in the symbol designated by
*              variable into the ScriptVariant.
*  Parameters: variable -- a LPCSTR which denotes which symbol to copy this
*                          value from.
*              pValue -- a pointer to a ScriptVariant into which to copy the
*                        value.
*  Returns: S_OK
*           E_INVALIDARG
*           E_FAIL
******************************************************************************/
- This method copies the VARIANT in the symbol designated by
variable into the ScriptVariant.
Parameters: variable -- a LPCSTR which denotes which symbol to copy this
value from.
pValue -- a pointer to a ScriptVariant into which to copy the
value.
- This method copies the VARIANT in the symbol designated by variable into the ScriptVariant . Parameters : variable -- a LPCSTR which denotes which symbol to copy this value from . pValue -- a pointer to a ScriptVariant into which to copy the value .
HRESULT Interpreter_GetValue(Interpreter *pinterpreter, LPCSTR variable, ScriptVariant *pValue)
{
    HRESULT hr = E_FAIL;
    Symbol *pSymbol = NULL;
    if (StackedSymbolTable_FindSymbol(&(pinterpreter->theSymbolTable), variable, &pSymbol ))
    {
        ScriptVariant_Copy(pValue, &(pSymbol->var));
        hr = S_OK;
    }
    return hr;
}
HRESULT Interpreter_GetValue ( Interpreter * pinterpreter , LPCSTR variable , ScriptVariant * pValue ) { HRESULT hr = E_FAIL ; Symbol * pSymbol = NULL ; if ( StackedSymbolTable_FindSymbol ( & ( pinterpreter -> theSymbolTable ) , variable , & pSymbol ) ) { ScriptVariant_Copy ( pValue , & ( pSymbol -> var ) ) ; hr = S_OK ; } return hr ; }
GetValue -- This method copies the VARIANT in the symbol designated by
variable into the ScriptVariant.
GetValue -- This method copies the VARIANT in the symbol designated by variable into the ScriptVariant .
//Get the CSymbol that contains the VARIANT we need //Copy the value from the symbol to the result VARIANT