Builtin

print

print(args)

Prints the concatenated string of the args to the console, separated by a space and ending with a line feed (\n).

Within a string argument, expressions between « and » will first be evaluated using the Ra interpreter, e.g.

print("The value of 3+4 is «3+4»")
would display:

The value of 3+4 is 7

Such expressions can be followed by an optional format string starting with a :, typically followed by an optional width, optional precision and a format type:

e.g. :8.2f

Examples

Comma separated string constants
print("Hello", "world")
Hello world

String interpolation with an integer variable
x:=42
print("The value of x is «x»")
The value of x is 42

String interpolation with a float, using the default precision
import("maths")
print("The value of e is «maths.e»")
The value of e is 2.72

String interpolation with a float, using a format string to show 4 decimal places
import("maths")
print("The value of e is «maths.e:.4f»")
The value of e is 2.7183

String interpolation with a time, using a format string to show as dd/mm/yyyy HH:MM:SS
Time mappings are:
x:=@2026-04-01T22:21:43Z
print("The value of x with no formatting is", x)
print("The value of x is «x:02/01/2006 15:04:05t»")
The value of x with no formatting is 2026-04-01T22:21:43Z 
The value of x is 01/04/2026 22:21:43
String interpolation with a string, using a format string to show padding to 10 characters
x:="fortytwo"
print("The value of x is «x:10s»")
The value of x is   fortytwo