Update Examples

Glen Whitney 2024-08-21 16:57:14 +00:00
parent 1655558c29
commit fef14c0476

@ -1,8 +1,8 @@
This page selects some example programs from "Rust by Example" and shows their intended Husht equivalents. (Of course, the details of the syntax on the Husht side may vary.)
#### Hello World
### Hello World
```
// Many comments from the Rust by Example versionhave been removed
// Many comments from the Rust by Example version have been removed
fn main() {
// Print text to the console.
println!("Hello World!");
@ -10,8 +10,13 @@ fn main() {
```
<->
```
// Many comments from the Rust by Example versionhave been removed
// Many comments from the Rust by Example version have been removed
fn main
// Print text to the console.
println! "Hello World!"
```
#### Formatted print
(Skipping for now because we likely want "f-strings" in Husht, which require some thought/design.)
### Primitives