You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/syntax.MD
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ Zumbra is a functional programming language, compiled and executed on top of a v
6
6
7
7
## Variables
8
8
9
+
Containers for storing data or values that can be used or modified.
10
+
11
+
Examples of variables in the Zumbra programming language:
12
+
9
13
Zumbra uses `var` to declare variables. Assignment (and reassignment) is done with `<<`.
10
14
11
15
```zumbra
@@ -39,6 +43,8 @@ show(sub(30, 10)); // 20
39
43
40
44
## Flow Control
41
45
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
+
42
48
### `if` and `else`
43
49
44
50
```zumbra
@@ -79,6 +85,8 @@ while (x < 3) {
79
85
80
86
## Operators
81
87
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
+
82
90
Zumbra supports all common operators:
83
91
84
92
* Arithmetic: `+`, `-`, `*`, `/`, `%`
@@ -89,6 +97,8 @@ Zumbra supports all common operators:
89
97
90
98
## Collections
91
99
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:
The results displayed by a program, usually after a process or calculation has been completed.
119
+
108
120
Use `show(...)` to display output:
109
121
110
122
```zumbra
@@ -118,6 +130,8 @@ show("{}"); // {}
118
130
119
131
## Comments
120
132
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
+
121
135
Use `//` to write single-line comments:
122
136
123
137
```zumbra
@@ -127,7 +141,7 @@ var x << 1; // Inline comment
127
141
128
142
---
129
143
130
-
## Full Example
144
+
## Full Example code of Zumbra programming language
0 commit comments