# Variables

Budgie allows for creating variables with the `variable` command. It requires the variable name, the type of the variable, and an optional default value.

> Untyped languages such as JavaScript will skip printing the variable type.
>
> Pythonic languages such as Python and Ruby will skip declaring variables without a default value.

```
comment line : Simple declarations
variable : foo string
variable : bar number 7

comment line : Assignments
variable : qux string foo
variable : baz number bar

comment line : Interesting values
variable : quux number infinity
variable : corge boolean true
```

In C#:

```csharp
// Simple declarations
string foo;
double bar = 7;

// Assignments
string qux = foo;
double baz = bar;

// Interesting values
double quux = double.PositiveInfinity;
bool corge = true;
```

In Python:

```python
# Simple declarations
bar = 7

# Assignments
qux = foo
baz = bar

# Interesting values
quux = inf
corge = True
```

## Types

As you saw from the interesting values above, some types such as infinity or true/false have aliases per language.

Built-in types will always be lower-case in Budgie. Uppercase types will always refer to user-defined classes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.budgielang.org/syntax/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
