Any programming language that aims to alter the flow of a program requires variables. A variable stores a value that can be read or modified later in the program.
To define a new variable, the SET
-statement can be used.
In PRX, any variable needs to be prefixed by an ampersand (&
). To free up the memory of the variable again, we use the UNSET
-statement.
To store multiple values within a single variable, lists can be used. To define a new list, we use square brackets []
.
Lists are especially useful when you need to iterate through a predefined set of values. But more on that later.
In the next chapter, we will discuss the different data types that are available in PRX.
In PRX, every variable is defined within the global scope. There are no local variables restricted to a specific block. Variables defined in can be accessed normally within the including program.