Skip to content

Commit b939157

Browse files
authored
Merge pull request #47 from aflacake/aflacake-contribution
Added explanation for docs
2 parents 33a510e + 9cfc285 commit b939157

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/syntax.MD

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Zumbra is a functional programming language, compiled and executed on top of a v
66

77
## Variables
88

9+
Containers for storing data or values ​​that can be used or modified.
10+
11+
Examples of variables in the Zumbra programming language:
12+
913
Zumbra uses `var` to declare variables. Assignment (and reassignment) is done with `<<`.
1014

1115
```zumbra
@@ -39,6 +43,8 @@ show(sub(30, 10)); // 20
3943

4044
## Flow Control
4145

46+
`if-else` in Zumbra programming language to make a decision in fulfillment is fulfilled (true) and run other code if it is not fulfilled or false.
47+
4248
### `if` and `else`
4349

4450
```zumbra
@@ -79,6 +85,8 @@ while (x < 3) {
7985

8086
## Operators
8187

88+
In the Zumbra programming language, operators are special symbols or characters used to perform operations or actions on values ​​(data) or variables. Just like mathematics.
89+
8290
Zumbra supports all common operators:
8391

8492
* Arithmetic: `+`, `-`, `*`, `/`, `%`
@@ -89,6 +97,8 @@ Zumbra supports all common operators:
8997

9098
## Collections
9199

100+
Data structures are used to store the values ​​of variables and process a set of data. Lets you store multiple values ​​in one variable, formatted in Zumbra language:
101+
92102
### Arrays
93103

94104
```zumbra
@@ -105,6 +115,8 @@ var dict << {"a": "v", "b": "o"};
105115

106116
## Output / Debugging
107117

118+
The results displayed by a program, usually after a process or calculation has been completed.
119+
108120
Use `show(...)` to display output:
109121

110122
```zumbra
@@ -118,6 +130,8 @@ show("{}"); // {}
118130

119131
## Comments
120132

133+
Comments in Zumbra programming language are to disable code, provide notes, or explain the purpose of the code. In other words, comments are parts of code that are not executed by the program.
134+
121135
Use `//` to write single-line comments:
122136

123137
```zumbra
@@ -127,7 +141,7 @@ var x << 1; // Inline comment
127141

128142
---
129143

130-
## Full Example
144+
## Full Example code of Zumbra programming language
131145

132146
```zumbra
133147
var x << 0;
@@ -140,4 +154,4 @@ while (x < 5) {
140154
}
141155
x << x + 1;
142156
}
143-
```
157+
```

0 commit comments

Comments
 (0)