you don't need, because you check it also in the function + it's an endless loop so it is enough if you just call the function:

Code:
function Rotate_me()
{
while (1)
{
if (key_a)
{
my.pan += 2 * time_step;
}
wait (1);
}
}

action rotate ()
{
Rotate_Me();
}