Skip to content

4. Constructed Types

OJddJO edited this page Nov 8, 2024 · 24 revisions

Note

Constructed types are used to store multiple values. They are used to group data together.

Lists

Note

Lists are used to store multiple values of different types. They are not type safe, meaning that they can contain any type of data. You need to be careful when using lists as they can lead to type errors. The size of lists is dynamic and can change.

Expression Description
list create var Create a new list variable var
list append var value a Append a to the list variable var
list get var index a store output Get the value at index a from the list variable var and store the value in the variable output
list set var index a assign b Set the value at index a in the list variable var to b
list search var value a store output Search for the value a in the list variable var and store the index in output (-1 if not found)
list remove var value a Remove the value at index a from the list variable var
list length var store output Get the length of the list variable var and store the length in output
delete var Delete the list variable var

Dictionaries

Important

Not usable yet. Dicts are implemented but due to their complexities, they are not available for use yet.

Note

Dictionaries are used to store key-value pairs. They are usefull when you want to store multiple data sets and give the data a name. The keys are unique and the values can be of any type. The size of dictionaries is dynamic and can change.

Expression Description
Coming soon... Coming soon...

-> Next: I/O Expressions
Return to main page