<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 2/26/2016 12:49 PM, Demitri Muna wrote:
    <blockquote type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hi,
      <div class=""><br class="">
      </div>
      <div class="">My initial comments are:</div>
      <div class=""><br class="">
      </div>
      <div class="">- Are the single quotes necessary (providing any
        value?) as there isn’t expected to be anything else on the line?</div>
    </blockquote>
    <br>
    The quotes are necessary to delimit any significant leading or
    trailing spaces and also serve to separate the string value from the
    optional comment string.<br>
    <br>
    <blockquote type="cite">
      <div class="">- Shouldn’t the ampersand be located outside of the
        quoted string?</div>
    </blockquote>
    <br>
    No.   There is no ambiguity by requiring the ampersand to be the
    last character of the quoted string.  It would be more ambiguous to
    say the ampersand must be the first character of the comment field. 
    In that case, should it precede or follow the recommended space
    following the slash character?  Should it precede or follow any
    optional units string in square brackets?  Also, from a practical
    standpoint it is more convenient parse the ampersand as part of the
    value string rather than having to parse the comment string as well.<br>
    <blockquote type="cite">
      <div class="">- Is there a benefit to a free form text field
        having a comment? Particularly as it might contain an unlimited
        number of lines?</div>
    </blockquote>
    <br>
    Some users might find it beneficial to continue the comment field,
    as well as the string value itself, over the same keyword records.<br>
    <br>
    <blockquote type="cite">
      <div class="">- I think that if a line ends with an ampersand but
        the next does not contain the “CONTINUE” keyword, is should be
        an error. If it looks like an error (even acknowledged in the
        document), it should be an error.</div>
    </blockquote>
    <br>
    It is an error in the sense that the keywords probably do not convey
    the meaning that was intended, however all the individual keywords
    completely conform to the requirements for  valid FITS keywords and
    are perfectly legal.  Also, it is possible for a string keyword to
    actually have an ampersand as the last character of the string.<br>
    <br>
    <blockquote type="cite">
      <div class="">- There should be no chance (particularly through an
        error!) that the continuation string (“&”) be assumed to be
        part of the long string. This is another argument to keep the
        continuation character outside of the quoted string.</div>
    </blockquote>
    <br>
    As mentioned above, putting the continuation character inside the
    quoted string is better than the alternative.  In any case, in the
    22 years that this continuation convention has been used by the
    HEASARC (and many others) in countless FITS files, we have never (to
    my knowledge) encountered any problems with the long string values
    becoming corrupted.<br>
    <br>
    <blockquote type="cite">
      <div class="">- Is there a maximum number of lines? While the
        intent here is for strings of a few lines, this clearly lays out
        the red carpet for the possibility of megabytes of text. In
        software, whatever your intent it, expect users to exceed it by
        an order of magnitude.   <br>
      </div>
      <div class=""><br class="">
      </div>
    </blockquote>
    <br>
    Generally speaking, the FITS standard does not place upper limits on
    any the data structures that it defines, so users can use or abuse
    them as they see fit.    Note that the entire text of Tolstoy's 'War
    and Peace'  (587287 words) could be written as a single 50000-line
    continuation keyword, and CFITSIO would have no trouble reading or
    writing it (although it might take awhile!).<br>
    <br>
    <blockquote type="cite">
      <div class="">
        <div class="">Is the reason this specific format was chosen was
          that it is currently being implemented somewhere else?</div>
      </div>
      <div class=""><br class="">
      </div>
    </blockquote>
    <br>
    Yes.  This particular convention was adopted by the HEASARC in 1994
    to support the need to write long string values related to certain
    missions that it supported.    See
    <a class="moz-txt-link-freetext" href="http://fits.gsfc.nasa.gov/registry/continue_keyword.html">http://fits.gsfc.nasa.gov/registry/continue_keyword.html</a>.<br>
    <br>
    <blockquote type="cite">
      <div class="">I would also request the the LaTeX document for the
        documentation use the correct “straight” quote in the example
        headers. The document source is using straight single quotes,
        but these of course become a curly quote which is incorrect.
        This can be accomplished, for example, with the
        “\textquotesingle” macro in the textcomp package.</div>
      <div class=""><br class="">
      </div>
    </blockquote>
    Good suggestion.<br>
    <br>
    -Bill Pence<br>
  </body>
</html>