The first chapter of this book briefly introduced C/SIDE objects and the basic concept of the object model. We created a simple codeunit that simply shows a text message when executed. This chapter gives a deeper overview of the C/AL language and its capabilities. To introduce the internal NAV programming language, the chapter presents the concept of a codeunit—a container of code that is called by other objects, a code library. The first chapter already gave a short foreword on codeunits; now we will continue with the following topics:
- Compiling a codeunit and error handling
- Declaring and calling functions
- Function parameters and return values
- Declaring variables—variable scope
- Passing variables by value and by reference
- Record variables
- codeunit variables—calling functions from other codeunits
- Text constants