From c0f92795ac74c03815030765ee6645094146a407 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Fri, 2 Aug 2024 20:07:38 +0300 Subject: Initial commit --- src/main/resources/lv/enes/orang/prelude.orang | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/resources/lv/enes/orang/prelude.orang (limited to 'src/main/resources') diff --git a/src/main/resources/lv/enes/orang/prelude.orang b/src/main/resources/lv/enes/orang/prelude.orang new file mode 100644 index 0000000..36bf197 --- /dev/null +++ b/src/main/resources/lv/enes/orang/prelude.orang @@ -0,0 +1,20 @@ +def isRepl = __builtin_isRepl () +def len arrayOrString = __builtin_len arrayOrString +def parseInt stringOrInt = __builtin_parseInt stringOrInt +def print anything = __builtin_print anything +def printLn x = do print x; print "\n"; x end +def randInt min max = __builtin_randInt min max +def readInt _ = parseInt (readLn ()) +def readLn _ = __builtin_readLn () + +def _ = + if isRepl then do + printLn "Hello! This is the Orang Programming Language!"; + printLn "You can execute code right here at the prompt."; + printLn "If you wish to load & execute a file, use `:l filename.orang'."; + printLn "If you wish to quit, use `:q'."; + printLn "Have a nice day :)"; + printLn "" + end else + () + -- cgit v1.2.3