Update examples
This commit is contained in:
parent
26a8953060
commit
dbd5627fe6
@ -1,5 +1,5 @@
|
|||||||
const { exit } from @'core/os';
|
const { exit } from @'core/os';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
const io from @'core/io';
|
const io from @'core/io';
|
||||||
const { open } from @'core/fs';
|
const { open } from @'core/fs';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
io.out('What is your name? ');
|
io.out('What is your name? ');
|
||||||
let name = io.in();
|
let name = io.in();
|
||||||
let file = open('name.txt');
|
let file = open('name.txt');
|
||||||
|
@ -2,7 +2,7 @@ const io from @'core/io';
|
|||||||
const { concat } from @'core/string';
|
const { concat } from @'core/string';
|
||||||
const { toString } from @'core/float_utils';
|
const { toString } from @'core/float_utils';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
let float1 : f128 = 234.6;
|
let float1 : f128 = 234.6;
|
||||||
f128 float2 : f128 = 2934748348291930404.5;
|
f128 float2 : f128 = 2934748348291930404.5;
|
||||||
io.outln(concat('Result is: ',toString(float1 + float2)));
|
io.outln(concat('Result is: ',toString(float1 + float2)));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const io from @'core/io';
|
const io from @'core/io';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
io.outln('Hello world!');
|
io.outln('Hello world!');
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
const io from @'core/io';
|
const io from @'core/io';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
io.out('What\'s your name? ');
|
io.out('What\'s your name? ');
|
||||||
let name = io.in();
|
let name = io.in();
|
||||||
io.out('Hello, ');
|
io.out('Hello, ');
|
||||||
|
@ -2,7 +2,7 @@ const { io } from @'core/io';
|
|||||||
|
|
||||||
const good_food : String = 'watermelon';
|
const good_food : String = 'watermelon';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
|
|
||||||
io.outln('Hello world!');
|
io.outln('Hello world!');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const io from @'core/io';
|
const io from @'core/io';
|
||||||
|
|
||||||
let @main in {
|
let @main : i32 in {
|
||||||
let age : i32 = 64;
|
let age : i32 = 64;
|
||||||
io.out('I am ');
|
io.out('I am ');
|
||||||
io.out(age);
|
io.out(age);
|
||||||
|
Loading…
Reference in New Issue
Block a user