| sydupi |
|
Table of contents
Procedure
SYDUPI ( Create a duplicate of a symbol )
SUBROUTINE SYDUPI ( NAME, COPY, TABSYM, TABPTR, TABVAL )
Abstract
Create a duplicate of a symbol within an integer symbol table.
If a symbol with the new name already exists, its components
are replaced.
Required_Reading
SYMBOLS
Keywords
SYMBOLS
Declarations
IMPLICIT NONE
INTEGER LBCELL
PARAMETER ( LBCELL = -5 )
CHARACTER*(*) NAME
CHARACTER*(*) COPY
CHARACTER*(*) TABSYM ( LBCELL:* )
INTEGER TABPTR ( LBCELL:* )
INTEGER TABVAL ( LBCELL:* )
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
NAME I Name of the symbol to be duplicated.
COPY I Name of the new symbol.
TABSYM,
TABPTR,
TABVAL I-O Components of the symbol table.
Detailed_Input
NAME is the name of the symbol to be duplicated.
The components associated with NAME will be given to the
new symbol COPY. If NAME is not in the symbol table,
no duplicate symbol can be made.
COPY is the name of the new symbol. If a symbol with the name
COPY already exists in the symbol table, its components
are replaced by the components of NAME.
TABSYM,
TABPTR,
TABVAL are the components of an integer symbol table.
Detailed_Output
TABSYM,
TABPTR,
TABVAL are the components of an integer symbol table.
On output, the symbol table contains a new symbol COPY
whose components are the same as the components of NAME.
Parameters
None.
Exceptions
1) If the symbol NAME is not in the symbol table, the error
SPICE(NOSUCHSYMBOL) is signaled.
2) If duplication of the symbol causes an overflow in the
name table, the error SPICE(NAMETABLEFULL) is signaled.
3) If duplication of the symbol causes an overflow in the
pointer table, the error SPICE(POINTERTABLEFULL) is signaled.
4) If duplication of the symbol causes an overflow in the
value table, the error SPICE(VALUETABLEFULL) is signaled.
Files
None.
Particulars
If the symbol NAME is not in the symbol table, no duplicate symbol
can be made.
If the symbol COPY is already in the symbol table, its components
are replaced by the components of NAME.
Examples
The contents of the symbol table are:
books --> 5
erasers --> 6
pencils --> 12
pens --> 10
12
24
The code,
CALL SYDUPI ( 'books', 'tablets', TABSYM, TABPTR, TABVAL )
produces the symbol table:
books --> 5
erasers --> 6
pencils --> 12
pens --> 10
12
24
tablets --> 5
The code,
CALL SYDUPC ( 'desks', 'chairs', TABSYM, TABPTR, TABVAL )
produces the error SPICE(NOSUCHSYMBOL) because the symbol
"desks" is not in the symbol table.
Restrictions
None.
Literature_References
None.
Author_and_Institution
J. Diaz del Rio (ODC Space)
H.A. Neilan (JPL)
W.L. Taber (JPL)
I.M. Underwood (JPL)
Version
SPICELIB Version 1.1.0, 08-APR-2021 (JDR)
Added IMPLICIT NONE statement.
Edited the header to comply with NAIF standard.
SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) (HAN)
|
Fri Dec 31 18:36:59 2021