Update examples
This commit is contained in:
parent
b64cdc4c71
commit
bc1cc99bcc
@ -5,8 +5,6 @@ fn array() -> [[[u16; 4]; 1]; 1] {
|
||||
}
|
||||
|
||||
fn main() -> u16 {
|
||||
let heehoo = 10;
|
||||
|
||||
let mut list = array();
|
||||
|
||||
list[0][0][3] = 5;
|
||||
|
@ -1,8 +0,0 @@
|
||||
// New types, type-casting
|
||||
|
||||
import std::print;
|
||||
|
||||
let text: string = "hello there!";
|
||||
let value: i16 = 123;
|
||||
|
||||
print(text + (value as string));
|
@ -6,11 +6,11 @@ fn indirection() -> bool {
|
||||
|
||||
fn main() -> u16 {
|
||||
let mut test = 5;
|
||||
let heehoo = 10;
|
||||
let addition = 10;
|
||||
|
||||
if indirection() {
|
||||
test = 11;
|
||||
}
|
||||
|
||||
return test + heehoo;
|
||||
return test + addition;
|
||||
}
|
||||
|
7
reid/examples/reid/strings.reid
Normal file
7
reid/examples/reid/strings.reid
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
fn main() -> u16 {
|
||||
let hello = "beep boop";
|
||||
|
||||
return 5;
|
||||
}
|
Loading…
Reference in New Issue
Block a user