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
{{ message }}
This repository was archived by the owner on Nov 5, 2024. It is now read-only.
<p><strong><i>type</i></strong> can be any of these: <strong>string, int, float, bool</strong> but also custom types (more on them <ahref="custom-types.html">here</a>)<br><strong><i>name</i></strong> can be any letters, numbers but not any "-" or " " in them<br><strong><i>mut</i></strong> is used to say if the variable is modifiable, basically saying if you can change the value or not. To make a variable editable you do: <code>mut type name = value</code> if not its just <code>type name = value</code></p>
45
+
<p>An example of defining a variable called name with the value "Kevin":<code>string name = "Kevin"</code></p>
46
+
<br>
47
+
<h2id="using-variables">Using Variables</h2>
48
+
<p>To use a variable you can simple just call its name, example:
49
+
<preclass="multiCode">
50
+
use writeln from @std.io
51
+
52
+
string name = "Kevin"
53
+
writeln(name)</pre>
54
+
<br>
55
+
Output:
56
+
<samp>Kevin</samp>
57
+
</p>
58
+
<p>To define a editable variable you can do: <preclass="multiCode">
0 commit comments