Published on STEMRobotics (https://stemrobotics.cs.pdx.edu)

Home > Functions Without Parameters

Functions Without Parameters

Submitted by Devin Hunter on 18 July, 2011 - 15:12
-- 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: 
eraseDisplay() [1]



National Science Foundation

Source URL: https://stemrobotics.cs.pdx.edu/node/667?root=669

Links
[1] https://stemrobotics.cs.pdx.edu/node/725