CoCoA:Help

From ApCoCoAWiki

Help

extend online help for user-defined functions

Description

This command is used for extending the online help to include

information about user-defined functions. It is *not* the main

command for getting information about CoCoA online. For information about online help in general, enter ? or ?online help.

There are two ways to let Help know about a help string associated

with a user-defined function. First, one may use the line Help S

where S is the help string, as the first line of the function definition.

Example

  Define AddThree(X)
    Help <quotes>adds 3 to its argument</quotes>;
    Return X+3;
  EndDefine;
  Help(<quotes>AddThree</quotes>);
adds 3 to its argument
-------------------------------
  F(0);
3
-------------------------------

The second way to provide a help string for Help is to define a function Help_F where F is the function identifier.

Example

  Define AddFive(X)
    Return X+5;
  EndDefine;
  Define Help_AddFive()
    Return <quotes>adds 5 to its argument</quotes>;
  EndDefine;
  Help(<quotes>AddFive</quotes>);
adds 5 to its argument
-------------------------------
  AddFive(0);
5
-------------------------------

Syntax

Help(S:STRING):NULL

Define

Online Help

   <type>help</type>