8
8
- [ Syntax] ( #syntax )
9
9
* [ Syntax Overview] ( #syntax-overview )
10
10
* [ Commands Built-In] ( #commands-built-in )
11
- - [ Examples] ( #examples )
12
- * [ Hello World] ( #hello-world )
13
- * [ Get User's Name and Age and then Display Information] ( #get-user-s-name-and-age-and-then-display-information )
14
- * [ Example GUI] ( #example-gui )
11
+ - [ Variables] ( #variables )
12
+ * [ Creating a variable] ( #creating-a-variable )
13
+ * [ Calling a variable] ( #calling-a-variable )
15
14
- [ Modifications] ( #modifications )
16
15
* [ libguimod] ( #libguimod )
17
16
- [ Conditions and Loops] ( #conditions-and-loops )
22
21
- [ Functions] ( #functions )
23
22
* [ Creating a function] ( #creating-a-function )
24
23
* [ Calling a function] ( #calling-a-function )
24
+ - [ Examples] ( #examples )
25
+ * [ Hello World] ( #hello-world )
26
+ * [ Get User's Name and Age and then Display Information] ( #get-user-s-name-and-age-and-then-display-information )
27
+ * [ Example GUI] ( #example-gui )
25
28
26
29
---
27
30
@@ -56,32 +59,29 @@ command argument1 argument2 argument3...
56
59
57
60
---
58
61
59
- ## Examples
60
- ### Hello World
61
-
62
+ ## Variables
63
+ ### Creating a variable
62
64
```
63
- putln Hello World!
65
+ Types:
66
+ - string (s, str, or string can be used to declare a string)
67
+ - intiger (i, int, or intiger can be used to declare an intiger)
64
68
```
65
- ### Get User's Name and Age and then Display Information
69
+ Syntax for creating a variable:
66
70
```
67
- getinput Please Enter your Name:
68
- name = inputresult
69
- getinput Please Enter your Age:
70
- age = inputresult
71
- putln Hello {name}, you are {age}.
71
+ type varname = varvalue
72
72
```
73
73
74
- ### Example GUI
74
+ ### Calling a variable
75
+ To call a varible, use ` {varname} ` , for example:
75
76
```
76
- #addmod libguimod
77
- BEGIN examplefunc
78
- putln Hello World
79
- gui setup examplegui
80
- gui createlabel Click the Button Below to Display Hello World in Terminal
81
- gui createbutton examplefunc Click Here for Hello World in Terminal
82
- gui createbutton nocmd Click Here for Absolutely Nothing (also a feature of C+)
83
- gui run
77
+ str name = James
78
+ putln Hello, {name}, have a nice day!
79
+ ```
80
+ then the output will be:
81
+ ```
82
+ Hello, James, have a nice day!
84
83
```
84
+
85
85
---
86
86
87
87
## Modifications
@@ -97,6 +97,9 @@ libguimod is a modification that allows you to build gui applications.
97
97
` gui createbutton ` - Creates a button inside main window. Uses arg1 as command (nocmd for no command), uses arg2 to end for button text.
98
98
99
99
` gui run ` - Runs the GUI.
100
+
101
+ ---
102
+
100
103
## Conditions and Loops
101
104
C+ Features If, For, Forever, and While Loops.
102
105
@@ -130,6 +133,8 @@ WHILE condition
130
133
Do Something
131
134
```
132
135
136
+ ---
137
+
133
138
## Functions
134
139
Functions are an essencial part of programming, it is a group of reuseable commands that can be called using only one command.
135
140
@@ -146,6 +151,35 @@ To call a function, just put the function name on a line like so.
146
151
function_name
147
152
```
148
153
154
+ ---
155
+
156
+ ## Examples
157
+ ### Hello World
158
+
159
+ ```
160
+ putln Hello World!
161
+ ```
162
+ ### Get User's Name and Age and then Display Information
163
+ ```
164
+ getinput Please Enter your Name:
165
+ s name = inputresult
166
+ getinput Please Enter your Age:
167
+ s age = inputresult
168
+ putln Hello {name}, you are {age}.
169
+ ```
170
+
171
+ ### Example GUI
172
+ ```
173
+ #addmod libguimod
174
+ BEGIN examplefunc
175
+ putln Hello World
176
+ gui setup examplegui
177
+ gui createlabel Click the Button Below to Display Hello World in Terminal
178
+ gui createbutton examplefunc Click Here for Hello World in Terminal
179
+ gui createbutton nocmd Click Here for Absolutely Nothing (also a feature of C+)
180
+ gui run
181
+ ```
182
+
149
183
---
150
184
<br >
151
185
<div style =" text-align : center ;" ><small >Copyright (c) 2022 Jiusoft</small ></div >
0 commit comments