Topic: Expressions
Online Help
Variables
A variable is defined by its name and value using expressions like "a = 4". The "=" symbol is the assignment operator. On the left side, only a single variable name is allowed. On the right side, you can have any valid mathematical expression, e.g. "b = a + 4". A variable "lives" from the place of its definition to the end of the program. That is why you cannot use a variable before it is defined. This will raise an error. If you redefine an existing variable with a new value, it will replace the old one and the new value will be used further on.
Variable names can include small or capital Latin letters "a" - "z", "A" - "Z", Greek letters "α" - "ω", "Α" - "Ω" and digits. Names are case sensitive. For example "a" and "A" are different variables. A name must start with a letter or ∡. You can also use "," (comma), "‾" (overline), "_" (underscore), superscripts: " ⁰ " - " ⁹ ", " ⁿ ", " ⁺ ", " ⁻ " and other symbols: " ′ ", " ″ ", " ‴ ", " ⁗ ", " ø ", "Ø", " ° ", "∡". The first occurrence of an underscore in a name starts a subscript. For example, "a_1_1" will be formatted as "a1_1". Variables can store either real or complex numbers (in "Complex" mode).
Table of contents
-
+
About Calcpad
-
+
Writing code
-
+
Coding aids
-
−
Expressions
-
+
Reporting
-
+
Programming
-
+
Results
-
+
Working with files