awk , function call problem

#!/bin/bash
awk '
function ad(t,r){
    return (t+r);
}
BEGIN{
    print ad(5,3);
    }
    {
    print ad(5,3);
    }
'

Doesn't print anything for the last print ad(5,3);

It will if you give it some input.

Why does it wait for input?
How can I call that function without giving inputs from terminal?

Put an exit in the BEGIN block and remove the second block.

In some versions, just removing the second block will be enough.

Is it possible to call that function not inside the BEGIN or END block(outside the BEGIN and END block) to get the same result?

Any block other than BEGIN or END will always wait for input.
That's its purpose.

The only way to prevent it is to have exit in the BEGIN block. (In which case, why have another block?)

Thank you.