Builtin index · Collections & strings
print(x, ...)
Input: x, ... · Output: no output
What it is
Each x is any value. Writes its arguments, space-separated, and a newline, to stdout.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
print(x, ...) | x —Each x is any value.... repeatablenot documented yet | no output | Writes its arguments, space-separated, and a newline, to stdout. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
print("Hello, Qu!")
output
Hello, Qu!
from quickstart
print("Hello, Qu!")
output
Hello, Qu!
from fundamentals
print("2==2: {2==2}, 2!=3: {2!=3}, true and false: {true and false}, true or false: {true or false}, not true: {not true}")
output
2==2: true, 2!=3: true, true and false: false, true or false: true, not true: false
from tour
Fs = 5 kHz # normalizes to 5000
dt = 50m # bare SI-magnitude prefix: 50 * 1e-3 = 0.05 (no base unit)
print("Fs = {Fs}, dt = {dt}")
output
warning: bare `m` means MILLI here, so `5 m` is 0.005, not 5 metres. Say which you mean with `m means meter` or `m means milli` (or use `mm`/`cm`/`km`, which are unambiguous). `ignore warning m` silences this Fs = 5 kHz, dt = 0.05
from fundamentals