[mesa-users] Inline Comments in Namelists
Richard Townsend
townsend at astro.wisc.edu
Fri May 8 10:49:51 EDT 2015
Shouldn’t an error be signaled in iostat when the invalid number '3.14!2.78’ is read in?
> On May 8, 2015, at 9:40 AM, Tomasz Plewa <tomekplewa at gmail.com> wrote:
>
> The language standard does not provide interpretation of the runtime behavior. That is, a problem of this kind cannot be diagnosed at compile time and decision regarding runtime behavior is left to a vendor. In this case, it is the input file formatting issue and diagnostics provided by GNU. Not very helpful indeed.
>
> Tomek
> --
> On 05/08/15 09:14, Richard Townsend wrote:
>> In fact, neither are correct: both should throw an error when the space is missing, I think.
>>
>>> On May 8, 2015, at 8:08 AM, Richard Townsend <townsend at astro.wisc.edu <mailto:townsend at astro.wisc.edu>> wrote:
>>>
>>> Thanks for finding this. So, gfortran is consistent with the standard, whereas ifort is not…
>>>
>>>> On May 8, 2015, at 7:57 AM, Tomasz Plewa <tomekplewa at gmail.com <mailto:tomekplewa at gmail.com>> wrote:
>>>>
>>>> As per the Fortran standard, a comment starts with "!" either at the beginning of the record or after a value separator. So I am guessing adding a blank space, which in this case serves as a value (3.14) separator, fixes the problem.
>>>>
>>>> Tomek
>>>> --
>>>>
>>>> 10.11.3.2 Namelist input processing
>>>>
>>>> 4 A namelist comment may appear after any value separator except a slash. A namelist comment is also permitted
>>>> to start in the first nonblank position of an input record except within a character literal constant.
>>>>
>>>> 10.11.3.6 Namelist comments
>>>>
>>>> 1 Except within a character literal constant, a “!” character after a value separator or in the first nonblank position
>>>> of a namelist input record initiates a comment. The comment extends to the end of the record and may contain
>>>> any graphic character in the processor-dependent character set. The comment is ignored. A slash within the
>>>> namelist comment does not terminate execution of the namelist input statement. Namelist comments are not
>>>> allowed in stream input because comments depend on record structure.
>>>>
>>>> 10.10.2
>>>>
>>>> 3 A value separator is
>>>> • a comma optionally preceded by one or more contiguous blanks and optionally followed by one or more
>>>> contiguous blanks, unless the decimal edit mode is COMMA, in which case a semicolon is used in place of
>>>> the comma,
>>>> • a slash optionally preceded by one or more contiguous blanks and optionally followed by one or more
>>>> contiguous blanks, or
>>>> • one or more contiguous blanks between two nonblank values or following the last nonblank value, where a
>>>> nonblank value is a constant, an r*c form, or an r* form.
>>>>
>>>>
>>>> On 05/07/15 20:10, Josiah Schwab wrote:
>>>>> Hi All,
>>>>>
>>>>>> I was wondering why I have not seen this. I often use inline comments
>>>>>> within inlists to show values I have tried or plan to try. But, I
>>>>>> always place a space before and after the ! to make it easier on my
>>>>>> old eyes.
>>>>> Yes, sorry, I should have made this more clear.
>>>>>
>>>>> val = 3.14 !2.78
>>>>>
>>>>> appears to be fine with both ifort and gfortran.
>>>>>
>>>>> I almost always offset my inline comments with a space as well. Except
>>>>> one time I didn't, and there went my afternoon ... :)
>>>>>
>>>>> Josiah
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
>>>>> _______________________________________________
>>>>> mesa-users mailing list
>>>>> mesa-users at lists.sourceforge.net <mailto:mesa-users at lists.sourceforge.net>
>>>>> https://lists.sourceforge.net/lists/listinfo/mesa-users <https://lists.sourceforge.net/lists/listinfo/mesa-users>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________ <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________>
>>>> mesa-users mailing list
>>>> mesa-users at lists.sourceforge.net <mailto:mesa-users at lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/mesa-users <https://lists.sourceforge.net/lists/listinfo/mesa-users>
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________ <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________>
>>> mesa-users mailing list
>>> mesa-users at lists.sourceforge.net <mailto:mesa-users at lists.sourceforge.net>
>>> https://lists.sourceforge.net/lists/listinfo/mesa-users <https://lists.sourceforge.net/lists/listinfo/mesa-users>
>>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20150508/2fbd1f46/attachment.html>
More information about the Mesa-users
mailing list