[GAP Forum] Accessing source code from GAP folder

Sugandha Maheshwary msugandha.87 at gmail.com
Fri Dec 17 09:21:10 GMT 2021


Thanks a lot, Frank! This is indeed very useful.

Thanks for your inputs, Benjamin!

Regards,
Sugandha
*Dr. Sugandha Maheshwary,*
*Department of Mathematical Sciences*
*Indian Institute of Science Education & Research (IISER), Mohali*
*Knowledge City, SAS Nagar, Sector 81,*
*P.O.Manauli- 140306, Punjab, INDIA.*

*Core-committee (Secretary) Member*,
* Indian National Young Academy of Science (INYAS)*

*e-mail: sugandha at iisermohali.ac.in <sugandha at iisermohali.ac.in>;
msugandha.87 at gmail.com <87 at gmail.com>*





On Fri, Dec 17, 2021 at 2:15 PM Frank Lübeck <
frank.luebeck at math.rwth-aachen.de> wrote:

> On Fri, Dec 17, 2021 at 09:49:12AM +0530, Sugandha Maheshwary wrote:
> > I am looking for a way to access the source code of certain commands. The
> > library has a lot of folders and generally I need to do a lot of guessing
> > and trial and error to reach the source code.
> >
> > For instance, for the details of source code of
> > "WedderburnDecomposition(FG)". I need to follow the path
> > "/Users/apple/gap-4.10.2/pkg/wedderga-4.9.5/lib/main.gi"
> >
> > Is there a refined way of tracking the same, that can direct me from
> > terminal to source code, which does not need remembering the path of
> folder
> > and folder name in which it lies.
> >
> > Suppose, if I am looking for source code of the command "AllSubgroups(G)"
> > or the sonata package  command "Subgroups(G)", how do I locate the
> correct
> > files?
>
> Dear Sugandha, dear Forum,
>
> You could use the utility function 'PageSource'. It will show you the
> source
> code of a function in a pager and also print the location.
>
> Try for example:
>
> gap> PageSource(AllSubgroups);  # a pager opens ...
> Showing source in /my/path/gap4.11/lib/teaching.g (from line 266)
> gap> LoadPackage("Sonata");
> gap> PageSource(Subgroups);
> Showing source in /my/path/gap4.11/pkg/sonata-2.9.1/lib/grpsupp.gi (from
> line 102)
>
> For other utility functions one can use 'FilenameFunc' and 'StartlineFunc'.
>
> Best regards,
>    Frank
>
> --
> ///  Dr. Frank Lübeck, Lehrstuhl für Algebra und Zahlentheorie,
> \\\  Pontdriesch 14/16, 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