Table of Contents

Enum ExpressionOptions

Namespace
NCalc
Assembly
NCalc.Core.dll

Options used for both parsing and evaluation of an expression.

[Flags]
public enum ExpressionOptions

Fields

[Display(Name = "Allow Boolean Calculation")] AllowBooleanCalculation = 512

Allow calculation with bool values.

[Display(Name = "Allow Char Values")] AllowCharValues = 4096

Parse single quoted strings as char.

[Display(Name = "Allow Null Or Empty Expressions")] AllowNullOrEmptyExpressions = 16384

Return the value instead of throwing an exception when the expression is null or empty.

[Display(Name = "Allow Null Parameter")] AllowNullParameter = 128

Defines a "null" parameter and allows comparison of values to null.

[Display(Name = "Arithmetic Null Or Empty String As Zero")] ArithmeticNullOrEmptyStringAsZero = 131072

Converts null or empty string values to 0 during arithmetic operations.

[Display(Name = "Case-Insensitive String Comparer")] CaseInsensitiveStringComparer = 32

Specifies the use of CaseInsensitiveComparer for comparisons.

[Display(Name = "Decimal As Default")] DecimalAsDefault = 64

Uses decimals instead of doubles as default floating point data type.

[Display(Name = "Ignore Case At Built-In Functions")] IgnoreCaseAtBuiltInFunctions = 2

Specifies case-insensitive matching for built-in functions.

[Display(Name = "Iterate Parameters")] IterateParameters = 8

Treats parameters as arrays and returns a set of results.

[Display(Name = "Long As Default")] LongAsDefault = 65536

Uses long instead of integer as default integral data type.

[Display(Name = "No Cache")] NoCache = 4

No-cache mode. Ignores any pre-compiled expression in the cache.

[Display(Name = "No String Type Coercion")] NoStringTypeCoercion = 8192

Disables coercion of string values to other types.

[Display(Name = "None")] None = 0

Specifies that no options are set.

[Display(Name = "Ordinal String Comparer")] OrdinalStringComparer = 256

Use ordinal culture on string compare.

[Display(Name = "Overflow Protection")] OverflowProtection = 1024

Check for arithmetic binary operation overflow.

[Display(Name = "Round Away From Zero")] RoundAwayFromZero = 16

When using Round(), if a number is halfway between two others, it is rounded toward the nearest number that is away from zero.

[Display(Name = "Strict Type Matching")] StrictTypeMatching = 32768

Enables strict type matching, where comparisons between objects of different types will return false.

[Display(Name = "String Concatenation")] StringConcat = 2048

Concat values as strings instead of arithmetic addition.