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

2015-11-16 Thread Rolf-Werner Eilert

Am 16.11.2015 17:31, schrieb Tobias Boege:
> On Mon, 16 Nov 2015, Tobias Boege wrote:
>>'' Analyze a line.
>>''
>>'' **Remember that the result is ByRef.**
>>Public Function Analyze(sLine As String, hRes As AnalyzeResult) As Boolean
> Of course I would screw something up in this completely arbitrary example.
> For the comment to make sense the function's signature should be
>
>Public Function Analyze(sLine As String, ByRef hRes As AnalyzeResult) As 
> Boolean
>
> with a ByRef before hRes.
>

No problem, I got what I was looking for ;)

Rolf


--
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2015-11-16 Thread Tobias Boege
On Mon, 16 Nov 2015, Tobias Boege wrote:
>   '' Analyze a line.
>   ''
>   '' **Remember that the result is ByRef.**
>   Public Function Analyze(sLine As String, hRes As AnalyzeResult) As Boolean

Of course I would screw something up in this completely arbitrary example.
For the comment to make sense the function's signature should be

  Public Function Analyze(sLine As String, ByRef hRes As AnalyzeResult) As 
Boolean

with a ByRef before hRes.

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

--
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2015-11-16 Thread Rolf-Werner Eilert

Am 16.11.2015 17:25, schrieb Tobias Boege:
> 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
>
Aaaah great! Thank you Tobi.

The space after the ' ' seems to be important, and it has to be written 
above the function declaration, not within, right?

Regards
Rolf


--
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2015-11-16 Thread Tobias Boege
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

--
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user