SecondBASIC Documentation v3

Home / Command Reference / Cls

Cls

Description: Clears the current text plane

Syntax:

Cls

Notes: Cls does not clear sprites, and only clears one layer at a time. If you need to clear both layers, you will need to change the text plane between Cls calls.

Example:

        SetTextPlane Scroll_A ' This is the default plane
        Print "Hello"
        SetTextPlane Scroll_B ' Change to plane b
        Print "World"
        SetTextPlane Scroll_A ' Back to plane a
        Sleep 100
        Cls
        Sleep 100 ' Notice only "Hello" was cleared
        SetTextPlane Scroll_B
        Cls ' Get rid of "World"