HP Forums

Full Version: Is it possible to attach some text help to my user functions.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to attach some text help to my user functions. The user functions in HP Prime now appear in italics in the main Catlg.
(02-13-2018 06:17 PM)John P Wrote: [ -> ]Is it possible to attach some text help to my user functions. The user functions in HP Prime now appear in italics in the main Catlg.

yes, the user functions appear in italics in the Catalog and I think this is a great thing, very useful to see if a user function have (erroneously) the same name of a system one and for other reason.
Still is not possible to attach some help (besides the comments //). I do hope in a next version to have a way to get a help to show in the Catalog pressing on the user name function.
In the present FW it isn't possible.

Salvo
Have you considered created a wrapper (CAS) program that checks the arguments?

Code:

#cas
myprog(args):=
BEGIN
  local s:=SIZE(args);
  CASE
    IF s==0 THEN
      // code for when no arguments supplied
      // presumably here is where you can display some help text or even
      // just return a string with some info on how to use the command
    END;
    IF s==1 THEN
      // code for when a single argument is supplied
      // or simply call another program:
      RunMyHOMEProg(args);
    END;
  END;
END;
#end
(02-15-2018 07:01 PM)Han Wrote: [ -> ]Have you considered created a wrapper (CAS) program that checks the arguments?

Code:

#cas
myprog(args):=
BEGIN
  local s:=SIZE(args);
  CASE
    IF s==0 THEN
      // code for when no arguments supplied
      // presumably here is where you can display some help text or even
      // just return a string with some info on how to use the command
    END;
    IF s==1 THEN
      // code for when a single argument is supplied
      // or simply call another program:
      RunMyHOMEProg(args);
    END;
  END;
END;
#end

Thank you Han, it seams convincing and should work. I will try it.
Cheers
Reference URL's