|
Document of c-modernization-kit (calc) 1.0.0
|
計算ライブラリ (静的リンク用) のヘッダーファイル。 More...
#include <libcalc_const.h>Go to the source code of this file.
Functions | |
| int | add (const int a, const int b, int *result) |
| 2 つの整数を加算します。 | |
| int | subtract (const int a, const int b, int *result) |
| 2 つの整数を減算します。 | |
| int | multiply (const int a, const int b, int *result) |
| 2 つの整数を乗算します。 | |
| int | divide (const int a, const int b, int *result) |
| 2 つの整数を除算します。 | |
計算ライブラリ (静的リンク用) のヘッダーファイル。
このライブラリは基本的な整数演算を提供します。
静的リンクによる機能の内部関数を模しています。
Definition in file libcalcbase.h.
|
extern |
2 つの整数を加算します。
| [in] | a | 第一オペランド。 |
| [in] | b | 第二オペランド。 |
| [out] | result | 計算結果を格納するポインタ。 |
この関数は 2 つの整数を受け取り、その合計を result に格納します。
Definition at line 20 of file add.c.
References CALC_ERROR, and CALC_SUCCESS.
Referenced by calcHandler(), main(), and subtract().
|
extern |
2 つの整数を減算します。
| [in] | a | 第一オペランド。 |
| [in] | b | 第二オペランド。 |
| [out] | result | 計算結果を格納するポインタ。 |
この関数は 2 つの整数を受け取り、その差を result に格納します。
Definition at line 20 of file subtract.c.
References add().
Referenced by calcHandler(), and main().
|
extern |
2 つの整数を乗算します。
| [in] | a | 第一オペランド。 |
| [in] | b | 第二オペランド。 |
| [out] | result | 計算結果を格納するポインタ。 |
この関数は 2 つの整数を受け取り、その積を result に格納します。
Definition at line 20 of file multiply.c.
References CALC_ERROR, and CALC_SUCCESS.
Referenced by calcHandler(), and main().
|
extern |
2 つの整数を除算します。
| [in] | a | 被除数。 |
| [in] | b | 除数。 |
| [out] | result | 計算結果を格納するポインタ。 |
この関数は 2 つの整数を受け取り、その商を result に格納します。 整数除算のため、小数点以下は切り捨てられます。
Definition at line 20 of file divide.c.
References CALC_ERROR, and CALC_SUCCESS.
Referenced by calcHandler(), and main().