Update examples a little bit
This commit is contained in:
		
							parent
							
								
									836a532d8d
								
							
						
					
					
						commit
						7929a798af
					
				| @ -55,6 +55,7 @@ Smaller features: | ||||
| - Easier way to initialize arrays with a single value | ||||
| - Lexical scopes for Debug Information | ||||
| - ~~Only include standard library at all if it is imported~~ | ||||
| - Void-returns (`return;` for void-returning functions) | ||||
| 
 | ||||
| ### Why "Reid" | ||||
| 
 | ||||
|  | ||||
| @ -16,9 +16,9 @@ fn test() -> Test { | ||||
| fn main() -> u32 { | ||||
|   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]; | ||||
|  | ||||
| @ -1,7 +1,8 @@ | ||||
| import std::print; | ||||
| 
 | ||||
| fn main() -> i32 { | ||||
|     print("hello world"); | ||||
|     let test = "hello world"; | ||||
|     print(test); | ||||
| 
 | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user