Skip to content

Commit b570da4

Browse files
authored
Update README.md
Fix inaccurate information about jazzy source files
1 parent d24b540 commit b570da4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,27 @@ jazzy currently only supports collections of variable assignments and expression
4040
4141
=^..^=
4242
```
43-
or create a `.jzy` file with a single expression in it:
43+
or create a `.jzy` file with a series of statements and expressions:
4444
```
45-
// in file expression.jzy
46-
1 < 3 and 99 >= 100
45+
// in file test.jzy
46+
let bool-val := true;
47+
bool-val and (1 <= 99)
4748
```
4849
and invoke the compiler on it:
4950
```
50-
$ jazzy expression.jzy
51-
false
51+
$ jazzy test.jzy
52+
true
5253
```
5354

55+
The final line of the file must be an expression in order for a value to be displayed when executing it. Any expressions that take place earlier in the file will simply be ignored.
56+
5457
### Variables
5558
Variables can be declared as such:
5659
```
5760
let x := 1;
5861
```
5962

60-
The name of your variable is called an "identifier". The idiomatic style for jazzy variable identifiers is not snake case or camel case, like in a lot of common programming languages, but what many people call "kebab case":
63+
The name of your variable is called an "identifier". The idiomatic style for jazzy variable identifiers is not snake case or camel case, like in a lot of common programming languages, but "kebab case":
6164
```
6265
let some-variable := 3.14;
6366
```

0 commit comments

Comments
 (0)