Table of Contents
Section not written yet...
Basically a block is a sequence of YCP statements enclosed in curly
brackets. It can be a whole YCP program as was the case with the
outermost block in hello.ycp from Section 1.1, “YCP Source”. What is special about blocks in YCP is
that they represent a value and therefore can be assigned to a
variable. It is sometimes really useful to have those blocks as YCP
values because this makes it possible to use them as parameters to
function calls. Of course the syntactical structure of blocks can
become rather complex which leads to a description of the whole
language itself. Therefore we put this into a section of its own:
Chapter 8, YCP Program Structure.
For now the following examples should suffice.