Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnabRollin committed Oct 9, 2023
1 parent 742d53c commit dc1bc7f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@

`dwn` is the interpreter for the Dawn programming language.

# Examples
## Examples

`code.dwn`
```dawn
say("Hello, world!")

```dwn
let username = (ask "What is your name? ") ; Asking the user their name...
say "Hello" username "!" ; Greet the user...
let myname = "ExamplePerson"
say "My name is" myname "."
say "1 - 1 is" (1 - 1)
say "The sum of 123 and 678 is" (sum 123 678)
say "100 + 0.5 is" (100 + 0.5)
```

```console
% dwn run code.dwn

Hello, world!
What is your name? ArnabRollin
Hello ArnabRollin!
My name is ExamplePerson.
1 - 1 is 0
The sum of 123 and 678 is 801
100 + 0.5 is 100.5
```
11 changes: 0 additions & 11 deletions src/examples/code.dwn

This file was deleted.

11 changes: 0 additions & 11 deletions src/examples/framework.fw

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[doc = include_str!("../README.md")]
#![doc = include_str!("../README.md")]
#[macro_use]
extern crate lazy_static;

Expand Down

0 comments on commit dc1bc7f

Please sign in to comment.