Concept Explanation: Functions Without Parameters

Printer-friendly version
-- eraseDisplay --
  • Function Syntax: eraseDisplay()
  • Usage: Clears the NXT Display.

The last function we will look at doesn't have a parameter. It is important to remember that even if you don't have any parameters, you still need to use parentheses. These symbols are expected by the compiler and it will throw an error if you don't have them. The reason we erase the display before we write is to make sure we don't have accidental overwrites. We'll talk about this more in later chapters.

Concepts: