This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
script_syntax [2022/05/17 22:12] – justin | script_syntax [2023/06/11 17:25] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | **Bauxite**, | + | **Bauxite**, |
=====Statement Syntax===== | =====Statement Syntax===== | ||
Line 116: | Line 116: | ||
^Type^Examples^ | ^Type^Examples^ | ||
|[[String]]|" | |[[String]]|" | ||
- | |[[Decimal]]|17, 3.14159| | + | |[[Number]]|17, 3.14159| |
|[[Boolean]]|true, | |[[Boolean]]|true, | ||
|[[Coordinate]]|coord[1, | |[[Coordinate]]|coord[1, | ||
Line 158: | Line 158: | ||
====Codex==== | ====Codex==== | ||
- | A codex is a data type with its data stored as key/value pairs. The key is a unique [[string]] and acts as a lookup for its corresponding value within the codex, similar to a dictionary. See [[Codex]] for more information and scripting examples. | + | A [[codex]] is a data type with its data stored as key/value pairs. The key is a unique [[string]] and acts as a lookup for its corresponding value within the codex, similar to a dictionary. See [[Codex]] for more information and some scripting examples. |
====Null==== | ====Null==== | ||
Line 230: | Line 230: | ||
</ | </ | ||
List of integers from 5 to, but not including, 0, with an increment of -1 (i.e. 5, 4, 3, 2, 1). | List of integers from 5 to, but not including, 0, with an increment of -1 (i.e. 5, 4, 3, 2, 1). | ||
+ | |||
+ | ====Duplicate==== | ||
+ | The **duplicate** function creates a unique copy of an [[array]] or [[codex]]. Since the copy is unique, you can modify its data without affecting the original [[array]] or [[codex]]. | ||
+ | |||
+ | With the code below where the value in **$items** is simply stored into another variable, in this case **$items_copy**, | ||
+ | <code bauxite> | ||
+ | $items = codex[" | ||
+ | $items_copy = $items; | ||
+ | $items_copy[" | ||
+ | print($items[" | ||
+ | print($items_copy[" | ||
+ | </ | ||
+ | |||
+ | In the example below, a copy of **$items** is made using the " | ||
+ | <code bauxite> | ||
+ | $items = codex[" | ||
+ | $items_copy = duplicate($items); | ||
+ | $items_copy[" | ||
+ | print($items[" | ||
+ | print($items_copy[" | ||
+ | </ | ||
====Inverse==== | ====Inverse==== |