> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/syntax_and_semantics/constructs/goto.md).

# Goto

The `goto` statement is the most basic form of unconditional transfer of control.

```ruby
var i = 0

@:INCR i += 1
say "#{i} squared = #{i * i}"
goto :INCR if (i < 10)

say "Program Completed."
```

#### Output

```
1 squared = 1
2 squared = 4
3 squared = 9
4 squared = 16
5 squared = 25
6 squared = 36
7 squared = 49
8 squared = 64
9 squared = 81
10 squared = 100
Program Completed.
```

However, the goto statements have been considered harmful by many computer scientists, notably Dijkstra, so try to avoid using it if possible.
