Lingo Dictionary > L-N > nothing |  |

nothing

Syntax

    nothing

Description

Command; does nothing. This command is useful for making the logic of an `if...then` statement more obvious. A nested `if...then...else` statement that contains no explicit command for the `else` clause may require `else nothing`, so that Lingo does not interpret the `else` clause as part of the preceding `if` clause.

Example

The nested `if...then...else` statement in this handler uses the `nothing` command to satisfy the statement's `else` clause:

    on mouseDown
    	if the clickOn = 1 then
    		if sprite(1).moveableSprite = TRUE then member("Notice").text = "Drag the ball"
    		else nothing
    	else member("Notice").text = "Click again"
    	end if
    end

Example

This handler instructs the movie to do nothing so long as the mouse button is being pressed:

    on mouseDown
    	repeat while the stillDown
    		nothing
    	end repeat
    end mouseDown

See also

`if`