diff options
| author | 2024-08-02 20:07:38 +0300 | |
|---|---|---|
| committer | 2024-08-02 20:07:38 +0300 | |
| commit | c0f92795ac74c03815030765ee6645094146a407 (patch) | |
| tree | f4ffef180bc2d79c399d9a809947223c212b60a6 /src/main/resources | |
| download | orang-c0f92795ac74c03815030765ee6645094146a407.tar.gz orang-c0f92795ac74c03815030765ee6645094146a407.tar.xz orang-c0f92795ac74c03815030765ee6645094146a407.zip | |
Initial commit
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/lv/enes/orang/prelude.orang | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ | |||
| 1 | def isRepl = __builtin_isRepl () | ||
| 2 | def len arrayOrString = __builtin_len arrayOrString | ||
| 3 | def parseInt stringOrInt = __builtin_parseInt stringOrInt | ||
| 4 | def print anything = __builtin_print anything | ||
| 5 | def printLn x = do print x; print "\n"; x end | ||
| 6 | def randInt min max = __builtin_randInt min max | ||
| 7 | def readInt _ = parseInt (readLn ()) | ||
| 8 | def readLn _ = __builtin_readLn () | ||
| 9 | |||
| 10 | def _ = | ||
| 11 | if isRepl then do | ||
| 12 | printLn "Hello! This is the Orang Programming Language!"; | ||
| 13 | printLn "You can execute code right here at the prompt."; | ||
| 14 | printLn "If you wish to load & execute a file, use `:l filename.orang'."; | ||
| 15 | printLn "If you wish to quit, use `:q'."; | ||
| 16 | printLn "Have a nice day :)"; | ||
| 17 | printLn "" | ||
| 18 | end else | ||
| 19 | () | ||
| 20 | |||