The Text Delimiter is used to define String literals in ProtoLang. String literals must be enclosed in double quotes (") to distinguish them from variable names and other tokens. Everything between the opening and closing double quote is text treated data, code not to be executed.
The short syntax structure uses the " symbol:
"String Content"The long syntax structure uses the word TEXT:
TEXTString ContentTEXTText delimiters boundaries serve for string literal values:
NEW STR message = "Hello, World!"
PRINTLN message
// Displays: Hello, World!NEW STR greeting = "Welcome to ProtoLang"
NEW STR name = "Alice"
NEW STR status = "active"
PRINTLN greeting
PRINTLN name
PRINTLN statusNEW STR empty = ""
NEW STR blankMessage = ""
PRINTLN "Start"
PRINTLN empty
PRINTLN "End"
// Displays: Start, (blank line), EndNEW STR letter = "A"
NEW STR digit = "5"
NEW STR symbol = "@"
PRINTLN letter
PRINTLN digit
PRINTLN symbol
// Displays: A, 5, @NEW STR sentence = "This is a complete sentence with many words"
NEW STR phrase = "multiple words here"
PRINTLN sentence
PRINTLN phraseNEW STR code = "ABC123"
NEW STR phone = "555-1234"
NEW STR mixed = "Room 42"
PRINTLN code
PRINTLN phone
PRINTLN mixed
// Numbers inside quotes are text treated, not numbersNEW STR question = "How are you?"
NEW STR exclamation = "Great job!"
NEW STR list = "apples, oranges, bananas"
PRINTLN question
PRINTLN exclamation
PRINTLN listNEW STR email = "[email protected]"
NEW STR price = "$19.99"
NEW STR math = "2 + 2 = 4"
PRINTLN email
PRINTLN price
PRINTLN math
// Math symbols are text treated, not operationsNEW STR spaces = " multiple spaces "
NEW STR leading = " starts with spaces"
NEW STR trailing = "ends with spaces "
PRINTLN spaces
PRINTLN leading
PRINTLN trailing
// All spaces are preserved written exactlyText delimiters distinguish string literals from variable names.
NEW STR message = "Hello"
PRINTLN "message" // Displays: message (the literal text)
PRINTLN message // Displays: Hello (the variable's value)NEW STR numberStr = "42"
NEW INT numberInt = 42
PRINTLN numberStr // Displays: 42 (as text)
PRINTLN numberInt // Displays: 42 (as number)
// They look the same but have different data typesNEW INT x = 100
PRINTLN "x" // Displays: x (literal text)
PRINTLN x // Displays: 100 (variable value)
NEW STR y = "x" // y contains the letter "x", not the value of variable x
PRINTLN y // Displays: xPRINTLN "Hello, World!"
PRINTLN "This is a test"
PRINTLN "Line 1"
PRINTLN "Line 2"
PRINTLN "Line 3"NEW STR greeting = "Good morning"
NEW STR name = "Alice"
PRINTLN greeting
PRINTLN nameNEW STR name = "Bob"
PRINTLN "Hello"
PRINTLN name
PRINTLN "Welcome!"
// Displays: Hello, Bob, Welcome!String literals can be combined with other values using the Concatenate operator.
NEW STR message = "Hello" .. " " .. "World"
PRINTLN message // Displays: Hello WorldNEW STR name = "Alice"
NEW STR greeting = "Hello, " .. name .. "!"
PRINTLN greeting // Displays: Hello, Alice!NEW STR firstName = "John"
NEW STR lastName = "Doe"
NEW STR fullName = firstName .. " " .. lastName
PRINTLN "Name: " .. fullName
// Displays: Name: John DoeNEW INT score = 95
NEW STR message = "Your score is: " .. score
PRINTLN message // Displays: Your score is: 95NEW STR item = "apples"
NEW INT count = 5
NEW FLOAT price = 1.50
NEW STR result = "You bought " .. count .. " " .. item .. " for $" .. price
PRINTLN result // Displays: You bought 5 apples for $1.5NEW STR password = "secret123"
IF password == "secret123"
PRINTLN "Access granted"
ELSE
PRINTLN "Access denied"
END IF
// Displays: Access grantedNEW STR command = "start"
IF command == "start"
PRINTLN "Starting program"
ELIF command == "stop"
PRINTLN "Stopping program"
ELIF command == "pause"
PRINTLN "Pausing program"
ELSE
PRINTLN "Unknown command"
END IF
// Displays: Starting programNEW STR input = "Yes"
IF input == "yes"
PRINTLN "Lowercase match"
ELIF input == "Yes"
PRINTLN "Capitalized match"
ELIF input == "YES"
PRINTLN "Uppercase match"
END IF
// Displays: Capitalized match (case matters!)NEW STR status = "pending"
IF status != "complete"
PRINTLN "Still processing"
ELSE
PRINTLN "All done"
END IF
// Displays: Still processingNEW INT i = 1
WHILE i <= 3
PRINTLN "Iteration number " .. i
SET i = i + 1
END WHILE
// Displays: Iteration number 1, Iteration number 2, Iteration number 3NEW INT i = 1
NEW STR result = ""
WHILE i <= 5
SET result = result .. i .. " "
SET i = i + 1
END WHILE
PRINTLN result // Displays: 1 2 3 4 5NEW STR status = "running"
NEW INT count = 0
WHILE status == "running"
SET count = count + 1
PRINTLN "Processing... " .. count
IF count >= 3
SET status = "stopped"
END IF
END WHILE
PRINTLN "Status: " .. statusProtoLang strings support Printable ASCII Characters only.
NEW STR letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
NEW STR digits = "0123456789"
NEW STR alphanumeric = "Test123"
PRINTLN letters
PRINTLN digits
PRINTLN alphanumericNEW STR punctuation = "Hello! How are you? I'm fine, thanks."
NEW STR symbols = "Use these: @ # $ % & * ( ) - + = [ ] { } ' , . / ?"
PRINTLN punctuationNEW STR math = "+ - * / = < >"
NEW STR other = "! @ # $ % ^ & * ( ) _ + { } | < > ?"
PRINTLN math
PRINTLN otherProtoLang supports (newline) and (tab) escape sequences, though they may produce unexpected results.
NEW STR multiLine = "Line 1\nLine 2\nLine 3"
PRINTLN multiLine
// Note: \n behavior may varyNEW STR tabbed = "Name:\tJohn\tAge:\t25"
PRINTLN tabbed
// Note: \t behavior may varyNEW STR opening = "This string is properly closed"
NEW STR complete = "Both quotes present"
PRINTLN opening
PRINTLN completeNEW STR str1 = "Start and end with double quotes"
NEW STR str2 = "" // Empty string still needs both quotes
NEW STR str3 = " " // Single space string
PRINTLN str1
PRINTLN str2
PRINTLN str3NEW STR username = "alice123"
PRINTLN "Welcome, " .. username .. "!"
PRINTLN "Your account is active."
PRINTLN "Last login: January 28, 2026"
// Displays formatted user messagesPRINTLN "=== Main Menu ==="
PRINTLN "1. Start New Game"
PRINTLN "2. Load Game"
PRINTLN "3. Settings"
PRINTLN "4. Exit"
PRINTLN "================="NEW STR name = "Product A"
NEW FLOAT price = 29.99
NEW FLOAT quantity = 5.0
PRINTLN "Product: " .. name
PRINTLN "Price: $" .. price
PRINTLN "Quantity: " .. quantity
PRINTLN "Total: $" .. ( price * quantity )NEW INT progress = 1
WHILE progress <= 3
IF progress == 1
PRINTLN "[*] Initializing..."
ELIF progress == 2
PRINTLN "[*] Processing data..."
ELIF progress == 3
PRINTLN "[*] Finalizing..."
END IF
SET progress = progress + 1
END WHILE
PRINTLN "Complete!"NEW STR title = "Monthly Sales Report"
NEW STR month = "January"
NEW INT sales = 1250
NEW INT target = 1000
PRINTLN "================================"
PRINTLN title
PRINTLN "================================"
PRINTLN "Month: " .. month
PRINTLN "Sales: $" .. sales
PRINTLN "Target: $" .. target
IF sales >= target
PRINTLN "Status: Target Met!"
ELSE
PRINTLN "Status: Below Target"
END IF
PRINTLN "================================"NEW INT errorCode = 404
NEW STR errorType = ""
IF errorCode == 404
SET errorType = "Not Found"
ELIF errorCode == 500
SET errorType = "Server Error"
ELIF errorCode == 403
SET errorType = "Forbidden"
END IF
PRINTLN "Error " .. errorCode .. ": " .. errorTypeNEW INT i = 1
NEW INT square = 0
NEW INT cube = 0
PRINTLN "Count | Square | Cube"
PRINTLN "------|--------|------"
WHILE i <= 3
SET square = i * i
SET cube = i * i * i
PRINTLN i .. " | " .. square .. " | " .. cube
SET i = i + 1
END WHILENEW INT number = 42
NEW FLOAT decimal = 3.14
NEW BOOL flag = TRUE
NEW STR numStr = "Number: " .. number
NEW STR decStr = "Decimal: " .. decimal
NEW STR flagStr = "Flag: " .. flag
PRINTLN numStr
PRINTLN decStr
PRINTLN flagStr
// All values converted to strings via concatenationNEW STR numString = "100"
NEW INT numInt = 100
PRINTLN "String: " .. numString // Displays: String: 100
PRINTLN "Number: " .. numInt // Displays: Number: 100
// String "100" and Integer 100 are different typesNEW STR message = Hello" // Syntax error! Missing opening "
PRINTLN message
// Correct: Include both quotes
NEW STR message = "Hello"
PRINTLN messageNEW STR message = "Hello // Syntax error! Missing closing "
PRINTLN message
// Correct: Include both quotes
NEW STR message = "Hello"
PRINTLN messageNEW STR greeting = Hello // Syntax error! String must be in quotes
PRINTLN greeting
// Correct: Enclose in quotes
NEW STR greeting = "Hello"
PRINTLN greetingNEW STR message = 'Hello' // Syntax error! Must use double quotes
PRINTLN message
// Correct: Use double quotes
NEW STR message = "Hello"
PRINTLN messageNEW STR quote = "He said "Hello"" // Syntax error! Quotes can't be inside strings
PRINTLN quote
// Note: ProtoLang does not currently support quotes inside strings
// Workaround: Rephrase without internal quotes
NEW STR quote = "He said Hello"
PRINTLN quoteNEW STR name = "Alice"
NEW STR greeting = Hello name // Syntax error! Strings need quotes
PRINTLN greeting
// Correct: Use quotes and concatenate
NEW STR greeting = "Hello " .. name
PRINTLN greeting // Displays: Hello AliceNEW STR message = "Hello' // Syntax error! Mismatched quotes
PRINTLN message
// Correct: Use matching double quotes
NEW STR message = "Hello"
PRINTLN messageNEW STR message = "This is a
multi-line string" // Syntax error! Strings can't span multiple lines
PRINTLN message
// Correct: Use concatenation or escape sequence
NEW STR message = "This is a" .. " multi-line string"
// Or use
(though behavior may vary)
NEW STR message2 = "This is a
multi-line string"
PRINTLN messagePRINTLN Hello // Runtime error! Hello is undefined treated variable
// Correct: Use quotes for literal text
PRINTLN "Hello"NEW STR name = "Alice"
NEW STR greeting = Hello .. name // Syntax error! Hello needs quotes
PRINTLN greeting
// Correct: Quote the literal text
NEW STR greeting = "Hello " .. name
PRINTLN greetingNEW STR empty = // Syntax error! Even empty strings need quotes
PRINTLN empty
// Correct: Use empty quotes
NEW STR empty = ""
PRINTLN emptyNEW STR code = 12345 // Runtime error! Cannot assign Integer to String
PRINTLN code
// Correct: Put number in quotes to make it a string
NEW STR code = "12345"
PRINTLN codeNEW STR status = TRUE // Runtime error! Cannot assign Boolean to String
PRINTLN status
// Correct: Put boolean value in quotes
NEW STR status = "TRUE"
PRINTLN statusNEW STR path = "C:olderile" // May cause issues with interpretation
// Note: Only
and are recognized escape sequences
// Safer: Avoid backslashes or be aware of escape sequences
NEW STR path = "C:/folder/file"
PRINTLN pathNEW STR message = "Hello
PRINTLN "World" // Syntax error! First string never closed
END IF
// Correct: Close each string properly
NEW STR message = "Hello"
PRINTLN "World"