sub functions in PilotScript

Hi there.

I've just started to learn how to write my own scripts in PP. Is there a possibility to integrate sub functions in a PilotScript component?

eg:

#b := sub1(#c);

sub1( #c )
{
#x := #c*#c;
return #x;
}

Thanks,
Matthias