[GAP Forum] Displaying the list of GAP available functions

mfrincu at info.uvt.ro mfrincu at info.uvt.ro
Tue Jan 30 12:25:30 GMT 2007


Thanks for your answers.
It works but I have one more problem. Not all the results (when using:  
Filtered(NamesSystemGVars(), str-> IsBoundGlobal(str) and  
IsFunction(ValueGlobal(str)));) are functions. I also get results like  
[]:=, or {}:= or operations which I do not need. Is there any way to  
further filter the results?

I tried to find an answer and for that I transmited to GAP each  
element in the returned list : gap>element[1]; and if it was a  
function I get a response like: function(args...) ... end;
Otherwise I get : operation... or other messages.

Knowing this I thought that it might be best to check for this  
feedbacl message in a function... but I couldn't get it to work.

The thing is I would need this to be done in a function (I need an  
automatic mechanism to go through all the results and choose only  
function).

Sorry if I ask silly questions but I am quite new in Gap programming.

Best regards,
Marc Frincu.

Quoting Frank Lübeck <Frank.Luebeck at Math.RWTH-Aachen.De>:

> On Mon, Jan 29, 2007 at 03:14:19PM +0200, mfrincu at info.uvt.ro wrote:
>> I've been trying to find an answer to a problem for some time now, but
>> I can't seem to find the answer.
>> The problem is  that I have to obtain the list of available functions
>> in GAP, from within GAP.By available functions I mean all the
>> functions loaded be default when GAP is started (default and defined
>> in user packages with auto-load). Also a list with all the packages
>> would be ok.
>> Could anyone help me in this matter?
>
> Dear Marc, dear Forum,
>
> See the section
>
> ?More About Global Variables
>
> in the GAP online help.
>
> For example:
>
> gap> NamesUserGVars();
>
> gives you a list of names of global variables created after loading
> the library. Or
>
> gap> Filtered(NamesSystemGVars(),
>>              str-> IsBoundGlobal(str) and IsFunction(ValueGlobal(str)));
>
> gives you the names of global variables bound to functions during loading
> of the library.
>
> Currently, you can get the names of packages (normalized to lower case) found
> in the package paths with:
>
> gap> RecFields(GAPInfo.PackagesInfo);
>
> But this is not (yet?) documented.
>
> With best regards,
>
>    Frank
>
> --
> ///  Dr. Frank Lübeck, Lehrstuhl D für Mathematik, Templergraben 64,  ///
> \\\                    52062 Aachen, Germany                          \\\
> ///  E-mail: Frank.Luebeck at Math.RWTH-Aachen.De                        ///
> \\\  WWW:    http://www.math.rwth-aachen.de/~Frank.Luebeck/           \\\
>
>






More information about the Forum mailing list