From 45e7b32a79756a1b49b3c05b903f61ec48571244 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Wed, 21 Aug 2024 17:11:29 +0000 Subject: [PATCH] Update Examples --- Examples.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Examples.md b/Examples.md index 1e66644..c15b98a 100644 --- a/Examples.md +++ b/Examples.md @@ -1,6 +1,13 @@ 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 + + + + + + +
RustHusht
``` // Many comments from the Rust by Example version have been removed fn main() { @@ -8,14 +15,14 @@ fn main() { println!("Hello World!"); } ``` -<-> + ``` // 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.)