MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / EvaluateValueForDisplay

Method EvaluateValueForDisplay

src/GCodes/GCodes.cpp:5873–5886  ·  view source on GitHub ↗

Evaluate a value string returning true if an error occurred

Source from the content-addressed store, hash-verified

5871
5872// Evaluate a value string returning true if an error occurred
5873bool GCodes::EvaluateValueForDisplay(const char *_ecv_array str, ExpressionValue& expr) const noexcept
5874{
5875 try
5876 {
5877 ExpressionParser parser(LcdGCode(), str, str + strlen(str));
5878 expr = parser.Parse();
5879 return false;
5880 }
5881 catch (const GCodeException&)
5882 {
5883 expr.SetNull(nullptr);
5884 return true;
5885 }
5886}
5887
5888#endif
5889

Callers 1

ValueMenuItem.cppFile · 0.80

Calls 1

SetNullMethod · 0.80

Tested by

no test coverage detected