|
| 1 | +--- |
| 2 | +sidebar_position: 500 |
| 3 | +--- |
| 4 | + |
| 5 | +# Glossary |
| 6 | + |
| 7 | +Learn about terms and references commonly used in the documentation. |
| 8 | + |
| 9 | +### Argument |
| 10 | + |
| 11 | +An argument is a variable that affects a function's result. |
| 12 | + |
| 13 | +### Binary operator |
| 14 | + |
| 15 | +A binary operator is an operator that operates on two operands and manipulates them to return a result. |
| 16 | + |
| 17 | +### Boolean |
| 18 | + |
| 19 | +A Boolean is a data type with two possible values: `true` or `false`. |
| 20 | + |
| 21 | +### Calculations block |
| 22 | + |
| 23 | +The calculations block is the place where you can type numbers and perform operations in a more natural way, powered by the Decipad language. In the calculations block, you can type numbers, units, variables, functions, as well as create tables. |
| 24 | + |
| 25 | +```deci live |
| 26 | +2 + 2 |
| 27 | +==> 4 |
| 28 | +``` |
| 29 | + |
| 30 | +### Condition |
| 31 | + |
| 32 | +A conditional statement or conditional is an if-then-else statement. |
| 33 | + |
| 34 | +```deci live |
| 35 | +sun_is_down = false |
| 36 | +if sun_is_down then "dinner👩🍳" else "lunch💪" |
| 37 | +==> 'lunch💪' |
| 38 | +``` |
| 39 | + |
| 40 | +### Decipad language |
| 41 | + |
| 42 | +The language is how you interact and use data in a calculations block. |
| 43 | + |
| 44 | +```deci live |
| 45 | +CurrentSavings = 50000 |
| 46 | +==> 50000 |
| 47 | +``` |
| 48 | + |
| 49 | +### Dimension |
| 50 | + |
| 51 | +A dimension is a category that can be broken down into different items. |
| 52 | + |
| 53 | +### Exponentiation |
| 54 | + |
| 55 | +Exponentiation is the mathematical operation of raising a quantity to a power. |
| 56 | + |
| 57 | +```deci live |
| 58 | +(3 meters) ** 2 |
| 59 | +==> 9 meters² |
| 60 | +``` |
| 61 | + |
| 62 | +### Expression |
| 63 | + |
| 64 | +An expression is a combination of numbers, variables, functions such as `+`, `-`, `*`, etc. |
| 65 | + |
| 66 | +```deci live |
| 67 | +6 / 2 |
| 68 | +==> 3 |
| 69 | +``` |
| 70 | + |
| 71 | +### Function |
| 72 | + |
| 73 | +A function is a block of reusable Decipad language used to perform a set of operations. |
| 74 | + |
| 75 | +```deci live |
| 76 | +max([1, 3, 2]) |
| 77 | +rounddown(2.9) |
| 78 | +==> 2 |
| 79 | +``` |
| 80 | + |
| 81 | +### Integer |
| 82 | + |
| 83 | +An integer is a whole number, not a fractional number, that can be positive, negative or 0. |
| 84 | + |
| 85 | +```deci live |
| 86 | +21 |
| 87 | +-21 |
| 88 | +0 |
| 89 | +==> 0 |
| 90 | +``` |
| 91 | + |
| 92 | +### Lookup |
| 93 | + |
| 94 | +Lookup is a pre-built function that can be used to access values in a table to be used in further calculations. |
| 95 | + |
| 96 | +```deci live |
| 97 | +Employees = { |
| 98 | + name = ["Jane", "Peter", "John"] |
| 99 | + Office = ["USA", "Germany", "Japan"] |
| 100 | +} |
| 101 | +
|
| 102 | +lookup(Employees, "Peter") |
| 103 | +==> { |
| 104 | + name = 'Peter', |
| 105 | + Office = 'Germany' |
| 106 | +} |
| 107 | +``` |
| 108 | + |
| 109 | +### Notebook |
| 110 | + |
| 111 | +A notebook is a place where narrative and data coexist. |
| 112 | + |
| 113 | +## Operand |
| 114 | + |
| 115 | +An operand is a number or quantity upon which a mathematical operation is performed. |
| 116 | + |
| 117 | +## Operator |
| 118 | + |
| 119 | +An operator is a symbol used to perform a mathematical operation. |
| 120 | + |
| 121 | +```deci live |
| 122 | +5 - 7 |
| 123 | +8 + 6 |
| 124 | +10 / 2 |
| 125 | +12 * 5 |
| 126 | +==> 60 |
| 127 | +``` |
| 128 | + |
| 129 | +## String |
| 130 | + |
| 131 | +A string is a data type used to represent text. |
| 132 | + |
| 133 | +## Text block |
| 134 | + |
| 135 | +A text block is a paragraph of text with different text styling options. |
| 136 | + |
| 137 | +## Unit |
| 138 | + |
| 139 | +A unit is any type of measurement. The Decipad language understands some units and knows how to convert between units of that same quantity. Units can be simple and composed. |
| 140 | + |
| 141 | +```deci live |
| 142 | +2 apples |
| 143 | +50 miles/hour |
| 144 | +==> 50 miles per hour |
| 145 | +``` |
| 146 | + |
| 147 | +## Variable |
| 148 | + |
| 149 | +A variable is a way to store a value in a name, which can then be used in further calculations. Declaring a variable is assigning it a value using the `=` operator. |
| 150 | + |
| 151 | +```deci live |
| 152 | +Total_Revenue = 50000 USD |
| 153 | +Total_Costs = 23000 USD |
| 154 | +Yearly_Profit = Total_Revenue - Total_Costs |
| 155 | +==> 27000 $ |
| 156 | +``` |
0 commit comments