program name and function name builtins

Hi

Is there a way to get the program/script name or function name usng built ins.

Like in many languages arg[0] holds the program name

regards

In unix shell.

SCRIPTNAME="`basename $0`"

Hope this is what you meant?

Hi

Thank you very much sir

regards