From dbd5627fe6029b827eff919b684abe2513edf033 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 26 Aug 2022 18:19:45 +0200 Subject: [PATCH] Update examples --- examples/error.sp | 2 +- examples/file.sp | 2 +- examples/float128.sp | 2 +- examples/hello-world.sp | 2 +- examples/input.sp | 2 +- examples/new-syntax.sp | 2 +- examples/variables.sp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/error.sp b/examples/error.sp index 665741e..949e123 100644 --- a/examples/error.sp +++ b/examples/error.sp @@ -1,5 +1,5 @@ const { exit } from @'core/os'; -let @main in { +let @main : i32 in { exit(1); } \ No newline at end of file diff --git a/examples/file.sp b/examples/file.sp index f05574a..36d6a47 100644 --- a/examples/file.sp +++ b/examples/file.sp @@ -1,7 +1,7 @@ const io from @'core/io'; const { open } from @'core/fs'; -let @main in { +let @main : i32 in { io.out('What is your name? '); let name = io.in(); let file = open('name.txt'); diff --git a/examples/float128.sp b/examples/float128.sp index e0421f2..9ba7d43 100644 --- a/examples/float128.sp +++ b/examples/float128.sp @@ -2,7 +2,7 @@ const io from @'core/io'; const { concat } from @'core/string'; const { toString } from @'core/float_utils'; -let @main in { +let @main : i32 in { let float1 : f128 = 234.6; f128 float2 : f128 = 2934748348291930404.5; io.outln(concat('Result is: ',toString(float1 + float2))); diff --git a/examples/hello-world.sp b/examples/hello-world.sp index 31037d1..9cad1a9 100644 --- a/examples/hello-world.sp +++ b/examples/hello-world.sp @@ -1,5 +1,5 @@ const io from @'core/io'; -let @main in { +let @main : i32 in { io.outln('Hello world!'); } \ No newline at end of file diff --git a/examples/input.sp b/examples/input.sp index d83ceae..e420b86 100644 --- a/examples/input.sp +++ b/examples/input.sp @@ -1,6 +1,6 @@ const io from @'core/io'; -let @main in { +let @main : i32 in { io.out('What\'s your name? '); let name = io.in(); io.out('Hello, '); diff --git a/examples/new-syntax.sp b/examples/new-syntax.sp index f7e3b2d..dac2f22 100644 --- a/examples/new-syntax.sp +++ b/examples/new-syntax.sp @@ -2,7 +2,7 @@ const { io } from @'core/io'; const good_food : String = 'watermelon'; -let @main in { +let @main : i32 in { io.outln('Hello world!'); diff --git a/examples/variables.sp b/examples/variables.sp index 7c2f4c7..96e9762 100644 --- a/examples/variables.sp +++ b/examples/variables.sp @@ -1,6 +1,6 @@ const io from @'core/io'; -let @main in { +let @main : i32 in { let age : i32 = 64; io.out('I am '); io.out(age);