Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ atof(3C) — GL1 W2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scanf(3S)

strtol(3C)

fpsignal(3C)

ATOF(3C)  —  Silicon Graphics

NAME

atof,_latof − convert ASCII string to floating-point number

SYNOPSIS

float atof (nptr)
char ∗nptr;

long float _latof (nptr)
char ∗nptr;

DESCRIPTION

(_l)atof converts a character string pointed to by nptr to a floating-point number of the indicated precision.  The first unrecognized character ends the conversion.  (_l)atof recognizes an optional string of white-space characters (tabs and spaces), then an optional sign, then a string of digits optionally containing a decimal point, then an optional e or E followed by an optionally signed integer.  If the string begins with an unrecognized character, (_l)atof returns the value zero. 

DIAGNOSTICS

The low-level floating point routines will raise a floating point exception if the conversion done by (_l)atof overflows or underflows. 

SEE ALSO

scanf(3S), strtol(3C), fpsignal(3C). 

Version 2.1  —  January 02, 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026