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

Improve documentation a bit #929

Merged
merged 1 commit into from
Aug 25, 2023
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
18 changes: 11 additions & 7 deletions docs/src/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,25 @@ using Julia syntax features.
In particular, the following is available on the Julia side
in order to support special GAP syntax beyond function calls with arguments.

- Access list/matrix entries via [`getindex`](@ref).
- Call functions with global options via [`call_gap_func`](@ref)
or using Julia's keyword argument syntax. For example,
`Cyc(1.41421356 : bits:=20)` in GAP translates to
`GAP.Globals.Cyc(GAP.Obj(1.41421356); bits=20)` in Julia.

- Access list/matrix entries via [`getindex`](@ref) and [`setindex!`](@ref)
respectively the corresponding Julia syntax (described there).

- Access record components via [`getproperty`](@ref).
- Access record components via [`getproperty`](@ref) and [`setproperty!`](@ref)
respectively the corresponding Julia syntax (described there).

- Check for bound record components via [`hasproperty`](@ref).

- Access entries of a positional object via [`getbangindex`](@ref),
equivalent to GAP's `![]` operator.

- Access components of a component object via [`getbangproperty`](@ref),
equivalent to GAP's `!.` operator.

- Check for bound record components via [`hasproperty`](@ref).

- Call functions with global options via [`call_gap_func`](@ref)
or using Julia's keyword argument syntax.

```@docs
call_gap_func
call_with_catch
Expand Down
11 changes: 6 additions & 5 deletions src/ccalls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ Note that screen outputs caused by evaluating `cmd` are not shown
by `evalstr`; use [`evalstr_ex`](@ref) for accessing both the outputs
and the return values of the command(s).

Note also that using `evalstr` is often not the best way to create
GAP objects or to call GAP functions.
(In fact, it is likely that something is missing from GAP.jl
if `evalstr` is the only way to formulate some lines of code.)
Alternatively, use `GAP.GapObj` or `GAP.Obj` for constructing GAP objects
In general we recommend to avoid using `evalstr`, but it sometimes can
be a useful escape hatch to access GAP functionality that is otherwise
impossible to difficult to reach. But in most typical scenarios it
should not be necessary to use it at all.

Instead, use `GAP.GapObj` or `GAP.Obj` for constructing GAP objects
that correspond to given Julia objects,
and call GAP functions directly in the Julia session.
For example, executing `GAP.evalstr( "x:= []; Add( x, 2 )" )`
Expand Down