More docs

This commit is contained in:
2026-05-10 16:34:54 +10:00
parent a7d55a9d33
commit bb3acc3f4a
22 changed files with 434 additions and 1 deletions

32
src/tutorial_variables.md Normal file
View File

@@ -0,0 +1,32 @@
# Variables
## Creating Variables
In Solstice, you can initialize a variable using the syntax:
```solstice
name = value
```
where:
* `name` is the name of your variable. You can use all letters in variable names, as well as underscores and numbers.
* The standard way to name your variables in Solstice is with `camelCase`.
* `value` is some sort of value. This value can be:
* an integer (number with no decimal place)
* a double (number with a decimal place)
* a string (collection of characters, as seen before)
* a character (a single letter)
* a boolean (either `true` or `false`)
We'll look at types of values in the next part.
## Recalling Variables
Recall a variable's content by using it's name:
```solstice
puts name
```
where `name` is the name of your variable.