Document of c-modernization-kit (calc) 1.0.0
Loading...
Searching...
No Matches
add.c
Go to the documentation of this file.
1
15
16#include <libcalcbase.h>
17#include <stddef.h>
18
19/* doxygen コメントは、ヘッダに記載 */
20int add(const int a, const int b, int *result)
21{
22 if (result == NULL)
23 {
24 return CALC_ERROR;
25 }
26 *result = a + b;
27 return CALC_SUCCESS;
28}
#define CALC_SUCCESS
成功の戻り値を表す定数。
#define CALC_ERROR
失敗の戻り値を表す定数。
計算ライブラリ (静的リンク用) のヘッダーファイル。
int add(const int a, const int b, int *result)
2 つの整数を加算します。
Definition add.c:20