previous chapterthe pico pagenext chapter


Variable definition

The first expression type we will look into is the one allowing us to introduce -we say define- new variables. We are required to state a variable name and an expression which is used to compute a value to be bound to this name. The colon between the name and the expression is a necessary hint for Pico to interpret this expression as a variable definition:

name : expression

As an example consider the following:

pi: 4*arctan(1)

Its evaluation appends an entry for the variable pi and the value 3.14159… to the current dictionary. The value of a variable definition is identical to the value of the expression following the colon.


previous chapterthe pico pagenext chapter