Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is how the function is named, its return type and parameters defined with sudo code.


datatype functionName datatype functionName (parameter,.....)

{

<function contents>

<possible return value>

}


Function call 

This is how we execute a function:

functionName(parameter,.....) ;


Function Examples

This example shows how to write functions with return values.

...

Create a program where a unique shape follows the mouse position. When you click the mouse, the should change in some way (form, colour, size).