Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ atol(3) — NEWS-os 3.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scanf(3S)

ATOF(3)  —  UNIX Programmer’s Manual

名称

atof, atoi, atol  −  ASCII文字を数字に変換する

形式

double atof(nptr)
char ∗nptr;

atoi(nptr)
char ∗nptr;

long atol(nptr)
char ∗nptr;

解説

これらの関数はそれぞれ、 nprt が指す文字列を float(浮動小数点数)、 int(整数)、および long int(倍精度整数)の表現に変換します。

atof は、 (0 を含む)任意個の空白列、 次に省略可能な符号、 次に数字列(この中に小数点が含まれていても良い)、 次に省略可能な ’e’ または ’E’、 そして省略可能な(符号付き)整数といった引数を解釈します。

atoi と atol (0 を含む)任意個の空白列、 次に(省略可能な符号付)数字列を解釈します。

関連事項

scanf(3S)

バグ

オーバーフローについては何も対処していません。

NEWS-OSRelease 3.3

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