1 /* swapd.f -- translated by f2c (version 19980913).
2 You must link the resulting object file with the libraries:
3 -lf2c -lm (in that order)
4 */
5
6 #include "f2c.h"
7
8 /* $Procedure SWAPD ( Swap double precision values ) */
swapd_(doublereal * a,doublereal * b)9 /* Subroutine */ int swapd_(doublereal *a, doublereal *b)
10 {
11 doublereal temp;
12
13 /* $ Abstract */
14
15 /* Swap the contents of two double precision variables. */
16
17 /* $ Disclaimer */
18
19 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
20 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
21 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
22 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
23 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
24 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
25 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
26 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
27 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
28 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
29
30 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
31 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
32 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
33 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
34 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
35 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
36
37 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
38 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
39 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
40 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
41
42 /* $ Required_Reading */
43
44 /* None. */
45
46 /* $ Keywords */
47
48 /* UTILITY */
49
50 /* $ Declarations */
51 /* $ Brief_I/O */
52
53 /* VARIABLE I/O DESCRIPTION */
54 /* -------- --- -------------------------------------------------- */
55 /* A I/O First variable. */
56 /* B I/O Second variable. */
57
58 /* $ Detailed_Input */
59
60 /* A, */
61 /* B are two variables, the contents of which are to */
62 /* be swapped (exchanged). */
63
64 /* $ Detailed_Output */
65
66 /* A, */
67 /* B are the same two variables, after their contents */
68 /* have been exchanged. */
69
70 /* $ Parameters */
71
72 /* None. */
73
74 /* $ Particulars */
75
76 /* This is just shorthand notation for the code fragment */
77
78 /* TEMP = A */
79 /* A = B */
80 /* B = TEMP */
81
82 /* $ Examples */
83
84 /* Let */
85 /* A = 11.D0 */
86 /* B = 22.D0 */
87
88 /* Then after calling SWAPD (A,B), */
89
90 /* A = 22.D0 */
91 /* B = 11.D0 */
92
93 /* $ Restrictions */
94
95 /* None. */
96
97 /* $ Exceptions */
98
99 /* Error free. */
100
101 /* $ Files */
102
103 /* None. */
104
105 /* $ Author_and_Institution */
106
107 /* I.M. Underwood (JPL) */
108
109 /* $ Literature_References */
110
111 /* None. */
112
113 /* $ Version */
114
115 /* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */
116
117 /* Comment section for permuted index source lines was added */
118 /* following the header. */
119
120 /* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */
121
122 /* -& */
123 /* $ Index_Entries */
124
125 /* swap d.p. values */
126
127 /* -& */
128
129 /* Local variables */
130
131
132 /* What is there to say? */
133
134 temp = *a;
135 *a = *b;
136 *b = temp;
137 return 0;
138 } /* swapd_ */
139
140