Cannot take the pointer address of proc

Hello everyone,

Started playing with odin, and got a question. This program

package main

myproc :: proc(x: int) -> int {
    return x + 1
}

main :: proc() {

    myproc_ptr := &myproc
    x := myproc_ptr^(5)
}

gives me the error

Error: Cannot take the pointer address of ‘myproc’
myproc_ptr := &myproc
^

What am I missing here ?
Thanks for the help.

Procs will already behave like pointers when you use their names as values, so you just want:

main :: proc() {
    myproc_ptr := myproc
    x := myproc_ptr(5)
}

With & you’d be trying to make a double pointer, but there isn’t a static pointer to be the in-between.

Wow. Thanks a lot for the quick reply.