Open Sage

ScriptBasic => Language Features => Topic started by: root on May 12, 2026, 02:28 PM

Title: ScriptBasic Syntax
Post by: root on May 12, 2026, 02:28 PM
This thread will show some of the enhanced language features of ScriptBasic. With VBScript being deprecated by Microsoft, ScriptBasic is the only embedded BASIC scripting language available going forward.

Variables

In ScriptBasic, you don't declare types — the interpreter assigns and converts them automatically based on usage, making it dynamically typed but with predictable conversion rules. Variables are stored as a variant with the following internal types.

These examples show how type is assigned at use. The & symbol indicates concatenating of strings.

a = 1
b = 2
c = "3"
d = "4"

PRINT a + b
PRINT a & b
PRINT c + d
PRINT c & d

Output:

3
12
7
34