ExamplesBasic programs
Basic programs
Small MiniScript+ programs for output, variables, calculations, and first decisions.
On this page
These examples isolate one concept at a time. Open any block in the editor, run it, and then change its values.
Display two messages
PRINT displays one value per instruction.
hello.msp
PRINT "Hello"PRINT "World"Store and display a value
The first instruction assigns a number; the second reads it.
variable.msp
score = 5PRINT scoreCalculate a result
Expressions can reuse earlier results.
calculation.msp
first = 5 + 3result = first * 2PRINT resultExpected output:
Plain text
16Make a decision
The block runs only when the condition is true.
decision.msp
value = 10IF value > 5 THEN PRINT "Large"ENDChange
valueto3and run the program again. No message is displayed because the condition becomes false.