> 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/programming_tasks/p/pointers_and_references.md).

# Pointers and references

A simple example of passing a variable-reference to a function:

```ruby
func assign2ref(ref, value) {
    *ref = value
}
 
var x = 10
assign2ref(\x, 20)
say x      # x is now 20
```
