home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / PrintDbl.3 < prev    next >
Encoding:
Text File  |  1995-07-26  |  2.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee((((3333))))          TTTTccccllll ((((7777....0000))))          TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tcl_PrintDouble - Convert floating value to string
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttccccllll....hhhh>>>>
  15.  
  16.           TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee(_i_n_t_e_r_p, _v_a_l_u_e, _d_s_t)
  17.  
  18.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  19.           Tcl_Interp   *_i_n_t_e_r_p   (in)      Interpreter  that  controls
  20.                                            the conversion.
  21.  
  22.           double       _v_a_l_u_e     (in)      Floating-point value to  be
  23.                                            converted.
  24.  
  25.           char         *_d_s_t      (out)     Where   to   store   string
  26.                                            representing  _v_a_l_u_e.   Must
  27.                                            have        at        least
  28.                                            TCL_DOUBLE_SPACE characters
  29.                                            of storage.
  30.      _________________________________________________________________
  31.  
  32.  
  33.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  34.           TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee generates a string that represents the value
  35.           of  _v_a_l_u_e  and  stores it in memory at the location given by
  36.           _d_s_t.  It uses %g format to generate  the  string,  with  two
  37.           special  twists.  First, the string is guaranteed to contain
  38.           either a ``.'' or an ``e'' so that it doesn't look  like  an
  39.           integer  (where %g would generate an integer with no decimal
  40.           point, TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee adds ``.0'').  Second, the number  of
  41.           significant  digits  printed  at  _d_s_t  is  controlled by the
  42.           ttttccccllll____pppprrrreeeecccciiiissssiiiioooonnnn  variable  in  _i_n_t_e_r_p;   if  ttttccccllll____pppprrrreeeecccciiiissssiiiioooonnnn  is
  43.           undefined then 6 significant digits are printed.
  44.  
  45.  
  46.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  47.           conversion, double-precision, floating-point, string
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/10/95)
  64.  
  65.  
  66.  
  67.