Coding Qubics in QL

Data Structures

Data structures are they key to build powerful applications. They allow you to model complex objects thereby make qubic programming interesting.

Arrays / Lists

Arrays are ordered lists of custom lengths. The elements in an array do not have to be from the same type. To address an element in the array, use an integer index (the position).

my_var = 3.14;
arr = [0, 'a string', my_var];

arr[1] = 42;

arr[size_of(arr)] = 0.815;

(more to come ...)