---
title: "Variables"
source: reference-book
version: genesis-0-1-0
id: reference-book/Variables
canonical: https://simorg.tech/docs/reference-book/Variables/
agent_guide: https://simorg.tech/agent-resources/simorg-gem.md
---

Variables are **event markers**, not memory owners.
A variable does nothing on its own: it vibrates only when an **event** reaches it. Variables are fixed parts of your program's structure.

Use <<<$>>> before an identifier to make it a variable, 

```
"Hello World!" $myFirstVar
myFirstVar ?
```
In the above example the value literal <<<Hello World!>>> vibrates as soon as our application starts. That is our initializer event: it flows into <<<myFirstVar>>>, which vibrates in turn. Events always flow left to right.

$$$EventFlow kind=vibration$$$

### Value Literals

Simorg's runtime infers the type and runtime doesn't need any type definition. 

| Form | Example | Meaning |
|------|---------|---------|
| Buffer | <<<0x01>>> | raw bytes (hex) |
| Number | <<<10>>> | integer or decimal |
| String | <<<"Hello">>> | text |

Empty Values are valid Events — they represent emptiness, not null or void,

```
0      // empty number
0.0    // empty decimal
0x     // empty buffer
""     // empty string
```
Emptiness can be checked using <<<Truthy Operator &>>>. It will be discussed later under <<<Event Flow>>> section.

Simorg doesn't have any concept related to nullity e.g. <<<undefined>>>, <<<null>>>, <<<nil>>>, <<<Option>>>, <<<Maybe>>> and others.

Escape sequences including, <<<\n>>> (newline), <<<\r>>> (carriage return), <<<\t>>> (tab) are supported inside String values.

It's also possible to insert a value into a string using <<<{}>>> placeholder

```
100 "number {} is now embedded" ?
```

Using <<<\>>> before <<<{}>>> will disable this behavior.

