| | CSPICE Routines: PROMPT_C |
 | | After each prompt is written, the program leaves the cursor at the end of the string as shown here: Enter UTC epoch > _ (The underscore indicates the cursor position). |
 | | The following program illustrates the aquisition of input values using prompt_c: #include #include #include "SpiceUsr.h" #define STRLEN 32 void main() { SpiceChar utc [STRLEN]; SpiceChar obs [STRLEN]; SpiceChar targ [STRLEN]; SpiceChar * utc1; SpiceChar * obs1; SpiceChar * targ1; /. |
 | | ./ utc1 = (SpiceChar *) malloc (STRLEN); obs1 = (SpiceChar *) malloc (STRLEN); targ1 = (SpiceChar *) malloc (STRLEN); utc1 = prompt_c ("Enter UTC epoch > ", STRLEN, utc1); obs1 = prompt_c ("Enter observer name > ", STRLEN, obs1); targ1= prompt_c ("Enter target name > ", STRLEN, targ1); /. |
| www.gps.caltech.edu /~marsdata/cspice/prompt_c.html (486 words) |