Re: The GP command “?”

Ilya Zakharevich <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
On Sat, Dec 09, 2023 at 07:49:50PM -0800, Ilya Zakharevich wrote:
>   flavors such as +=) and other operators (inspect the output of ?19
>   or ?_\_ or ?_! or ?_===_  etc. for details).  The command separator
>   is “;”.

Probably one should better add:

  A trailing “;” suppresses echoing the last result.

>   Thousands of available functions are split into “topics” (inspect
>   them via the list emitted by the command ?sections).  User-defined
>   functions (listed by ?0) are stored in variables (like f below) and
>   are defined as:
>     f(mandatory_arg, optional_arg=default) = N++; mandatory_arg+optional_arg
>   or equivalently (omit parentheses if this terminates a command):
>     (f = (mandatory_arg, optional_arg=default) -> N++; mandatory_arg+optional_arg)

Probably one should better add:

  A function returns the result of its last subcommand.  (In
  particular, to make it void, terminate with “; if(0)”.)

Yours,
Ilya
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.