Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved the manual of the GAP package JuliaInterface #353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/GAPJulia/JuliaInterface/PackageInfo.g
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# JuliaInterface: Test interface to julia
# JuliaInterface: Interface to Julia
#
# This file contains package meta data. For additional information on
# the meaning and correct usage of these fields, please consult the
Expand All @@ -9,7 +9,7 @@
SetPackageInfo( rec(

PackageName := "JuliaInterface",
Subtitle := "Test interface to julia",
Subtitle := "Interface to Julia",
Version := "0.2.6",
Date := "04/02/2020", # dd/mm/yyyy format
License := "GPL-2.0-or-later",
Expand Down Expand Up @@ -75,11 +75,11 @@ PackageDoc := [ rec(
HTMLStart := "doc/chap0.html",
PDFFile := "doc/manual.pdf",
SixFile := "doc/manual.six",
LongTitle := "Test interface to julia",
LongTitle := "Interface to &Julia;",
) ],

Dependencies := rec(
GAP := ">= 4.11", # need support for the component 'BannerFunction'
GAP := ">= 4.11", # need compatible code in GAP's src/julia_gc.c
NeededOtherPackages := [ ],
SuggestedOtherPackages := [ ],
ExternalConditions := [ ],
Expand Down
28 changes: 17 additions & 11 deletions pkg/GAPJulia/JuliaInterface/gap/BindCFunction.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,33 @@
## Sebastian Gutsche, Siegen University
##
#! @Chapter Function integration
##
#############################################################################

#! @Section Julia functions in GAP
#! @Section &Julia; functions in ⪆

#! @Arguments julia_name, nr_args, arg_names
#! @Arguments julia_name, arg_names
#! @Returns a function
#! @Description
#! Returns a GAP function that acts like a kernel function in GAP,
#! but calls the Julia function <A>julia_name</A>. The function in Julia
#! must exist, bound to the global name <A>julia_name</A> in the module <C>Main</C>,
#! and must be callable on <A>nr_args</A> arguments. <A>arg_name</A> must
#! be a list of strings of length <A>nr_args</A> describing the argument names
#! Returns a &GAP; function that acts like a kernel function in &GAP;,
#! but calls the &Julia; function <A>julia_name</A>.
#! The function in &Julia; must exist, be bound to the global name
#! <A>julia_name</A> in the module <C>Main</C>,
#! and must be callable on as many arguments as the length of the list
#! <A>arg_names</A> of strings describing the argument names
#! that are displayed in the function header by &GAP;.
#! @BeginExampleSession
#! ...
#! @EndExampleSession
DeclareGlobalFunction( "JuliaBindCFunction" );

#! @Section GAP functions in Julia

#! @Arguments func, name, argument_number
#! @Returns nothing
#! @Description
#! Sets the function <A>func</A> in Julia as <C>GAP.</C><A>name</A>.
#! The resulting function is then callable from Julia on <A>argument_number</A> arguments.
#! Sets the function <A>func</A> in &Julia; as <C>GAP.</C><A>name</A>.
#! The resulting function is then callable from &Julia; on <A>argument_number</A> arguments.
#! @BeginExampleSession
#! ...
#! @EndExampleSession
#! TODO: Does this function ever get installed?
DeclareGlobalFunction( "JuliaSetGAPFuncAsJuliaObjFunc" );
2 changes: 1 addition & 1 deletion pkg/GAPJulia/JuliaInterface/gap/BindCFunction.gi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ InstallGlobalFunction( JuliaBindCFunction,
arg_names := List( arg_names, Immutable );
MakeImmutable( arg_names );
else
ErrorNoReturn( "second argument must be a string or a a list of strings" );
ErrorNoReturn( "second argument must be a string or a list of strings" );
fi;

nr_args := Length( arg_names );
Expand Down
Loading