Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

print

use Core.print

The print core module provides several print functions. Here are all the print functions this module provides. There exist a lot of builtin print overloads for the print function.

Parameter TypesReturn TypesCan Throw?
strvoidNo
i32voidNo
i64voidNo
u32voidNo
u64voidNo
f32voidNo
f64voidNo
u8voidNo
boolvoidNo

Note that none of the print functions prints a new line after the print. This could be important when printing values in a loop, for example, because calling a "native" print function like print(i32) is generally speaking faster than calling the print(str) function with an interpolated string as argument, as string casting + concatenation takes more time than just calling the specialized print functions one after another. So, while string interpolation is much more ergonomic for the programmer, its is also a bit slower generally speaking.

The print(str) function was used throughout this wiki until now. Every string interpolation evaluates to a string value, so this is the function we have called exclusively thus far, to make printing not as overwhelming.