Dummy function in C language

The dummy function can also be called an empty function. It is a complete function. It has a function body, but there is no statement in the body of the function.

Dummy function in C language

The role of the dummy function:

In the program design, several modules are often determined according to the needs, which are respectively implemented by some functions. In the first stage, only the most basic modules are designed. Other minor functions or icing on the cake will be added later when needed. At the beginning of writing the program, you can write a dummy function in the future where you want to expand the function, and write it in the future.

Dummy function application:

For example: void main() {}

The body of the function is empty. When I call the secondary function, I don’t do anything, and I don’t have any practical effect.

In the g.zai main function, if there is a statement that calls the secondary function: dummy(); indicates "to call the dummy function".

For example, if a function wants to pass a value back to a parameter, but the caller does not want the value, you can define a thing called dummy and pass it to the function. This program is more clear.

This definition of estimation also has a similar meaning, that is, a variable or an empty variable that has no meaning.

Laser Lamp Series

LED Laser lamp,Full color led laser lamp

Kindwin Technology (H.K.) Limited , https://www.ktlleds.com