1) First Launch and First Run

Back to Getting Started


Your First Goal

In this section, your only goal is to run a small program and confirm the IDE, compiler, and runtime are working.

Create a New Source File

Paste This Program

SetAppTitle("First Run")
Graphics(800, 600, False)
SetClsColor(18, 24, 34)

Dim running As Boolean
Dim fontRef As Integer

fontRef = LoadFont("", 20)
running = True

Do
    Cls()
    DrawText(fontRef, 20, 20, "LunarBasic is running.")
    DrawText(fontRef, 20, 52, "Press ESC to close.")
    Flip()

    If KeyHit(KEY_ESC) Then
        running = False
    End If
Loop Until Not running

FreeFont(fontRef)

Run It

If Something Fails


Navigation: Outline | Next: Complete IDE Guide