Chapter 4. Functions and Libraries in mikroC
mikroC Functions
A function is a self-contained section of code written to perform a specifically defined action. Functions are usually created when a single operation must be performed in different parts of the main program. It is, moreover, good programming practice to divide a large program into a number of smaller, independent functions. The statements within a function are executed by calling (or invoking) the function.
The general syntax of a function definition is shown in Figure 4.1. The data type indicates the type of data returned by the function. This is followed by the name of the function and then a set of parentheses, within which the arguments, separated by commas, are declared. The body ...
Get Advanced PIC Microcontroller Projects in C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.