InfiniteScript Examples

See the language in action.

Explore small programs that demonstrate the core InfiniteScript syntax and the direction of the language.

01 · Basics

Hello World

The smallest possible InfiniteScript program.

Hello.infs
Say "Hello World!"
02 · Values

Variables

Store information and modify it later.

Local Storage Money = 100

Change Money by 50

Say Money
03 · Logic

Conditions

Let your program make decisions.

If Money > 100

    Say "Rich!"

Else

    Say "Keep earning."

End
04 · Loops

For Loop

Repeat code over a range of numbers.

For i = 1 to 5

    Say i

End
05 · Functions

Reusable Function

Create reusable behaviour with inputs.

Function GiveMoney Amount

    Change Money by Amount

    Return Money

End

GiveMoney 50
06 · Input

User Input

Collect information from the user.

Input PlayerName

Say PlayerName
07 · Random

Dice Roll

Generate a random number between two values.

Random Number Roll = 1 to 6

Say Roll
08 · Infinite UI

Native Application

Define a native Windows interface directly in InfiniteScript.

UI

    Window Main

        Title "Infinite App"

        Text Welcome
            Content "Welcome to InfiniteScript."
        End

        Button Start

            Text "Start"

            On Click

                Say "Started!"

            End

        End

    End

End

Want to learn how it works?

Start with the beginner tutorial or dive into the complete language documentation.

Start Tutorial → Documentation