[Gambas-user] Typing in - help for own function

Tobias Boege taboege at ...626...
Mon Nov 16 17:25:19 CET 2015


On Mon, 16 Nov 2015, Rolf-Werner Eilert wrote:
> Just had this idea: When I type in the name of a function in one of the 
> classes of my project (an own function), the help pops up and tells me 
> about the variables needed and the data type of that function.
> 
> But it would be helpful (e. g. after a longer time of absence) to have 
> some kind of explanation or declaration text to tell me how this 
> function was meant to be used. So, is there a way of quoting some kind 
> of comment which is then shown in this help window? Or if not, wouldn't 
> it be a nice-to-have? ;)
> 
> I'm thinking about a special quote character, e. g. # or & in a comment, 
> or a pair of commands (forming a block) or something.
> 

I could barely live without that. Try the double-apostrophe:

  '' Analyze a line.
  ''
  '' **Remember that the result is ByRef.**
  Public Function Analyze(sLine As String, hRes As AnalyzeResult) As Boolean
    ' ...
  End

As you will see, you can use the usual Gambas Markdown syntax inside these
comments.

With the triple-apostrophe ''' in the class header you can write
documentation for the current class.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list