libqalculate-4.9.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 (deprecated, use parsing_mode = PARSING_MODE_RPN instead)
 
int base
 Base of parsed numbers. Specify a value between 2 and 36 or use one of the special values defined in includes.h (BASE_*). 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.
 
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 should also 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
 Default dataset. Used for object.property syntax without a preceding data set. Default: NULL.
 
ParsingMode parsing_mode
 Parsing mode. Default: PARSING_MODE_ADAPTIVE.
 
bool twos_complement
 Negative binary numbers uses two's complement representation. All binary numbers starting with 1 are assumed to be negative. Default: false.
 
bool hexadecimal_twos_complement
 Negative hexadecimal numbers uses two's complement representation. All hexadecimal numbers starting with 8 or higher are assumed to be negative. Default: false.
 

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 implicit 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".


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