GOOC - Game Oriented Object C

GOOC - Game Oriented Object C

Next: States, Previous: Statements, Up: Top
[Contents]

9. Subroutines

9. Subroutines

You can write subroutines (or functions) to separate parts of your program into distinct subprocedures. To write a subroutine, you must define it somewhere in your source code. The position of the subroutine in the source code only matters for inline subroutines, which must be defined before ever being called.

To call a subroutine, you simply write call statement.