「C言語/標準ライブラリ/stdlib.h」の版間の差分

削除された内容 追加された内容
「型」「マクロ」の節を追加
30 行
=== atof関数 ===
<ref>『JISX3010:2003』p.221「7.20.1.1 atof関数」</ref>
*形式
<pre>
#include <stdlib.h>
double atof(const char *nptr);
</pre>
*引数
:nptr 文字列
*返却値
:変換された値。
*機能
:atof関数とは、nptrが指す文字列の最初の部分を、double型の表現に変換する関数である。
*例
<pre>
 
</pre>
=== atoi, atol及びatoll関数 ===
<ref>『JISX3010:2003』p.221「7.20.1.2 atoi, atol及びatoll関数」</ref>
*形式
<pre>
#include <stdlib.h>
int atoi(const char *nptr);
long int atol(const char *nptr);
long long int atoll(const char *nptr);
</pre>
*引数
:nptr 文字列
*返却値
:変換された値。
*機能
:atoi関数とは、nptrが指す文字列の最初の部分を、int型の表現に変換する関数である。
:atol関数とは、nptrが指す文字列の最初の部分を、long int型の表現に変換する関数である。
:atoll関数とは、nptrが指す文字列の最初の部分を、long long int型の表現に変換する関数である。
*例
<pre>
 
</pre>
=== strtod, strtof及びstrtold関数 ===
<ref>『JISX3010:2003』p.222「7.20.1.3 strtod, strtof及びstrtold関数」</ref>
<pre>
書きかけ
</pre>
*形式
<pre>
#include <stdlib.h>
double strtod(const char * restrict nptr, char ** restrict endptr);
float strtof(const char * restrict nptr, char ** restrict endptr);
long double strtold(const char * restrict nptr, char ** restrict endptr);
</pre>
*引数
:nptr
:endptr
*返却値
:
*機能
:
*例
<pre>
 
</pre>
=== strtol, strtoll, strtoul及びstrtoull関数 ===
<ref>『JISX3010:2003』p.223「7.20.1.4 strtol, strtoll, strtoul及びstrtoull関数」</ref>
<pre>
書きかけ
</pre>
*形式
<pre>
#include <stdlib.h>
long int strtol(const char * restrict nptr, char ** restrict endptr, int base);
long long int strtoll(const char * restrict nptr, char ** restrict endptr, int base);
unsigned long int strtoul(const char * restrict nptr, char ** restrict endptr, int base);
unsigned long long int strtoull(const char * restrict nptr, char ** restrict endptr, int base);
</pre>
*引数
:nptr
:endptr
:base
*返却値
:
*機能
:
*例
<pre>
 
</pre>
 
== 疑似乱数列生成関数 ==