Chapter 2. YCP Data Types

Table of Contents

2.1. Data Type void (nil)
2.2. Data Type symbol
2.3. Data Type boolean
2.4. Data Type integer
2.5. Data Type float
2.6. Data Type string
2.7. Data Type byteblock
2.8. Data Type list
2.9. Data Type map
2.10. Data Type path
2.11. Data Type term
2.12. Data Type any

Just like any other high-level programming language YCP has typed variables to hold data of different kinds:

2.1. Data Type void (nil)

This is the most simple data type. It has only one possible value: nil. Declaring variables of this type doesn't make much sense but it is very useful to declare functions that need not return any useful value. nil is often also returned as an error flag if functions fail in doing their job somehow.