Update examples a little bit

This commit is contained in:
Sofia 2025-07-21 20:23:37 +03:00
parent 836a532d8d
commit 7929a798af
3 changed files with 5 additions and 3 deletions

View File

@ -55,6 +55,7 @@ Smaller features:
- Easier way to initialize arrays with a single value - Easier way to initialize arrays with a single value
- Lexical scopes for Debug Information - Lexical scopes for Debug Information
- ~~Only include standard library at all if it is imported~~ - ~~Only include standard library at all if it is imported~~
- Void-returns (`return;` for void-returning functions)
### Why "Reid" ### Why "Reid"

View File

@ -16,9 +16,9 @@ fn test() -> Test {
fn main() -> u32 { fn main() -> u32 {
let mut value = test(); let mut value = test();
let mut a = value.second; let mut a = &mut value;
a[2] = 15; *a.second[2] = 15;
return value.second[2]; return value.second[2];

View File

@ -1,7 +1,8 @@
import std::print; import std::print;
fn main() -> i32 { fn main() -> i32 {
print("hello world"); let test = "hello world";
print(test);
return 0; return 0;
} }