# The Continue Statement

Another feature shortcoming of Lua is that it lacks the `continue` statement to jump back to the condition of the loop. This statement is essentially the opposite of the `break` statement and a feature that is found in most of today’s most popular programming languages. While the Lua creators have implemented a `goto` statement in more recent versions of Lua it is not as convenient as a `continue`.

```lua
while true do
   continue   -- Make an infinite loop
   print()    -- Never runs
end
```

Also, if continue is used in a `repeat...until` loop, it may not skip the local variable used in the loop condition. Code like this is invalid and will throw an error at compile time:

```lua
repeat
   continue     -- Compiler catches this!
   local a = 1
until a > 0
```


---

# 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.luaplusplus.org/language-improvements/the-continue-statement.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.
