Update README
This commit is contained in:
43
README.md
43
README.md
@@ -38,26 +38,6 @@ main func {
|
||||
}
|
||||
```
|
||||
|
||||
Use `if` and `while` for control flow.
|
||||
|
||||
Note: Equality operators like `==`, `!=`, etc, etc aren't supported yet. This is a new project, after all.
|
||||
|
||||
```
|
||||
main func {
|
||||
if (true) {
|
||||
println("It's true!")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
main func {
|
||||
while (true) {
|
||||
println("To infinity and beyond!")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Set variables with `=`.
|
||||
|
||||
```
|
||||
@@ -75,6 +55,29 @@ main func {
|
||||
}
|
||||
```
|
||||
|
||||
Use `if` and `while` for control flow.
|
||||
|
||||
You can use the operators `==`, `!=`, `>`, `<`, `>=`, and `<=` to process data.
|
||||
|
||||
```
|
||||
main func {
|
||||
x = 5
|
||||
if (x == 5) {
|
||||
println("It's true!")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
main func {
|
||||
x = 0
|
||||
while (x < 1000) {
|
||||
x += 1
|
||||
println(x)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note: If you'd like you can do this:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user