No, I suggested you to return varchar2 (from function) for using with VARIABLE command when declaring a varchar2 variable in sql*plus. But it's not necessary, as I told you, functions generally are used in IF statements and SQL, why do you want to declare a sql*plus variable for holding a function return? Your first script works fine the way indian2000 suggested.

F.