The Concatenate General Operator is used to combine multiple values into a single String. Unlike Arithmetic Operators which only work with numeric types, the Concatenate operator can combine any Data Type - including Booleans, Integers, Floats, and Strings - into a single string value.
The short syntax structure uses the .. symbol:
PRINT VALUE .. VALUEThe long syntax structure uses the word CONCATENATE:
PRINT VALUE CONCATENATE VALUEThe most common use of Concatenate is to combine multiple strings into one.
NEW STR greeting = "Hello" .. " " .. "World"
PRINTLN greeting // Displays "Hello World"NEW STR firstName = "John"
NEW STR lastName = "Doe"
NEW STR fullName = firstName .. " " .. lastName
PRINTLN fullName // Displays "John Doe"NEW STR subject = "The cat"
NEW STR verb = "sat"
NEW STR object = "on the mat"
NEW STR sentence = subject .. " " .. verb .. " " .. object .. "."
PRINTLN sentence // Displays "The cat sat on the mat."The Concatenate operator automatically converts non-string values to strings when combining them.
NEW INT age = 25
NEW STR message = "I am " .. age .. " years old"
PRINTLN message // Displays "I am 25 years old"NEW FLOAT price = 19.99
NEW STR label = "Price: $" .. price
PRINTLN label // Displays "Price: $19.99"NEW BOOL isActive = TRUE
NEW STR status = "Active: " .. isActive
PRINTLN status // Displays "Active: TRUE"NEW STR name = "Alice"
NEW INT age = 30
NEW FLOAT height = 5.6
NEW BOOL isStudent = FALSE
NEW STR info = name .. " is " .. age .. " years old, " .. height .. " feet tall. Student: " .. isStudent
PRINTLN info // Displays "Alice is 30 years old, 5.6 feet tall. Student: FALSE"You can concatenate the results of Expressions directly.
NEW INT x = 10
NEW INT y = 5
NEW STR result = "Sum: " .. ( x + y ) .. ", Product: " .. ( x * y )
PRINTLN result // Displays "Sum: 15, Product: 50"NEW INT a = 5
NEW INT b = 10
NEW STR comparison = a .. " < " .. b .. " is " .. ( a < b )
PRINTLN comparison // Displays "5 < 10 is TRUE"Concatenate is commonly used directly in Print and PrintLn commands.
NEW INT score = 95
PRINTLN "Your score is: " .. score // Displays "Your score is: 95"NEW STR username = "Alice"
NEW INT points = 1000
PRINTLN "Welcome back, " .. username .. "! You have " .. points .. " points."
// Displays "Welcome back, Alice! You have 1000 points."You can chain multiple Concatenate operators to combine many values.
NEW STR a = "A"
NEW STR b = "B"
NEW STR c = "C"
NEW STR d = "D"
NEW STR alphabet = a .. b .. c .. d
PRINTLN alphabet // Displays "ABCD"NEW STR day = "Monday"
NEW STR month = "January"
NEW INT date = 22
NEW INT year = 2026
NEW STR fullDate = day .. ", " .. month .. " " .. date .. ", " .. year
PRINTLN fullDate // Displays "Monday, January 22, 2026"It's important to distinguish between Concatenate (..) for strings and Plus (+) for arithmetic.
NEW INT x = 5
NEW INT y = 3
NEW INT sum = x + y // Plus operator: adds numbers
NEW STR combined = x .. y // Concatenate operator: creates string
PRINTLN sum // Displays "8"
PRINTLN combined // Displays "53"NEW INT counter = 1
WHILE counter <= 5
PRINTLN "Item " .. counter
SET counter = counter + 1
END WHILE
// Displays:
// Item 1
// Item 2
// Item 3
// Item 4
// Item 5NEW STR productName = "Widget"
NEW FLOAT quantity = 100.0
NEW FLOAT price = 9.99
NEW FLOAT total = quantity * price
PRINTLN "Product: " .. productName
PRINTLN "Quantity: " .. quantity
PRINTLN "Price: $" .. price
PRINTLN "Total: $" .. totalNEW STR greeting = "Hello" + "World" // Type error! Use .. for strings, not +
NEW STR greeting = "Hello" .. "World" // Correct! Concatenate operator works with stringsNEW INT result = 5 .. 3 // Type error! .. produces String, not Integer
NEW INT result = 5 + 3 // Correct! + performs arithmetic
NEW STR combined = 5 .. 3 // Correct! .. creates string "53"NEW STR fullName = "John" .. "Doe"
PRINTLN fullName // Displays "JohnDoe" (no space!)
NEW STR fullName = "John" .. " " .. "Doe"
PRINTLN fullName // Displays "John Doe" (with space)