Update Examples
parent
45e7b32a79
commit
1f3cf774da
@ -8,6 +8,7 @@ This page selects some example programs from "Rust by Example" and shows their i
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
```
|
```
|
||||||
// Many comments from the Rust by Example version have been removed
|
// Many comments from the Rust by Example version have been removed
|
||||||
fn main() {
|
fn main() {
|
||||||
@ -15,14 +16,18 @@ fn main() {
|
|||||||
println!("Hello World!");
|
println!("Hello World!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
</td><td>
|
</td><td>
|
||||||
|
|
||||||
```
|
```
|
||||||
// Many comments from the Rust by Example version have been removed
|
// Many comments from the Rust by Example version have been removed
|
||||||
fn main
|
fn main
|
||||||
// Print text to the console.
|
// Print text to the console.
|
||||||
println! "Hello World!"
|
println! "Hello World!"
|
||||||
```
|
```
|
||||||
|
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
|
|
||||||
#### Formatted print
|
#### Formatted print
|
||||||
(Skipping for now because we likely want "f-strings" in Husht, which require some thought/design.)
|
(Skipping for now because we likely want "f-strings" in Husht, which require some thought/design.)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user