Re: simple question

• To: mathgroup at smc.vnet.net
• Subject: [mg77107] Re: simple question
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Mon, 4 Jun 2007 03:43:29 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <f3u511\$3ae\$1@smc.vnet.net>

```dimitris wrote:
> Hi.
>
> I have a simple question but I can't find any relevant.

You should try Google Groups with the keywords Mathematica comment
imputform...

> Suppose a user-defined function with comments [that is (*...*)
> structures]
>
> Let for example
>
> \!\(Nint[g_ (*function*) , n_Integer, {x_, a_, b_} (*
>       the\ variable\ and\ the\ limits\
>         of\ integration*) , opts___ (*set\ possible\ options\ for\ \
> NIntegrate*) ] := NIntegrate[Evaluate[g\^Range[n]], {x, a, b}, opts]\)
>
> The code has been copy/paste in StandardForm.
> Let me convert it to InputForm. After selecting the cell
> and press Shift+Ctrl+I, I get
>
> In[1]:=
> Nint[g_, n_Integer, {x_, a_, b_}, opts___] :=
> NIntegrate[Evaluate[g^Range[n]], {x, a, b}, opts]
>
> That is, the comments during the conversion have been lost.

This "feature" has generated numerous discussions over the net and the
years :-) As David Park pointed out [1],

"Furthermore, if one converts a cell from one form to another, say
annoyance.

COMMENTS SHOULD BE CONSIDERED AN ESSENTIAL PART OF CODE. THEY SHOULD BE
HANDLED ROBUSTLY AND NEVER DISCARDED. WRI WOULD VASTLY IMPROVE THE
USEFULNESS OF MATHEMATICA IF THEY ATTENDED TO THIS."

> Any ideas to "fix" this situation?
>
> Dimitris

are very relevant:

[1] "Package development"

[3] "Transfering Packages Between Platforms and InputForm Conversions"