Пример #1
0
//=========================================================================================
bool Environment::LookupVariable( const char* variableName, Number& variableValue )
{
	Number* foundNumber = 0;
	if( !variableMap.Lookup( variableName, &foundNumber ) )
	{
		AddError( "Failed to find variable \"%s\" in the environment.", variableName );
		return false;
	}

	if( !variableValue.AssignFrom( foundNumber, *this ) )
		return false;

	return true;
}
Пример #2
0
//=========================================================================================
/*virtual*/ bool StringEvaluator::EvaluateResult( Number& result, Environment& environment )
{
	if( !result.AssignFrom( string, environment ) )
		return false;
	return true;
}