# Difference between revisions of "Expressions"

m (Tag: VisualEditor) |
|||

Line 4: | Line 4: | ||

− | This | + | This section explains how to write expressions in the Analytica language, such as |

:<code>(-B + Sqrt(B^2 - 4*A*B))/(2*A)</code> | :<code>(-B + Sqrt(B^2 - 4*A*B))/(2*A)</code> | ||

− | An expression can | + | You use expressions in the Definition of a Variable or Function to say how to calculate. An expression can be simply a literal number (including Boolean or date), a text value, or the an identifier of a variable. Or it could be an arithmetic expression, a comparison or logical expression, <code>IF THEN ELSE</code>, or a function call, such as <code>Sqrt(B)</code>. |

For details on more advanced constructs, such as <code>BEGIN ... END </code> statements, [[For]] and [[While]] loops, local variables and assignments, references and data Structures, and handles to objects, see [[Procedural Programming]]. Analytica has the expressive power to express such concepts, too, and includes a general computer language, like Visual Basic or C++. | For details on more advanced constructs, such as <code>BEGIN ... END </code> statements, [[For]] and [[While]] loops, local variables and assignments, references and data Structures, and handles to objects, see [[Procedural Programming]]. Analytica has the expressive power to express such concepts, too, and includes a general computer language, like Visual Basic or C++. |

## Revision as of 02:18, 13 October 2017

This section explains how to write expressions in the Analytica language, such as

`(-B + Sqrt(B^2 - 4*A*B))/(2*A)`

You use expressions in the Definition of a Variable or Function to say how to calculate. An expression can be simply a literal number (including Boolean or date), a text value, or the an identifier of a variable. Or it could be an arithmetic expression, a comparison or logical expression, `IF THEN ELSE`

, or a function call, such as `Sqrt(B)`

.

For details on more advanced constructs, such as `BEGIN ... END `

statements, For and While loops, local variables and assignments, references and data Structures, and handles to objects, see Procedural Programming. Analytica has the expressive power to express such concepts, too, and includes a general computer language, like Visual Basic or C++.

## Sections

- Numbers
- Date and Time Values
- Boolean or truth values
- Text values
- Operators
- IF a THEN b ELSE c
- Function calls and parameters
- Math functions
- Numbers and text
- INF, NAN, and NULL - Exception values
- Warnings
- Datatype functions

## See Also

- Expression Syntax
- Parsed Expressions
- Expression Assist
- The Expression popup menu
- Tutorial: Using local variables and indexes in an expression

Enable comment auto-refresher