ScripticXLearn programming visually
Platform
Problems
Community
Leaderboard
Learn
Docs
BasicsVariablesLoopsInput / Output
Examples
BasicsLoopsConditionsAlgorithms
What's newHelpContact
Loading…

Examples

MiniScript+

ExamplesMiniScript+
Fundamentals
Basic programsConditions
Programming patterns
LoopsAlgorithms
Examples/Basic programs

Basic programs

Small MiniScript+ programs for output, variables, calculations, and first decisions.

On this page
Display two messagesStore and display a valueCalculate a resultMake a decision

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.

MS+hello.mspMiniScript+
1PRINT "Hello"2PRINT "World"

Store and display a value#

The first instruction assigns a number; the second reads it.

MS+variable.mspMiniScript+
1score = 52PRINT score

Calculate a result#

Expressions can reuse earlier results.

MS+calculation.mspMiniScript+
1first = 5 + 32result = first * 23PRINT result

Expected output:

TXTPlain text
16

Make a decision#

The block runs only when the condition is true.

MS+decision.mspMiniScript+
1value = 102​3IF value > 5 THEN4  PRINT "Large"5END

Change value to 3 and run the program again. No message is displayed because the condition becomes false.

NextConditions

On this page

Display two messagesStore and display a valueCalculate a resultMake a decision