Echo Writes Code

proc.orchid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- An Orchid program demonstrating the use of the `proc!` keyword.

import! orchid.console;
import! orchid.string;

main! {
	-- Calls a procedure, discarding its return value.
	call! greet "Orchid";
}

-- Defines a new impure procedure.
proc! greet (name: String) -> None {
	call! console.write_line (string.combine "Hello, " name);
}