Difference between revisions of "Expressions"

m
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
<languages />
+
[[Category: Expressions]]
<translate>
+
<breadcrumbs>Analytica User Guide > {{PAGENAME}}</breadcrumbs>
[[Analytica User Guide]] >
+
  
The definition of each variable is an expression, such as
 
  
:'''<nowiki>(- B + Sqrt(B^2 - 4*A*B))/(2*A)</nowiki>'''
+
This section explains how to write expressions in the Analytica language, such as
 +
:<code>(-B + Sqrt(B^2 - 4*A*B))/(2*A)</code>  
  
An expression can consist of or contain a literal number (including Boolean or date), a text value, an identifier of a variable, an arithmetic expression, a comparison or logical expression, '''IF THEN ELSE''', or a function call, such as '''Sqrt(B)'''.
+
You use expressions in the Definition of a Variable or Function to say how to calculate. An expression can be simply a literal [[Numbers|number]], including [[Boolean or truth values|Boolean]] or [[Date and Time Values|date]], a [[Text values|text value]], or an identifier of a variable. Or it could be an arithmetic [[Operators|expression, a comparison or logical expression]], [[IF a THEN b ELSE c]], or a [[Function calls and parameters|function call]], such as <code>Sqrt(B)</code>.  
  
See [[Procedural Programming]] for details on more advanced constructs, such as '''BEGIN ... END '''statements, '''For '''and '''While '''loops, local variables and assignments.
+
Analytica is primarily a [[Declarative language]], where the Definition of each variable is a simple expressions. But Analytica does support constructs used in common procedural or imperative languages like Python or C++, including <code>BEGIN ... END </code> statements, [[For]] and [[While]] loops, local variables, assignments, references and data Structures, and handles to objects. See [[Procedural Programming]] for details.  
  
==Contents of the Analytica User Guide Chapter 10==
+
==Sections==
 
* [[Numbers]]
 
* [[Numbers]]
 
* [[Date and Time Values]]
 
* [[Date and Time Values]]
Line 22: Line 21:
 
* [[Math functions]]
 
* [[Math functions]]
 
* [[Numbers and text]]
 
* [[Numbers and text]]
* [[Exception values INF, NAN, and NULL]]
+
* [[INF, NAN, and NULL - Exception values]]
 
* [[Warnings]]
 
* [[Warnings]]
 
* [[Datatype functions]]
 
* [[Datatype functions]]
  
 
==See Also==
 
==See Also==
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
+
* [[Expression Syntax]]
|- style="text-align: center"
+
* [[Parsed Expressions]]
| [[Chapter 9: Creating Interfaces for End Users]] <- || [[Chapter 10: Using Expressions]] || -> [[Chapter 11: Arrays and Indexes]]
+
* [[Expression Assist]]
|}
+
* [[The Expression popup menu]]
</translate>
+
* [[Tutorial: Arrays#Using_local_variables_and_indexes_in_an_expression|Tutorial: Using local variables and indexes in an expression]]
 +
 
 +
 
 +
<footer>Definitions / {{PAGENAME}} / Text, Date, Math, and Financial Functions</footer>

Latest revision as of 02:26, 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 an identifier of a variable. Or it could be an arithmetic expression, a comparison or logical expression, IF a THEN b ELSE c, or a function call, such as Sqrt(B).

Analytica is primarily a Declarative language, where the Definition of each variable is a simple expressions. But Analytica does support constructs used in common procedural or imperative languages like Python or C++, including BEGIN ... END statements, For and While loops, local variables, assignments, references and data Structures, and handles to objects. See Procedural Programming for details.

Sections

See Also


Comments


You are not allowed to post comments.