A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Astronomy and Astrophysics » FITS
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

[fitsbits] Start of the CONTINUE keyword Public Comment Period



 
 
Thread Tools Display Modes
  #1  
Old July 13th 07, 02:21 AM posted to sci.astro.fits
Mark Calabretta
external usenet poster
 
Posts: 42
Default [fitsbits] Start of the CONTINUE keyword Public Comment Period


On Thu 2007/07/12 16:10:24 -0400, William Pence wrote
in a message to:

Another case where ordering may be implicit is in a sequence of HISTORY
keywords that document the order of data processing steps. In some


Another obvious example is that of COMMENT strings that span successive
records and are meant to be read as a paragraph.

An implicit example is where two header cards define the same keyword
(this condition is not addressed by the current standard, though I note
that the new draft specifically deprecates it). Since scanner/parsers
are likely to read the header top-to-bottom the most likely result will
be that the last occurrence prevails.

Keep in mind that the approval process for adding a convention to the
Registry is mainly only designed to ensure that the documentation is
clear and complete. If a continuation convention were to be considered


Not withstanding that (and contrary to my normal practice), I'd like to
make a couple of points:

1) The continuation character, '&', is redundant syntax. As described
in the prologue of fitshdr.h (from WCSLIB, as appended), it only
indicates continuation if the following card is CONTINUE otherwise
it must be interpreted literally.

2) Making the continuation character part of the keyvalue, rather than
a separate token, means that:

a) Continuation is only defined for string keyvalues.

b) When the parser tokenizes a header card, instead of being a
separate token in itself the (redundant) continuation character
must be removed from one of the other tokens. Consequently, the
parser is obliged to modify the keyvalue.

Does anyone know of any other syntax that uses a similar method of
continuation? As alternatives think about the way it's done in Fortran,
C/C++, and Bourne shell (or python, or Glish). Cobol is also quite
interesting in this respect as it's card-oriented, so is relevant to
FITS, and has elements of both C and Fortran continuation.

Mark Calabretta
ATNF


Extract from the prologue of fitshdr.h:


* 2) The parser supports a generalization of the OGIP Long String Keyvalue
* Convention (v1.0) whereby strings may be continued onto successive
* header cards. A card contains a segment of a continued string if and
* only if
* a) it contains the pseudo-keyword "CONTINUE",
* b) columns 9 and 10 are both blank,
* c) columns 11 to 80 contain what would be considered a valid string
* keyvalue, including optional inline comment, if column 9 had
* contained '=',
* d) the previous card contained either a valid string keyvalue or a
* valid CONTINUE card.
* If any of these conditions is violated, the card is considered in
* isolation.
*
* Syntax errors in inline comments in a continued string are treated
* more permissively than usual; the '/' delimiter may be omitted
* provided that parsing of the string keyvalue is not compromised.
* However, the FITSHDR_COMMENT status bit will be set for the card (see
* below).
*
* As for normal strings, trailing blanks in a continued string are not
* significant.
*
* In the OGIP convention "the '&' character is used as the last non-
* blank character of the string to indicate that the string is
* (probably) continued on the following keyword". This additional
* syntax is not required by fitshdr(), but if '&' does occur as the last
* non-blank character of a continued string keyvalue then it will be
* removed, along with any trailing blanks. However, blanks that occur
* before the '&' will be preserved.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[fitsbits] Start of the CONTINUE keyword Public Comment Period William Pence FITS 2 July 16th 07 05:42 AM
[fitsbits] Start of the CONTINUE keyword Public Comment Period William Pence FITS 0 July 12th 07 09:10 PM
[fitsbits] Start of the CONTINUE keyword Public Comment Period William Pence FITS 0 July 12th 07 07:41 PM
[fitsbits] Start of the CONTINUE keyword Public Comment Period Peter Teuben FITS 0 July 11th 07 10:37 PM
[fitsbits] Start of the CONTINUE keyword Public Comment Period Thomas McGlynn[_2_] FITS 0 July 11th 07 09:57 PM


All times are GMT +1. The time now is 02:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 SpaceBanter.com.
The comments are property of their posters.