diff options
| author | seh <henesy.dev@gmail.com> | 2019-02-25 13:49:59 -0600 |
|---|---|---|
| committer | seh <henesy.dev@gmail.com> | 2019-02-25 13:49:59 -0600 |
| commit | b91b86a9b63f3a767c8cbf9c46a794fb00a86883 (patch) | |
| tree | 905fe9520cdaa9fda6aef0fb1af4157a0a05d16c | |
| parent | a441e96695c14e570905835af9157b7b3d17e82e (diff) | |
add hello world
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | HelloWorld/hello.b | 15 | ||||
| -rw-r--r-- | README.md | 16 |
3 files changed, 33 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78af015 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.sbl +*.dis diff --git a/HelloWorld/hello.b b/HelloWorld/hello.b new file mode 100644 index 0000000..2621594 --- /dev/null +++ b/HelloWorld/hello.b @@ -0,0 +1,15 @@ +implement Hello; + +include "sys.m"; +include "draw.m"; + +Hello: module { + init: fn(nil: ref Draw->Context, nil: list of string); +}; + +init(nil: ref Draw->Context, nil: list of string) { + sys := load Sys Sys->PATH; + + sys->print("Hello World! ☺\n"); + exit; +} @@ -4,6 +4,22 @@ Programming examples in the spirit of [gobyexample](https://github.com/mmcgrana/ These exercises are tested on the [purgatorio](http://code.9front.org/hg/purgatorio/) fork of the Inferno operating system. +The `;` rune in examples indicates a command to be run from the Inferno sh(1) shell. + +## Building + +If a given example provides a mkfile: + + ; mk + +Otherwise, there will only be one file, a Limbo source file which can be built with: + + ; limbo file.b + +You could then run said file with: + + ; file + ## Index [Hello World](./HelloWorld) |
