it seems that the first time IDL 'compile' recFun function,
it consider recFun (in the code it is a function) a variable and on
run it does not find it.
if I recompile the source, recFun is now in the table of the functions
and it works.
as a workaround I compile the source twice and it works, but I don't
like this.
I am sure there is something I have not considered.

I don't remember well, but 5.3 would have a mechanism in compiling to
avoid this.
Is it true?
Oh oh........ but I am working with 5.2 (to use ENVI 3.2).