Function: DCDPOS Purpose: The function dcdpos decodes position input for boxinp and posinp. Category: PHYSICAL COORDINATES File: cotrans.c Author: K.G. Begeman Use: INTEGER DCDPOS( SET , input character*(*) SUBSET , input integer STRING , input character*(*) POS , output double precision array OPTION ) input integer DCDPOS Depends on option. If OPTION greater than 0 (POSINP) DCDPOS returns the number of positions decoded. If OPTION equals 0 (BOXINP) then DCDPOS returns a coded number which can have the following values: 0 - no position found in string 1 - one position found in string 2 - only a size found in string 3 - position and size found in string 4 - two positions found in string In all case, a negative return value indicates an error. The following errors might occur: -1 - illegal use of 'PC', 'AC' or 'D' -2 - prefix incompatible with axis -3 - position incomplete -4 - error reading descriptor info -5 - 'D' not allowed for positions -6 - No grid separation defined for units -7 - Too many positions -8 - Cannot obtain header information -9 - No mixed epochs allowed -10 - General decode error (detected by dcddble). -11 - BLANKS decoded. SET Input set name. SUBSET Input subset coordinate word. Needed to determine the dimension of the subset. STRING String containing input to be decoded. POS The decoded positions. The positions are stored sequentially, meaning that the first N items contain the first position (N is dimension of subset), the second N items the second, etc. OPTION If OPTION equals zero, then BOX decoding will be done. If OPTION is greater than 0 then position decoding will be done, where OPTION indicated the maximum number of positions to decode. Updates: Jan 18, 1990: KGB, Document created. Feb 17, 1992: KGB, Bug in trailing units repaired. Mar 27, 1995: KGB, Errors -10 and -11 implemented.