aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.sloth
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello.sloth')
-rw-r--r--examples/hello.sloth18
1 files changed, 3 insertions, 15 deletions
diff --git a/examples/hello.sloth b/examples/hello.sloth
index 8f42051..5aa54e9 100644
--- a/examples/hello.sloth
+++ b/examples/hello.sloth
@@ -1,19 +1,7 @@
fn main() Int {
- var x: [Int] = [5];
- vpopi(x);
- var i: Int = 0;
- while i < 100 {
- vpushi(x, randGen(0, 100));
- i = i + 1;
+ var i: Int = 10;
+ for j in 0..i {
+ print(istr(j));
}
-
- var y: Int = vgeti(x, 42);
- var y: Int = vgeti(x, 45);
- var y: Int = vgeti(x, 41);
- var y: Int = vgeti(x, 49);
- println(istr(y));
-
-
- print("Hello World\n");
return 0;
}