Update Examples
parent
1655558c29
commit
fef14c0476
11
Examples.md
11
Examples.md
@ -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
|
Loading…
Reference in New Issue
Block a user