home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / splot122.zip / DOC / FUNCTION.TEX < prev    next >
Text File  |  1994-09-22  |  43KB  |  1,346 lines

  1. \chapter{Splot Library Functions} 
  2.  
  3. What follows is a list of the built in library functions. This 
  4. document does not include information on C\index{C} in general or details of the 
  5. editor usage. Editor documentation is found in chapter \ref{chap:edit} and C 
  6. information can be found in any number of readily available texts. 
  7.  
  8. \section{Drawing Library Reference}
  9. \subsection{Drawing Functions}\index{drawing functions}
  10.  
  11. \vspace{3mm}
  12.  
  13. \noindent
  14. void {\bf abox}(double xsi, double ysi, double xorig, double yorig); 
  15. \index{abox} 
  16. \begin{quote}
  17.   
  18.         Adds an axes box to the current path. The box is drawn with a size 
  19. of xsi by ysi and centered on the page. No internal coordinate system is 
  20. set up. Use ascale() for this or use axes\_box() to combine both functions. 
  21. The last two parameters are optional and if present, specify the position of 
  22. the axes origin relative to the page origin. For the last two parameters 
  23. the special constants XCENTER and YCENTER can be used for the x or y 
  24. position coordinate respectively and will cause the axes box to be centered 
  25. on the page along that axis. Using both XCENTER and YCENTER is equivalent 
  26. to the default behaviour with the last two parameters absent. 
  27. abox() is implicitly stroked.
  28. \end{quote}
  29.  
  30. \vspace{3mm}
  31.  
  32. \noindent
  33. void {\bf alineto} (double len, double ang);
  34. \index{alineto}
  35. \begin{quote}
  36.         Adds a line of length len at an angle of ang with respect to the 
  37. previous line to the current path. Generates an error if there is no 
  38. previous line in the current path. 
  39. \end{quote}
  40.  
  41. \vspace{3mm}
  42.  
  43. \noindent
  44. void {\bf arc}(double xcen, double ycen, double rad, double alpha, double beta);
  45. \index{arc}
  46. \begin{quote}
  47.         Adds a circular arc of radius rad centered at (xcen, ycen) to the 
  48. current path. The starting angle is alpha and the stopping angle is beta. 
  49. The arc is drawn in the counter clockwise direction. A straight line 
  50. section will be added from the previous current point if any to the 
  51. starting point of the arc. 
  52. \end{quote}
  53.  
  54. \noindent
  55. void {\bf arcn}(double xcen, double ycen, double rad, double alpha, double beta);
  56. \begin{quote}
  57.         Adds a circular arc of radius rad centered at (xcen, ycen) to the 
  58. current path. The starting angle is alpha and the stopping angle is beta. 
  59. The arc is drawn in the clockwise direction. A straight line section will 
  60. be added from the previous current point if any to the starting point of 
  61. the arc. Exactly as arc() but draws the arc in the opposite direction. 
  62. \end{quote}
  63.  
  64. \vspace{3mm}
  65.  
  66. \noindent
  67. void {\bf arcto}(double x1, double y1, double x2, double y2, double rad);
  68. \begin{quote}             
  69.         Adds a circular arc of radius rad to the current path. The center 
  70. and angles are chosen so that the arc is tangent to the line formed by 
  71. (x1,y1) and the current point at its start and tangent to the line (x1,y1) 
  72. - (x2,y2) at its end point. A straight line segment is added from the 
  73. current point to the start of the arc. An error is generated is there is no 
  74. current point. 
  75. \end{quote}
  76.  
  77.  
  78. \vspace{3mm}
  79.  
  80. \noindent
  81. void {\bf arrowto}(double x,double y,...); 
  82. \index{arrowto}
  83. \begin{quote}             
  84.   
  85.  Adds a line segment to the current path from the current 
  86.  point to (x,y). The line is terminated by drawing an arrow 
  87.  head oriented in the direction of the line. More than one 
  88.  coordinate point can be specified in the command in which 
  89.  case a series of line segments terminated by arrows 
  90.  connecting the points will be added to the current path. If 
  91.  there is no current point then an error will be generated. 
  92.  The size of the arrow head may be changed with the 
  93.  set(FONTWIDTH,...); command.
  94. \end{quote}
  95.  
  96. \vspace{3mm}
  97.  
  98. \noindent
  99. void {\bf ascale}(int axes, double xstart, double ystart, double xend, double yend);  
  100. \index{ascale}\index{scale}
  101. \newline
  102. or
  103. \newline
  104. \noindent
  105. void {\bf ascale}(int axes, double *data, int col,...); 
  106. \begin{quote}
  107.  
  108.         An internal coordinate system is set up for subsequent plotting of 
  109. data within the existing axes box. The x axis start and stop values are 
  110. xstart and xend respectively and ystart, yend for the y axis. for the y 
  111. axis. If the axis choice is XAXES or YAXES rather than XYAXES then only two 
  112. numbers follow the axes specifier rather than four. This allows the x and y 
  113. axes scales to be set independently of each other. The alternate format 
  114. allows for auto scaling to the specified data. There can be more than one 
  115. data array in the list in which case the scales are chosen so that they 
  116. will all fit. Each data array can optionally be followed by one or two 
  117. integers specifying which columns to use for the x and y values. If axes is 
  118. not XYAXES only one integer is allowed. 
  119.  
  120. \end{quote}
  121.  
  122. \vspace{3mm}
  123.  
  124. \noindent
  125. void {\bf axes\_box}(double xsi, double ysi, double xstart, double ystart
  126.           double xend, double yend, double xorig, double yorig);
  127. \index{axes box}
  128. \begin{quote}
  129.         Adds an axes box to the current path. The box is drawn with a size 
  130. of xsi by ysi and centered on the page. An internal coordinate system is 
  131. set up for subsequent plotting of data within the box. The x axis start and 
  132. stop values are xstart and xend respectively and ystart, yend for the y 
  133. axis. for the y axis. The last two parameters are optional and if present 
  134. specify the position of the axes origin relative to the page origin. For 
  135. the last two parameters the special constants XCENTER and YCENTER can be 
  136. used for the x or y position coordinate respectively and will cause the 
  137. axes box to be centered on the page along that axis. Using both XCENTER and 
  138. YCENTER is equivalent to the default behaviour with the last two parameters 
  139. absent. More flexibility is provided by the pair of functions abox() and 
  140. ascale() which provide the functionality of axes\_box() in several steps. 
  141. axes\_box() is implicitly stroked.
  142. \end{quote}
  143.  
  144. \vspace{3mm}
  145.  
  146.  
  147. \noindent
  148. void {\bf box}(double x1, double y1, double x2, double y2);
  149. \index{box}
  150. \begin{quote}
  151.         Adds a box to the current path. The two end points of the box are 
  152. (x1,y1) and (x2,y2); 
  153. \end{quote}
  154.  
  155. \vspace{3mm}
  156.  
  157. \noindent
  158. void {\bf clear}();
  159. \index{clear}
  160. \begin{quote}
  161.         Clears the screen when the program is executed. 
  162. This function should not be needed for ordinary plots. 
  163. \end{quote}
  164.  
  165. \vspace{3mm}
  166.  
  167. \noindent
  168. void {\bf clip}()
  169. \index{clip}
  170. \begin{quote}
  171.         Converts the currently defined path\index{path} into a clipping path. All 
  172. subsequent drawing operations are then clipped against this path and only 
  173. portions of the drawing on the inside of the clip path are displayed. What 
  174. is inside and what is outside depends on whether even-odd or non-zero wind 
  175. has been selected as the fill rule using a set(); If the current path is 
  176. not closed then the current path is first closed. If there is no current 
  177. path an error is generated. clip() is implicitly stroked and takes effect immediately.
  178. \end{quote} 
  179.  
  180. \vspace{3mm}
  181.  
  182. \noindent
  183. void {\bf closepath}();
  184. \index{closepath}
  185. \begin{quote}
  186.         Closes the current path. A straight line segment is added from the 
  187. current point to the start of the current path as set by the moveto() of 
  188. rmoveto() command at the beginning of the path definition. Generates an 
  189. error if there is no current point. 
  190. \end{quote}
  191.  
  192. \vspace{3mm}
  193.  
  194. \noindent
  195. void {\bf cmatch}(int on);
  196. \index{cmatch}
  197. \begin{quote}
  198.         If the passed parameter is TRUE then it does the necessary 
  199. translations and scaling so that the coordinate system for the page matches 
  200. that used within the axes\_box. An error is generated if there is no current 
  201. axes\_box. The font scale is compensated automatically for the change in 
  202. coordinate system so that characters will still be the same size as before. 
  203. If the parameter is FALSE then the previous unmatched coordinates will be 
  204. restored. If there is no parameter TRUE is assumed. 
  205. \end{quote}
  206.  
  207. \vspace{3mm}
  208.  
  209. \noindent
  210. void {\bf curveto}(double x1, double y1, double x2, double y2, double x3, double 
  211. y3);
  212. \index{curveto}\index{Bezier curves}
  213. \begin{quote}
  214.         Adds a Bezier curve section to the current path starting at the 
  215. current point. The curve starts tangent to (xcur,ycur) - (x1,x2) and ends 
  216. tangential to (x2,y2) - (x3,y3) at (x3,y3); An error is generated if there 
  217. is no current point. 
  218.  
  219. \end{quote}
  220.  
  221. \vspace{3mm}
  222.  
  223. \noindent
  224. void {\bf drawdata}(double *data, int xcol, int ycol);
  225. \index{drawdata}
  226. \begin{quote}
  227.         Draws the data contained in the array data in the current axes\_box. 
  228. The two numbers xcol and ycol are optional and are the columns of the array 
  229. data that are to be used for the x-axis and y-axis data respectively. If 
  230. these values are omitted 0 , 1 are assumed. Each row of the array data 
  231. represents one coordinate point to be plotted. The values will be plotted 
  232. using the internal coordinate system established by the the call to 
  233. axes\_box. If there is no current axes box an error will be generated. 
  234. drawdata() is implicitly stroked.
  235.  
  236. \end{quote}
  237.  
  238. \vspace{3mm}
  239.  
  240. \noindent
  241. void {\bf errorbars}(int axes,double *data, int xcol, int ycol, int errcol);
  242. \index{error bars}
  243. \begin{quote}
  244.         Draws error bars for the data points in the array 
  245. "data"\index{data}. The first parameter is either XVALS or YVALS indicating 
  246. along which axes the error bars are to be drawn. The numbers xcol and ycol 
  247. are the columns of the array data that are to be used for the x-axis and 
  248. y-axis data respectively. Each row of the array data represents one 
  249. coordinate point to be plotted. The values will be plotted using the 
  250. internal coordinate system established by the the call to axes\_box. The 
  251. last parameter "errcol" is the column of the array "data" which holds the 
  252. size of the error for the corresponding data point in the same row. If 
  253. there is no current axes box an error will be generated. errorbars() is 
  254. implicitly stroked. \end{quote} 
  255.  
  256. \vspace{3mm}
  257.  
  258. \noindent
  259. void {\bf fill}();
  260. \index{fill}
  261. \begin{quote} 
  262.         Closes the current path\index{path} if not already closed and fills 
  263. the interior region with the current colour as specified by the last set( 
  264. )\index{set} call. What is inside and what is outside the path depends on 
  265. the currently chosen fill rule. The fill rule is either even-odd or 
  266. non-zero wind (the default) and is specified using a set() call. An error 
  267. is generated if there is no current path. \end{quote} 
  268.  
  269. \vspace{3mm}
  270.  
  271. \noindent
  272. void {\bf fitline}(double *data, int xcol, int ycol,double *yint,double *slope);
  273. \index{fit line}
  274. \begin{quote}
  275.         Fits the best straight line to the data in the array 
  276. "data"\index{data} using the column xcol of the array as the x values and 
  277. the column ycol as the corresponding y values. The best line is drawn 
  278. constrained to the current axes box. If there is no current axes box an 
  279. error is generated. The last two parameters are the returned values giving 
  280. the y intercept and slope of the fitted line. Note that they are pointers 
  281. to doubles which must be declared at the top of the program. Given a 
  282. declaration of the form: double slope,yint; 
  283.  
  284. Call fitline using:
  285.  
  286. \hspace{2cm}  {\tt fitline(data,0,1,\&yint,\&slope);}
  287.  
  288.         Assuming that the first and second column of data are the x and y 
  289. values respectively. Data points can be excluded from the fit by using the 
  290. set(XRANGE, xmin, xmax);\index{set, XRANGE} or set(YRANGE, ymin, ymax); 
  291. commands. Only data points within the limits will be used for the fit. 
  292. fitline() is implicitly stroked. 
  293.  
  294. \end{quote}
  295.  
  296. \vspace{3mm}
  297.  
  298. \noindent
  299. int or double {\bf get}(int option,char *str);
  300. \index{get attributes}
  301. \begin{quote}
  302.         Returns the value of the specified option in the current graphics 
  303. state. The numerical value for single valued elements is returned by the 
  304. function otherwise the return value is 0. A text representation of the 
  305. value is optionally returned in str. If used, be sure to allocate a 
  306. character array with sufficient space for str before calling this function 
  307. as in {\tt char str[80];} at the top of the program. The valid option 
  308. values are defined in splot.h. See also set() for a description of the 
  309. various options. The returned string can be printed using the command 
  310. puts(str);\index{puts} in the program where "str" is the name of the array 
  311. in the call to get(). Returned numerical values can be printed using 
  312. print(value);. The second array parameter is optional and is only really 
  313. needed for getting options that are more than just a single value such as 
  314. line patterns. 
  315.  
  316. \end{quote} 
  317.  
  318. \vspace{3mm}
  319.  
  320. \noindent
  321. void {\bf grestore}();
  322. \index{gsave/grestore}
  323. \begin{quote}
  324.         Pops a graphics state off the state stack thereby restoring the 
  325. graphics state that was in effect at the time the matching gsave() was 
  326. executed. In particular, the path, the clip path, the line styles, line 
  327. colours etc. are restored to their previous values. 
  328. \end{quote}
  329.  
  330. \vspace{3mm}
  331.  
  332. \noindent
  333. void {\bf gsave}();
  334. \begin{quote}
  335.         Pushes the current graphics state onto the state stack. The current 
  336. path, clip path, line style, colour etc. are saved so that they can be 
  337. restored later using a grestore() command. 
  338. \end{quote}
  339.  
  340. \vspace{3mm}
  341.  
  342. \noindent
  343. void {\bf label}(int axis, char *label);
  344. \index{label}
  345. \begin{quote}
  346.         Add labels to the axes box previously defined. The first parameter 
  347. is which axis to label either BOTTOM, TOP, LEFT or RIGHT. The following 
  348. parameter is the label to be printed. The label will be printed centered 
  349. between the appropriate edges of the current axes box. An error is 
  350. generated if there is no current axes box. All labels should be after 
  351. plotdata() if used otherwise spacing from the axes may not be correct. The 
  352. spacing can also be changed using set(LABELMARG,...);\index{set, 
  353. LABELMARG}. label(); is implicitly stroked. 
  354.  
  355. \end{quote}
  356.  
  357. \vspace{3mm}
  358.  
  359. \noindent
  360. void {\bf lineto}(double x,double y,...);
  361. \index{lineto}
  362. \begin{quote}
  363.         Adds a line segment to the current path from the current point to 
  364. (x,y). More than one coordinate point can be specified in the command in 
  365. which case a series of line segments connecting the points will be added to 
  366. the current path. If there is no current point then an error will be 
  367. generated. 
  368.  
  369. \end{quote}
  370.  
  371. \vspace{3mm}
  372.  
  373. \noindent
  374. void {\bf moveto}(double x, double y);
  375. \index{moveto}
  376. \begin{quote}
  377.         Sets the current point to (x,y). Also sets the path close point to 
  378. (x,y) for subsequent use with closepath(). Many path building commands such 
  379. as curveto() and lineto() require that a current point exist before calling 
  380. them. 
  381. \end{quote}
  382.  
  383. \vspace{3mm}
  384.  
  385. \noindent
  386. void {\bf newpath}();
  387. \index{newpath}
  388. \begin{quote}
  389.         Resets the current path to NULL and also causes the current point 
  390. to be undefined. Furthermore, it turns off the implicit 
  391. stroking\index{implicit stroking} of elements that are normally implicitly 
  392. stroked such as text()\index{text};. Thus using newpath() these elements can be added 
  393. to a path which must then be explicitly stroked. stroke() turns on implicit 
  394. stroking again. 
  395.  
  396. \end{quote}
  397.  
  398. \vspace{3mm}
  399.  
  400. \noindent
  401. void {\bf plotdata}(double *data,int xcol, int ycol);
  402. \index{plotdata}
  403. \begin{quote}
  404.         Plots the data found in array data\index{data} in a box. This 
  405. command chooses the scale sizes tick marks\index{tick marks} etc. to 
  406. display the data which is assumed to be in order of monotonically 
  407. increasing or decreasing x value order. The optional parameters xcol and 
  408. ycol correspond to the column numbers (starts at zero) of the tabular array 
  409. which are to be used for the x and y axis values respectively. If these 
  410. parameters are omitted then the values 0 and 1 are assumed. If the default 
  411. choices of plotdata are not acceptable a plot can be generated using the 
  412. step by step method using axes\_box(), tickmarks(), ticklabel()\index{tick 
  413. labels} and drawdata()\index{drawdata}. The data must first be read in to 
  414. array data using readdata( )\index{readdata}. The valid option values are 
  415. defined in splot.h. See also set() for a description of the various 
  416. options. plotdata() is implicitly stroked. 
  417.  
  418. \end{quote}
  419.  
  420. \vspace{3mm}
  421.  
  422. \noindent
  423. void {\bf readdata}(char * filename, double * data);
  424. \index{readdata}
  425. \begin{quote}
  426.         Reads a file of name filename and puts the data into the array 
  427. "data"\index{data}. The file should be in ASCII format with the x data in 
  428. one column and the y data values next column(s). Any line containing non 
  429. numeric characters or is blank will be considered a comment and ignored. 
  430. WARNING! As an optimization data is only read from disk once if the 
  431. configuration parameter always\_load\index{data, always load} is off. 
  432. Subsequent executions use the stored data already in memory (except after a 
  433. reset(). This means that if you modify the array "data" after reading in 
  434. values the next time the file is executed you will get strange results. 
  435. Similarly, if you reuse the same array for different plots in the same 
  436. drawing you will have trouble. The motto is never change the values in the 
  437. array "data". If you want to change the values declare another array and 
  438. copy the values. Also remember that readdata() implicitly allocates memory 
  439. for the data array so it is correct to declare the data array as double 
  440. *data; at the top. If however, you are going to fill in a new array with 
  441. calculated values you need to declare the array as double 
  442. newdata[ysize][xsize]; so that space will be allocated. 
  443.  
  444. \end{quote} 
  445.  
  446. \vspace{3mm}
  447.  
  448. \noindent
  449.  
  450. void {\bf rarrowto}(double x, double y,...); 
  451. \index{rarrowto}
  452. \begin{quote}
  453.   
  454.  Adds a line segment to the current path from the current 
  455.  point to the current point plus x, y. The line is 
  456.  terminated by drawing an arrow head oriented in the 
  457.  direction of the line. This command is identical to arrowto 
  458.  except that the displacement is specified relative to the 
  459.  current point. More than one coordinate point can be 
  460.  specified in the command in which case a series of line 
  461.  segments terminated by arrows connecting the points will be 
  462.  added to the current path. If there is no current point 
  463.  then an error will be generated. The size of the arrow 
  464.  head may be changed with the set(FONTWIDTH,...); command.
  465. \end{quote}
  466.   
  467.  
  468. \vspace{3mm}
  469.  
  470. \noindent
  471. void {\bf reset}();
  472. \index{reset}
  473. \begin{quote}
  474.         Restores all set able parameters to their default values. Clears 
  475. the current path and clip path. 
  476. \end{quote}
  477.  
  478. \vspace{3mm}
  479.  
  480. \noindent
  481. void {\bf rlineto}(double x,double y,...);
  482. \index{rlineto}
  483. \begin{quote}
  484.         Adds a line segment to the current path from the current point to 
  485. the current point plus x, y. This command is identical to lineto except 
  486. that the displacement is specified relative to the current point. More than 
  487. one coordinate point can be specified in the command in which case a series 
  488. of line segments connecting the points will be added to the current path. 
  489. If there is no current point then an error will be generated. 
  490. \end{quote}
  491.  
  492. \vspace{3mm}
  493.  
  494. \noindent
  495. void {\bf rmoveto}(double x, double y);
  496. \index{rmoveto}
  497. \begin{quote}
  498.         Sets the current point to the current point plus x,y. This command 
  499. is the same as moveto except that a relative move is specified. It also 
  500. sets the path close point for subsequent use with closepath(). Many path 
  501. building commands such as curveto and lineto require that a current point 
  502. exist before calling them. 
  503. \end{quote}
  504.  
  505. \vspace{3mm}
  506.  
  507. \noindent
  508. void {\bf rotate}(double ang);
  509. \index{rotate}
  510. \begin{quote}
  511.  Rotates the figure about the
  512.  current origin by the the angle 
  513.  specified. The angle units are
  514.  degrees and the +ve direction
  515.  is counterclockwise.  
  516.  Changes in rotation are cumulative.
  517. \end{quote}
  518.  
  519. \vspace{3mm}
  520.  
  521. \noindent
  522. void {\bf scale}(double xs, double ys);
  523. \index{scale}
  524. \begin{quote}
  525.  Changes the scale of the figure
  526.  by the factors specified for
  527.  the x and y axes respectively.
  528.  Changes in scale are cumulative.
  529. \end{quote}
  530.  
  531. \vspace{3mm}
  532.  
  533. \noindent
  534. void {\bf set}(int option, ...);
  535. \index{set attributes}
  536.  
  537. \begin{quote}
  538.         All set able parameters can be set using the set command. The first 
  539. parameter specifies which option to set. The defined constants 
  540. corresponding to valid options are defined in the header file splot.h. 
  541. (See Section \ref{sec:set}, `set' Functions.)
  542. \end{quote}
  543.                
  544. \vspace{3mm}
  545.  
  546. \noindent
  547. void {\bf showpage}();
  548. \index{showpage}
  549. \begin{quote}
  550.         Transfers the marked page created in memory by the stroke and fill 
  551. commands to the physical page. This is 
  552.  automatically done at the end of the file and thus this
  553.  command is only needed if it is desirable to draw parts
  554.  of the figure before the end of execution.
  555. \end{quote} 
  556.  
  557. \vspace{3mm}
  558.  
  559. \noindent
  560. void {\bf stroke}();
  561. \index{stroke}
  562. \begin{quote}
  563.         Marks the page in memory with the current path\index{path}. The path 
  564. coordinates are transformed using the current coordinate transformation 
  565. matrix and the path is fleshed out using the current line width, style and 
  566. colour in effect at the time of the stroke() command. 
  567. \end{quote}
  568.  
  569. \vspace{3mm}
  570.  
  571. \noindent
  572. void {\bf symbol}(double x, double y, int symbolconst); 
  573. \index{symbol}
  574. \newline
  575. or
  576. \newline
  577. \noindent
  578. void {\bf symbol}(int symbolconst); 
  579. \begin{quote}
  580.  Plots the symbol chosen by symbolconst at the point x,y. 
  581.  symbolconst must be one of OCIRCLE, OSQUARE, OTRIANGLE, 
  582.  ODIAMOND OSTAR, OARROW, PLUS, CROSS, MULT, CIRCLE, SQUARE, 
  583.  TRIANGLE, DIAMOND, STAR,or ARROW. If the point x,y is 
  584.  omitted the symbol is drawn at the current point as set 
  585.  by a previous moveto();. symbol() is not implicitly 
  586.  stroked so follow with a stroke();.  
  587.  The size of a symbol can be changed using set(FONTWIDTH, 
  588.  val\_in\_cm); since symbols are just a special font. The size 
  589.  relative to the current FONTWIDTH can be set using 
  590.  set(SYMMULT,mult);
  591. \end{quote}
  592.  
  593. \vspace{3mm}
  594.  
  595. \noindent
  596. void {\bf text}(double x, double y, char * str,int just);     
  597. \index{text}
  598. \begin{quote}
  599.  Adds the text string str to the current path starting at location (x,y). 
  600.  The current font, size and orientation as set using the set() command are 
  601.  used. Super/sub scripts can be entered as $\wedge$2$\wedge$ and \_2\_ respectively. 
  602.  Letters surrounded by '!' or '\#' are printed in Greek or italics 
  603.  respectively. For example !m! generates the Greek lower case mu. The 
  604.  special characters ``$\wedge$\_!\#\$'' can be printed by preceding them with 
  605.  $\backslash$ as in $\backslash$!. The combination $\backslash$b back 
  606.  spaces by one character. Symbols may be included in the text string by 
  607.  enclosing them with \$. If the starting x,y coordinates are omitted then 
  608.  the current string is positioned one line below the previous string added 
  609.  to the path using text(). The last parameter is the justification and must 
  610.  be one of LEFT, RIGHT or CENTER. This last parameter can be omitted in 
  611.  which case the default value of LEFT will be used. text() is implicitly 
  612.  stroked. 
  613.  
  614. \end{quote}
  615.  
  616. \vspace{3mm}
  617.  
  618. \noindent
  619. void {\bf ticklabel}(int axis, double v, char *label,...);
  620. \index{ticklabel}
  621. \begin{quote}
  622.         Add tick labels to the axes box previously defined. The first 
  623. parameter is which axis to label either BOTTOM, TOP, LEFT or RIGHT. The 
  624. following parameters are paired values giving the tick position in data 
  625. coordinates as established by a prior call to axes\_box() or ascale() and the text 
  626. string to be placed at that location. An error is generated if there is no 
  627. current axes box. There are several default possibilities. If 'ticklabel();' 
  628. is called without any parameters then if tick marks have been generated 
  629. previously using 'tickmarks();'\index{tickmarks} then they will be selectively labelled 
  630. along the left and bottom axes. If only an axis parameter is given then the 
  631. corresponding axis tick marks if any will be labelled. If the axis 
  632. parameter is followed by a list of numbers only they will be 
  633. assumed to be both the tick position and the desired label. If the numbers 
  634. are paired with strings in the parameter list then the number will be used 
  635. as the tick label position and the string will be used as the literal 
  636. label. The spacing between the tick labels and the axes box can be changed 
  637. using set(TICKLMARG,...);\index{set, TICKLMARG} ticklabel() is implicitly stroked.
  638. \end{quote}
  639.  
  640. \vspace{3mm}
  641.  
  642. \noindent
  643. void {\bf tickmarks}(int axis, double v,...);
  644. \index{tickmarks}
  645. \begin{quote}
  646.         Add tick marks to the axes box previously defined. The first 
  647. parameter is which axis either BOTTOM , TOP, LEFT, RIGHT ,XAXES or YAXES. 
  648. The following numbers are the positions were tickmarks are to to be placed. 
  649. The length of the ticks is set using a set(TICKLENGTH,val)\index{set, 
  650. TICKLENGTH} command. The location of the ticks is specified in data 
  651. coordinates as established by the prior call to axes\_box() or ascale(). An 
  652. error is generated if there is no current axes\_box. All the above 
  653. parameters are optional. The default behaviour is as follows. If all 
  654. parameters are omitted tick marks will be automatically generated for all 
  655. axes. If only an axis specifier is given then tick marks will be generated 
  656. for the corresponding axis or axes. In these cases 'tickmarks();' will try 
  657. to find reasonable positions for a set of tick marks. If this default 
  658. behaviour is unacceptable then the actual tick positions can be specified 
  659. as a list of values following the axis specifier. If there is only one 
  660. numeric value it is interpreted as a tick spacing. tickmarks() is 
  661. implicitly stroked. 
  662.  
  663. \end{quote} 
  664.  
  665. \vspace{3mm}
  666.  
  667. \noindent
  668. void {\bf translate}(double tx, double ty);
  669. \index{translate}
  670. \begin{quote}
  671.  Translates the origin of the 
  672.  figure by the x and y distances
  673.  specified. Translations are 
  674.  cumulative.
  675. \end{quote}
  676.  
  677. \vspace{3mm}
  678.  
  679. \noindent
  680. void {\bf whereis}(double *x,double *y); 
  681. \index{whereis}
  682. \begin{quote}
  683.         Returns  the coordinates  of the  current point  as set by the last 
  684. moveto(), lineto() etc. 
  685. \end{quote}
  686.  
  687. \subsection{`set' Functions}
  688. \label{sec:set}\index{set, fucntions}
  689. What follows is a very brief description of all the values set able using set(). 
  690.  
  691. \vspace{3mm}
  692.  
  693. \noindent
  694. set({\bf AXESCLIP},val);
  695. \index{set, AXESCLIP}
  696. \begin{quote}
  697.         If val is ON then the data values are clipped to the limits of the 
  698. axes box. This is temporarily added to the user set clip limits if any. If 
  699. val is OFF (the default) then the user specified clip limits from the last 
  700. clip() call are used. 
  701.  Alternatively the range of data values plotted can be set
  702.  using set(XRANGE,...); set(YRANGE,...);\index{set, XRANGE} .
  703. \end{quote}
  704.  
  705. \vspace{3mm}
  706.  
  707. \noindent
  708. set({\bf AXESTYPE},val); 
  709. \index{set, AXESTYPE}
  710. \begin{quote}
  711.         AXESTYPE may be one of the following. LINEAR (the default), LOGX, 
  712. LOGY, LOGLOG, INVX, INVY, INVINV, INVXLOGY or LOGXINVY. The position of 
  713. data points and tickmarks are automatically adjusted to account for the 
  714. axes type. 
  715. \end{quote}
  716.  
  717. \vspace{3mm}
  718.  
  719. \noindent
  720. set({\bf CURSYMBOL},sym);
  721. \index{set, CURSYMBOL}
  722. \begin{quote}
  723.         Sets the symbol to use when plotting data with symbols. sym must be 
  724. one of OCIRCLE, OSQUARE, OTRIANGLE , ODIAMOND OSTAR, OARROW, PLUS, CROSS, 
  725. MULT, CIRCLE, SQUARE, TRIANGLE, DIAMOND, STAR, or ARROW. The default symbol 
  726. is CIRCLE. The size of a symbol can be changed using 
  727. set(FONTWIDTH,val\_in\_cm);\index{set, FONTWIDTH} since symbols are just a special font. 
  728. The size relative to the current FONTWIDTH can be set using 
  729.  set(SYMMULT,mult);\index{set, SYMMULT}. 
  730. \end{quote}  
  731.  
  732. \vspace{3mm}
  733.  
  734. \noindent
  735. set({\bf FILLRULE},type);
  736. \index{set, FILLRULE}
  737. \begin{quote}
  738.         Determines the rule to be used when filling a path. Type must be 
  739. one of NONZWIND (default) or EVENODD. 
  740. \end{quote}  
  741.  
  742. \vspace{3mm}
  743.  
  744. \noindent
  745. set({\bf FLATNESS},num); 
  746. \index{set, FLATNESS}
  747. \begin{quote}
  748.         Sets the maximum allowable error in pixels when converting a curve 
  749. to a set of straight line segments. Smaller values of num give smother 
  750. curves but take longer to process. The default value of num is 1.
  751. \end{quote}  
  752.  
  753. \vspace{3mm}
  754.  
  755. \noindent
  756. set({\bf FONT},fonttype);
  757. \index{set, FONT}
  758. \begin{quote}
  759.         Sets the font type to use for subsequent text written using the 
  760. text(); routine. font name type must be either SIMPLEX (default) or COMPLEX. 
  761. \end{quote}  
  762.  
  763. \vspace{3mm}
  764.  
  765. \noindent
  766. set({\bf FONTASPECT},asp);
  767. \index{set, FONTASPECT}
  768. \begin{quote}
  769.         Sets the ratio of the glyph height to width used for text written 
  770. using text();. The default value is 2.5. 
  771. \end{quote}  
  772.  
  773. \vspace{3mm}
  774.  
  775. \noindent
  776. set({\bf FONTDIR },angle);
  777. \index{set, FONTDIR}
  778. \begin{quote}
  779.         Sets the rotation angle with respect to the x axis to use when 
  780. writing text using text(); The default is 0. 
  781. \end{quote}
  782.  
  783. \vspace{3mm}
  784.  
  785. \noindent
  786. set({\bf FONTMULT},factor);
  787. \index{set, FONTMULT}
  788. \begin{quote}
  789.         Multiplies the current font size by the given factor. 
  790. \end{quote}  
  791.  
  792. \vspace{3mm}
  793.  
  794. \noindent
  795. set({\bf FONTWIDTH},wid);
  796. \index{set, FONTWIDTH}
  797. \begin{quote}
  798.         Sets the average width of the characters written using text(). The 
  799. default value is 0.7 cm. FONTWIDTH applies also to symbols. 
  800. \end{quote}  
  801.  
  802. \vspace{3mm}
  803.  
  804. \noindent
  805. set({\bf LABELMARG},val);
  806. \index{set, LABELMARG}
  807. \begin{quote}
  808.         Adds an additional amount to the margin between the plot and the 
  809. plot labels generated using the "label();" command. val = 0 is the default. 
  810. \end{quote}
  811.  
  812. \vspace{3mm}
  813.  
  814. \noindent
  815. set({\bf LINECAP},type);
  816. \index{set, LINECAP}
  817. \begin{quote}
  818.         Determines how thick lines are to be terminated. The allowed types 
  819. are BUTTCAP (default), ROUNDCAP and PROJCAP. 
  820. \end{quote}  
  821.  
  822. \vspace{3mm}
  823.  
  824. \noindent
  825. set({\bf LINECOLOUR},col); 
  826. \index{set, LINECOLOUR}
  827. \begin{quote}
  828.         Where col is one of BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN or 
  829. WHITE. This set the colour to use when the current path is stroked or 
  830. filled. The default colour is BLACK with the background WHITE. 
  831. \end{quote}
  832.  
  833. \vspace{3mm}
  834.  
  835. \noindent
  836. set({\bf LINEJOIN},type);
  837. \index{set, LINEJOIN}
  838. \begin{quote}
  839.         Determines how thick lines are joined together. The allowed join 
  840. types are MITERJOIN (default), BEVELJOIN and ROUNDJOIN. 
  841. \end{quote}  
  842.  
  843. \vspace{3mm}
  844.  
  845. \noindent
  846. set({\bf LINESTYLE},pattern,...);
  847. \index{set, LINESTYLE}
  848. \begin{quote}
  849.  Sets the line style to use for the path when it is 
  850.  stroked. The constant LINESTYLE is followed by a list of 
  851.  floating point values that define the pattern. The values 
  852.  are interpreted as the length along the path that the line 
  853.  is visible followed by the length that it is invisible as 
  854.  an alternating sequence wrapping back to the beginning 
  855.  when the pattern reaches the end. For example a pattern of 
  856.  1.0,1.0 implies on for 1 cm followed by off for 1 cm. A 
  857.  pattern of 1.0,0.5 is on for 1 cm followed by off for 0.5 
  858.  cm. The predefined patterns are: SOLID 0 (default) DASHED 
  859.  1.0,0.5 DOTTED 0.2,0.2 and DOTDASH 1.0,0.5,0.2,0.5. There 
  860.  must always be an even number of comma separated values in 
  861.  a pattern definition. 
  862. \end{quote}
  863.  
  864. \vspace{3mm}
  865.  
  866. \noindent
  867. set({\bf LINEWIDTH},width); 
  868. \index{set, LINEWIDTH}
  869. \begin{quote}
  870.         Sets the LINEWIDTH to width cm (default 0.05 cm). This line width is 
  871. used when the current path is stroked. 
  872. \end{quote}
  873.  
  874. \vspace{3mm}
  875.  
  876. \noindent
  877. set({\bf MITERLIMIT},maxratio);
  878. \index{set, MITERLIMIT}
  879. \begin{quote}
  880.         Sets the maximum length of spikes formed by miter joining two lines 
  881. at an acute angle. If the ratio of the length of the spike to the width 
  882. exceeds the value of maxratio then a BEVELJOIN is done instead. The default 
  883. value is 10.0. 
  884. \end{quote}  
  885.  
  886. \vspace{3mm}
  887.  
  888. \noindent
  889. set({\bf PAGEROT},flag);
  890. \index{set, PAGEROT}
  891. \begin{quote}
  892.  Selects landscape orientation if flag is ON. Default is portrait.
  893. \end{quote}
  894.  
  895. \vspace{3mm}
  896.  
  897. \noindent
  898. set({\bf PATTOFF},offset);
  899. \index{set, PATTOFF}
  900. \begin{quote}
  901.  Sets the offset into the current LINESTYLE\index{set, LINESTYLE} pattern. Can be
  902.  used to adjust the starting point of a pattern for aesthetic
  903.  reasons.
  904. \end{quote}
  905.  
  906. \vspace{3mm}
  907.  
  908. \noindent
  909. set({\bf PLOTTYPE},type);
  910. \index{set, PLOTTYPE}
  911. \begin{quote}
  912.         Sets the current plot type. type must be one of LINES (default), 
  913. SYMBOLS or SYM\_LINES. LINES connects data points with line segments while 
  914. SYMBOLS causes the current symbol to be drawn at each data point. SYM\_LINES 
  915. does both. The size of a symbol can be changed using set(FONTWIDTH, 
  916. val\_in\_cm); since symbols are just a special font. The size 
  917. relative to the current FONTWIDTH can be set using set(SYMMULT,mult);. 
  918. \end{quote}  
  919.  
  920. \vspace{3mm}
  921.  
  922. \noindent
  923. set({\bf SCALEALL},val);
  924. \index{set, SCALEALL}
  925. \begin{quote}
  926.         If val is ON then the XSHIFT, YSHIFT, XMULT, YMULT values are 
  927. applied to all coordinates (i.e. in lineto, moveto etc.). The default is OFF 
  928. in which case only data plotted using plotdata or drawdata is affected by 
  929. these values. 
  930. \end{quote}
  931.  
  932. \vspace{3mm}
  933.  
  934. \noindent
  935. set({\bf SCRIPTSCALE},val);
  936. \index{set SCRIPTSCALE}
  937. \begin{quote}
  938.         Sets the relative height of a super/sub script as compared to 
  939. ordinary text. The default value is 0.5.
  940. \end{quote}
  941.  
  942. \vspace{3mm}
  943.  
  944. \noindent
  945. set({\bf SCRIPTSHIFT},val);
  946. \index{set SCRIPTSHIFT}
  947. \begin{quote}
  948.         Sets the distance that a super/sub script is shifted above/below 
  949. ordinary text. The value is specified as a fraction of the ordinary text height.
  950. The default value is 0.7.
  951. \end{quote}
  952.  
  953.  
  954. \vspace{3mm}
  955.  
  956. \noindent
  957. set({\bf SYMMULT},val)
  958. \index{set, SYMMULT}
  959. \begin{quote}
  960.  Sets the symbol size multiplier used when drawing symbols. 
  961.  The default value is 1.0. The actual symbol size is 
  962.  determined the current FONTWIDTH multiplied by the curent 
  963.  SYMMULt value. 
  964. \end{quote}
  965.  
  966.  
  967. \vspace{3mm}
  968.  
  969. \noindent
  970. set({\bf TICKLENGTH},len);
  971. \index{set, TICKLENGTH}
  972. \begin{quote}
  973.         Sets the length of axis tick marks to be used. The default value is 
  974. 0.3 cm. 
  975. \end{quote}
  976.  
  977. \vspace{3mm}
  978.  
  979. \noindent
  980. set({\bf TICKLMARG},val);
  981. \index{set TICKMARG}
  982. \begin{quote}
  983.         This value corresponds to the margin used between the axes box and 
  984. any tick labels generated using the "ticklabel();" command. val = 0 is 
  985. the default. 
  986. \end{quote}
  987.  
  988. \vspace{3mm}
  989.  
  990. \noindent
  991. \index{set, XMULT}
  992. set({\bf XMULT},xmul);
  993. \begin{quote}
  994.    Causes each x value to be multiplied by xmul before being plotted. 
  995. \end{quote}  
  996.  
  997. \vspace{3mm}
  998.  
  999. \noindent
  1000. set({\bf XRANGE},xmin,ymin);
  1001. \index{set, XRANGE}
  1002. \begin{quote}
  1003.         data plotted using drawdata is constrained to have x values between 
  1004. xmin and xmax. There is also a corresponding YRANGE set option. The default 
  1005. is no constraints. The values should be specified in user coordinates i.e. 
  1006. those established by the current axes\_box() or ascale(). 
  1007. \end{quote}
  1008.  
  1009. \vspace{3mm}
  1010.  
  1011. \noindent
  1012. set({\bf XSHIFT},xshft);
  1013. \index{set, XSHIFT}
  1014. \begin{quote}
  1015.    Causes the value xshft to be added to all x values before plotting. 
  1016. \end{quote}  
  1017.  
  1018. \vspace{3mm}
  1019.  
  1020. \noindent
  1021. set({\bf YSHIFT},yshft);
  1022. \begin{quote}
  1023.    Causes the value yshft to be added to all y values before plotting. 
  1024. \end{quote}  
  1025.  
  1026. \vspace{3mm}
  1027.  
  1028. \noindent
  1029. set({\bf YMULT},ymul);
  1030. \begin{quote}
  1031.    Causes each y value to be multiplied by ymul before being plotted. 
  1032. \end{quote}
  1033.  
  1034.  
  1035.  
  1036. \section{Standard C Function Library Reference}
  1037.  
  1038.  
  1039. \vspace{3mm}
  1040.  
  1041. \noindent
  1042. int {\bf abs}(int i);
  1043. \index{C library function, abs}
  1044. \begin{quote}
  1045. Returns the absolute value of i;
  1046. \end{quote}
  1047.  
  1048. \vspace{3mm}
  1049.  
  1050. \noindent
  1051. double {\bf acos}(double x);
  1052. \index{C library function, acos}
  1053. \begin{quote}
  1054.    Returns the arc cosine of the value x. x must be between -1 and 1. Returns 
  1055. a value between 0 and $\pi$. 
  1056. \end{quote}
  1057.  
  1058. \vspace{3mm}
  1059.  
  1060. \noindent
  1061. double {\bf asin}(double x);
  1062. \index{C library function, asin}
  1063. \begin{quote}
  1064.    Returns the arc sine of the value x. x must be between -1 and 1. Returns a 
  1065. value between -$\pi$/2 and $\pi$/2. 
  1066. \end{quote}
  1067.  
  1068. \vspace{3mm}
  1069.  
  1070. \noindent
  1071. double {\bf atan}(double x);
  1072. \index{C library function, atan}
  1073. \begin{quote}
  1074.    Returns the arc tangent of the value x. Returns a value between -$\pi$/2  and 
  1075. $\pi$/2. 
  1076. \end{quote}
  1077.  
  1078. \vspace{3mm}
  1079.  
  1080. \noindent
  1081. double {\bf atan2}(double y,double x);
  1082. \index{C library function, atan2}
  1083. \begin{quote}
  1084.    Returns the arc tangent of the value y/x. Returns a value between -$\pi$  and 
  1085. $\pi$. 
  1086. \end{quote}
  1087.  
  1088. \vspace{3mm}
  1089.  
  1090. \noindent
  1091. double {\bf atof}(char *str);
  1092. \index{C library function, atof}
  1093. \begin{quote}
  1094.    Converts a string to a double. The string must  contain  only  digits  and 
  1095. 'e', 'E', '.', '-' and '+' . 
  1096. \end{quote}
  1097.  
  1098. \vspace{3mm}
  1099.  
  1100. \noindent
  1101. int {\bf atoi}(char *str);
  1102. \index{C library function, atoi}
  1103. \begin{quote}
  1104.    Converts a string to an integer. The string must contain only digits. 
  1105. \end{quote}
  1106.  
  1107. \vspace{3mm}
  1108.  
  1109. \noindent
  1110. double {\bf ceil}(double x);
  1111. \index{C library function, ceil}
  1112. \begin{quote}
  1113.    Rounds up x to nearest integer value. 
  1114. \end{quote}
  1115.  
  1116. \vspace{3mm}
  1117.  
  1118. \noindent
  1119. double {\bf cos}(double x);
  1120. \index{C library function, cos}
  1121. \begin{quote}
  1122.    Returns the cosine of x. x is specified in degrees. 
  1123. \end{quote}
  1124.  
  1125. \vspace{3mm}
  1126.  
  1127. \noindent
  1128. void {\bf exit}(int status);
  1129. \index{C library function, exit}
  1130. \begin{quote}
  1131.    Terminates the execution of the program. If the status is 0 then  it  will 
  1132. be considered a normal exit otherwise an error induced exit. 
  1133. \end{quote}
  1134.  
  1135. \vspace{3mm}
  1136.  
  1137. \noindent
  1138. double {\bf exp}(double x);
  1139. \index{C library function, exp}
  1140. \begin{quote}
  1141.    Calculates the exponential function exp(x). 
  1142. \end{quote}
  1143.  
  1144. \vspace{3mm}
  1145.  
  1146. \noindent
  1147. double {\bf fabs}(double x);
  1148. \index{C library function, fabs}
  1149. \begin{quote}
  1150.    Returns the absolute value of x. It is like abs() but works with  floating 
  1151. point numbers rather than integers. 
  1152. \end{quote}
  1153.  
  1154. \vspace{3mm}
  1155.  
  1156. \noindent
  1157. double {\bf floor}(double x);
  1158. \index{C library function, floor}
  1159. \begin{quote}
  1160. Rounds down x to the nearest integer.
  1161. \end{quote}
  1162.  
  1163. \vspace{3mm}
  1164.  
  1165. \noindent
  1166. double {\bf fmod}(double x,double y);
  1167. \index{C library function, fmod}
  1168. \begin{quote}
  1169. Returns the remainder of x/y. 
  1170. \end{quote}
  1171.  
  1172. \vspace{3mm}
  1173.  
  1174. \noindent
  1175. void {\bf free}(char *ptr);
  1176. \index{C library function, free}
  1177. \begin{quote}
  1178.    Frees the block of memory pointed to by ptr. The  memory  must  have  been 
  1179. previously allocated using malloc(). 
  1180. \end{quote}
  1181.  
  1182. \vspace{3mm}
  1183.  
  1184. \noindent
  1185. double {\bf log}(double x);
  1186. \index{C library function, log}
  1187. \begin{quote}
  1188. Returns the natural log of x. 
  1189. \end{quote}
  1190.  
  1191. \vspace{3mm}
  1192.  
  1193. \noindent
  1194. double {\bf log10}(double x);
  1195. \index{C library function, log10}
  1196. \begin{quote}
  1197. Returns the log base 10 of x.
  1198. \end{quote}
  1199.  
  1200. \vspace{3mm}
  1201.  
  1202. \noindent
  1203. char {\bf *malloc}(int size);
  1204. \index{C library function, malloc}
  1205. \begin{quote}
  1206.    Allocates a block of memory of size bytes and returns  a  pointer  to  the 
  1207. block. malloc returns NULL if there is insufficient free memory. 
  1208. \end{quote}
  1209.  
  1210. \vspace{3mm}
  1211.  
  1212. \noindent
  1213. double {\bf pow}(double x,double y);
  1214. \index{C library function, pow}
  1215. \begin{quote}
  1216. Calculates x to the power y.
  1217. \end{quote}
  1218.  
  1219. \vspace{3mm}
  1220.  
  1221. \noindent
  1222. int {\bf puts}(char *str);
  1223. \index{C library function, puts}
  1224. \begin{quote}
  1225.    This routine writes the string str to the output file  and  starts  a  new 
  1226. line. 
  1227. \end{quote}
  1228.  
  1229. \vspace{3mm}
  1230.  
  1231. \noindent
  1232. int {\bf printf}(char *format,...);
  1233. \index{C library function, printf}
  1234. \begin{quote}
  1235.    Prints the formatted data to the output file. The format string  specifies 
  1236. the type and number of values to print. Some common examples include: 
  1237.  
  1238.    printf(``i = \%d'',i); prints the integer value i. 
  1239.  
  1240.    printf(``x = \%g'',x); prints the floating point value x. 
  1241.  
  1242.    printf(``text = \%s'',str); prints the string str. 
  1243.  
  1244. Multiple values can be printed as in printf(``\%d \%d \%g \%s'',i,j,x,str); 
  1245.  
  1246.    The format  specifiers  can  also  include  field  width  information  and 
  1247. justification etc. Consult a standard C text for more details. 
  1248. \end{quote}
  1249.  
  1250. \vspace{3mm}
  1251.  
  1252. \noindent
  1253. void {\bf print}(v,...);
  1254. \index{C library function, print}
  1255. \begin{quote}
  1256.    Prints the value v which can be of any scalar type. i.e int, char,  float, 
  1257. double or a pointer. This is not a function found in the standard C library. 
  1258. \end{quote}
  1259.  
  1260. \vspace{3mm}
  1261.  
  1262. \noindent
  1263. double {\bf sin}(double x);
  1264. \index{C library function, sin}
  1265. \begin{quote}
  1266.    Returns the sine of x. x must be specified in degrees. 
  1267. \end{quote}
  1268.  
  1269. \vspace{3mm}
  1270.  
  1271. \noindent
  1272. int {\bf sizeof}(t);
  1273. \index{C library function, sizeof}
  1274. \begin{quote}
  1275.    Returns the number of bytes required to store the value of type t. 
  1276. \end{quote}
  1277.  
  1278. \vspace{3mm}
  1279.  
  1280. \noindent
  1281. double {\bf sqrt}(double x);
  1282. \index{C library function, sqrt}
  1283. \begin{quote}
  1284.    Calculates the square root of x. x must be a positive number. 
  1285. \end{quote}
  1286.  
  1287. \vspace{3mm}
  1288.  
  1289. \noindent
  1290. int {\bf sprintf}(char str,char *format,...);
  1291. \index{C library function, sprintf}
  1292. \begin{quote}
  1293.    Prints the formatted data to the string str. The format  string  specifies 
  1294. the type and number of values to print. Some common examples include: 
  1295.  
  1296.    printf(``i = \%d'',i); prints the integer value i. 
  1297.  
  1298.    printf(``x = \%g'',x); prints the floating point value x. 
  1299.  
  1300.    printf(``text = \%s'',str); prints the string str. 
  1301.  
  1302. Multiple values can be printed as in
  1303.  
  1304.    printf(``\%d \%d \%g \%s'',i,j,x,str); 
  1305.  
  1306.    The format  specifiers  can  also  include  field  width  information  and 
  1307. justification etc. Consult a standard C text for more details. 
  1308. \end{quote}
  1309.  
  1310. \vspace{3mm}
  1311.  
  1312. \noindent
  1313. void {\bf strcat}(char *dest, char *source);
  1314. \index{C library function, strcat}
  1315. \begin{quote}
  1316.    Concatenates the string source to the string dest. 
  1317. \end{quote}
  1318.  
  1319. \vspace{3mm}
  1320.  
  1321. \noindent
  1322. void {\bf strcpy}(char *dest, char *source);
  1323. \index{C library function, strcpy}
  1324. \begin{quote}
  1325.    Copies the string source to the string dest. 
  1326. \end{quote}
  1327.  
  1328. \vspace{3mm}
  1329.  
  1330. \noindent
  1331. int {\bf strlen}(char *str);
  1332. \index{C library function, strlen}
  1333. \begin{quote}
  1334.    Returns the length of the string str. 
  1335. \end{quote}
  1336.  
  1337. \vspace{3mm}
  1338.  
  1339. \noindent
  1340. double {\bf tan}(double x);
  1341. \index{C library function, tan}
  1342. \begin{quote}
  1343.    Calculates the value of the tangent of x. x should be specified in 
  1344. degrees. 
  1345. \end{quote}
  1346.