PRINT

PRINT and its syntactic sugar :: (followed by a space) is used in SunSed to output values.

Strings

To output a string you simply need to feed the string to the PRINT function or it's shorthand (::). From here on we will use the shorthand when outputting values.

PRINT("Hello World")
// OR
:: "Hello World"

Newlines

New lines will be automatically removed. If you want to keep the newlines please use html:pre.

:: "Hi there,
This text is on a newline."
#=> "Hi there, This text is on a newline."

Expressions

New lines will be automatically removed. If you want to keep the newlines, use html:pre.

:: "Hi there,
This text is on a newline."
#=> "Hi there, This text is on a newline."

Non-String Expressions

PRINT cannot outputting non-string expressions values and will result an error.

:: ["user_id" => 1, "user_name" => "Alex"]
#=> ERROR: uncaught_error_on_execute -- Array to string conversion
Copyright © SunSed LLC 2013-2022 All rights reserved.