proc.orchid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- An Orchid program demonstrating the use of the `proc!` keyword. import! orchid.console; main! { -- Any procedure can be invoked via the `call! PROC [ARGS...]` statement. call! silly_say "Hello, Orchid"; } -- The `proc! NAME (ARG: TYPE...) -> RET { CODE... }` statement defines a new procedure, which is -- very similar to a function from C-like languages. This type of object is called a procedure in -- Orchid because functions are something different. proc! silly_say (message: String) -> None { call! console.write_line message; }