Update Examples

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

@ -1,6 +1,6 @@
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.) 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 version have been removed // Many comments from the Rust by Example version have been removed
fn main() { fn main() {
@ -15,3 +15,8 @@ fn main
// Print text to the console. // Print text to the console.
println! "Hello World!" println! "Hello World!"
``` ```
#### Formatted print
(Skipping for now because we likely want "f-strings" in Husht, which require some thought/design.)
### Primitives