Up |
_envHasFun
Return few infos about a function, a global variable, a type or a constante
in a channel environment.
It can be also called to return if it exists or not in a given channel.
Prototype :
fun [Chn S] [S S I S]
- Chn : any channel. If nil, the initial environment will be set. Else, associated environment with this channel will be set (= the initial environment + all packages and strings loaded in this channel).
- S : a function name (or a global variable name, a type name, ...).
Return : [S S I S] a tuple :
- S : the name (of the function, type, etc). By example "_openchannel".
- S : its type (nothing for a type). By example : "fun [S S Env] Chn".
- I : the arity (the number of arguments for a function) : negative for a type, a Scol constante or a global variable (in this last case : nil). By example : 3
- S : the package name where it defined (for the initial environment : "Initial environment")
See also :
Example :
Note :
The local variables are not returned (this is logic ...).
WARNING : this function can take a long time before return.