disp
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.
i = 2
xs = [10, 20, 30]
print(i < length(xs) and xs[i] > 0) # true -- short-circuiting guard
print(-1 mod 3) # 2 -- sign of the divisor
disp("disp, echo, writeline, and print are the same function")
echo("this line came from echo(...)")
writeline("and this one from writeline(...)")
print(type(3.5)) # "number"
print(type("hi")) # "string"
print(shape([1, 2, 3])) # [3, 1]
output
true 2 disp, echo, writeline, and print are the same function this line came from echo(...) and this one from writeline(...) number string [3, 1]
from collections-strings