MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / evaluate

Function evaluate

Engine/source/console/console.cpp:1456–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1454}
1455
1456ConsoleValueRef evaluate(const char* string, bool echo, const char *fileName)
1457{
1458 ConsoleStackFrameSaver stackSaver;
1459 stackSaver.save();
1460
1461 if (echo)
1462 {
1463 if (string[0] == '%')
1464 Con::printf("%s", string);
1465 else
1466 Con::printf("%s%s", getVariable( "$Con::Prompt" ), string);
1467 }
1468
1469 if(fileName)
1470 fileName = StringTable->insert(fileName);
1471
1472 CodeBlock *newCodeBlock = new CodeBlock();
1473 return newCodeBlock->compileExec(fileName, string, false, fileName ? -1 : 0);
1474}
1475
1476//------------------------------------------------------------------------------
1477ConsoleValueRef evaluatef(const char* string, ...)

Callers 15

DefineConsoleFunctionFunction · 0.85
restoreMethod · 0.85
spawnObjectFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
createMethod · 0.85
onWindowClosedMethod · 0.85
torque_resetFunction · 0.85
torque_evaluateFunction · 0.85
DefineConsoleFunctionFunction · 0.85

Calls 5

printfFunction · 0.85
getVariableFunction · 0.85
compileExecMethod · 0.80
saveMethod · 0.45
insertMethod · 0.45

Tested by 3

TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68