# Função do range

Retorna uma lista contendo uma progressão aritmética de inteiros:

{% for i in range(0, 3) %}\
{{ i }},\
{% endfor %}

{# outputs 0, 1, 2, 3, #}

\
Quando step é fornecido (como o terceiro parâmetro), ele especifica o incremento (ou decremento para valores negativos):

{% for i in range(0, 6, 2) %}\
{{ i }},\
{% endfor %}

{# outputs 0, 2, 4, 6, #}

### **Observação**

\
Observe que se o início for maior que o final, range assume uma etapa de -1:

{% for i in range(3, 0) %}\
{{ i }},\
{% endfor %}

{# outputs 3, 2, 1, 0, #}

&#x20;O ..operador embutido Twig é apenas um açúcar sintático para a range função (com um passo de 1, ou -1se o início for maior que o final):

{% for i in 0..3 %}\
{{ i }},\
{% endfor %}

**Dica:**

\
A função range funciona como a função de intervalo nativa do PHP .

### **Argumentos**

* low: O primeiro valor da sequência.
* high: O maior valor possível da sequência.
* step: O incremento entre os elementos da sequência.

&#x20;Ficou com alguma dúvida? Entre em contato através do nosso chat online.


---

# 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://ajuda.iset.com.br/inicio/minha-loja/personalizacao/personalizacao-avancada-cms/funcao-do-range.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.
