Update examples

This commit is contained in:
apio 2022-08-26 18:19:45 +02:00
parent 26a8953060
commit dbd5627fe6
7 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
const { exit } from @'core/os';
let @main in {
let @main : i32 in {
exit(1);
}

View File

@ -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');

View File

@ -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)));

View File

@ -1,5 +1,5 @@
const io from @'core/io';
let @main in {
let @main : i32 in {
io.outln('Hello world!');
}

View File

@ -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, ');

View File

@ -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!');

View File

@ -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);