About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/atof.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 atof Context: slangrtl

Synopsis

Convert a string to a double precision number

Syntax

Double_Type atof (String_Type s)

Description

This function converts a string s to a double precision value and returns the result. It performs no error checking on the format of the string. The function _slang_guess_type may be used to check the syntax of the string.

Example

     define error_checked_atof (s)
     {
        switch (_slang_guess_type (s))
        {
           case Double_Type:
             return atof (s);
        }
        {
           case Integer_Type:
             return double (integer (s));
        }

        verror ("%s is not a double", s);
    }
Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.