libqalculate-1.0.0
Public Attributes | List of all members
ParseOptions Struct Reference

Options for parsing expressions. More...

#include <includes.h>

Public Attributes

bool variables_enabled
 If variables will be parsed. Default: true.
 
bool functions_enabled
 If functions will be parsed. Default: true.
 
bool unknowns_enabled
 If left-over characters will be parsed as symbols. Default: true.
 
bool units_enabled
 If units will be parsed. Default: true.
 
bool rpn
 If Reverse Polish Notation syntax will be used. Default: false.
 
int base
 Base of parsed numbers. Default: 10.
 
bool limit_implicit_multiplication
 When implicit multiplication is limited variables, functions and units must be separated by a space, operator or parenthesis ("xy" does not equal "x * y"). Default: false. More...
 
ReadPrecisionMode read_precision
 If and when precisions will be read from number of digits in a number. Default: DONT_READ_PRECISION.
 
bool dot_as_separator
 If true dots will ignored if another character is the default decimal sign, to allow dots to be used as thousand separator. Default: false.
 
bool comma_as_separator
 If true commas will ignored if another character is the default decimal sign, to allow commas to be used as thousand separator. You also need to call CALCULATOR->useDecimalPoint(true). Default: false.
 
bool brackets_as_parentheses
 Interpret square brackets equally to parentheses (not only for vectors/matrices). Default; false.
 
AngleUnit angle_unit
 Default angle unit for trigonometric functions. Default: ANGLE_UNIT_NONE.
 
MathStructureunended_function
 If non-NULL will be set to unfinished function at the end of the expression (if there is one). Default: NULL.
 
bool preserve_format
 Preserve the expression structure as much as possible. Default: false.
 
DataSetdefault_dataset
 Defaukt dataset. Used for object.property syntax without a preceeding data set. Default: NULL.
 
ParsingMode parsing_mode
 

Detailed Description

Options for parsing expressions.

Member Data Documentation

◆ limit_implicit_multiplication

bool ParseOptions::limit_implicit_multiplication

When implicit multiplication is limited variables, functions and units must be separated by a space, operator or parenthesis ("xy" does not equal "x * y"). Default: false.

If the limit implicit multiplication mode is activated, the use of implicite multiplication when parsing expressions and displaying results will be limited to avoid confusion. For example, if this mode is not activated and "integrte(5x)" is accidently typed instead of "integrate(5x)", the expression is interpreted as "int(e * e * (5 * x) * gr * t)". If limit implicit multiplication is turned on to mistyped expression would instead show an error telling that "integrte" is not a valid variable, function or unit (unless unknowns is not enabled in which case the result will be "5 'integrate' * x".

◆ parsing_mode

ParsingMode ParseOptions::parsing_mode

Convert degree Celsius and Fahrenheit to Kelvin already when parsing the expression. Turn off when parsing unit expression to convert to. Default: true Parsing mode. Default: PARSING_MODE_ADAPTIVE


The documentation for this struct was generated from the following file: