The GP command “?”

Ilya Zakharevich <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
Are people ACTUALLY using “the sections” in the results of the GP command
     ?
?  Myself, I use only “the tail” of its output.  I do not ever recall
finding what ?1 outputs useful in the slightest…

(However, the output of ?19, ?20, ?21 is quite useful (although	these is
NOT LISTED in the output of
      ?
!).

Is it different for you guys?

If not, then maybe it is better to
  • move the list of sections to the command
        ?sections
    .
    
  • Make
        ?
    emit something “more helpful” instead of the list of sections.

  • This “more helpful” part should list the command
      ?sections
  
  • This part may also redirect to specific ?0 etc. when this is useful.

Something along the lines (only a bit more detailed?) of:

  The GP calculator accepts input in the PARI language, as well as
  special commands starting with \ or with ? or with #.  The PARI
  language has unary and binary operators (among them + - * / % << >>
  && || < > == <= >=) “with the usual meaning” (and the assignment
  flavors such as +=) and other operators (inspect the output of ?19
  or ?_\_ or ?_! or ?_===_  etc. for details).  The command separator
  is “;”.

  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)
  Flow control is via functions if(), while() etc. (inspect ?if
  etc. — and output of ?1).

One could also add info (or a reference to info) about readline,
multiline commands and basic data types. — As well as the info “how
to start looking for more help”.

Hope this helps,
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.