0% found this document useful (0 votes)
4 views1 page

YCP Data Types Overview

This document discusses YCP data types including blocks and any. Blocks represent a value that can be assigned to a variable and used as parameters for function calls. Blocks can become complex leading to a description of the whole YCP program structure covered in Chapter 8. The any data type allows variables to hold values of any type.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

YCP Data Types Overview

This document discusses YCP data types including blocks and any. Blocks represent a value that can be assigned to a variable and used as parameters for function calls. Blocks can become complex leading to a description of the whole YCP program structure covered in Chapter 8. The any data type allows variables to hold values of any type.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

18/09/13

Chapter 3. More YCP types

Chapter 3. More YCP types The YaST Programming Language - YCP

Chapter 3. More YCP types


Table of Contents 3.1. Data Type block Section not w ritten yet...

3.1. Data Type block


Basically a block is a sequence of Y C Pstatements enclosed in curly brackets. It can be a w hole Y C Pprogram as w as the case w ith the outermost block in [Link] from Section 1.1, YCP Source . What is special about blocks in Y C Pis that they represent a value and therefore can be assigned to a variable. It is sometimes really useful to have those blocks as Y C Pvalues because this makes it possible to use them as parameters to function calls. Of course the syntactical structure of blocks can become rather complex w hich leads to a description of the w hole language itself. Therefore w e put this into a section of its ow n: Chapter 8, YCP Program Structure. For now the follow ing examples should suffice. Exam ple 3.1. Block constants {r e t u r n1 7 ;} {i n t e g e ra=5 ;r e t u r na+8 ;}

2.12. Data Type any

Chapter 4. YCP Type System

[Link]/projects/YaST/openSUSE11.3/tdg/id_ycp_more_types.html#id_ycp_data_block

1/1

You might also like