Document of c-modernization-kit (calc)
1.0.0
Loading...
Searching...
No Matches
calc
libsrc
calcbase
subtract.c
Go to the documentation of this file.
1
15
16
#include <
libcalcbase.h
>
17
#include <stddef.h>
18
19
/* doxygen コメントは、ヘッダに記載 */
20
int
subtract
(
const
int
a,
const
int
b,
int
*result)
21
{
22
return
add
(a, -1 * b, result);
/* 再帰的な関数呼び出しの実装例として add を呼ぶ */
23
}
libcalcbase.h
計算ライブラリ (静的リンク用) のヘッダーファイル。
add
int add(const int a, const int b, int *result)
2 つの整数を加算します。
Definition
add.c:20
subtract
int subtract(const int a, const int b, int *result)
2 つの整数を減算します。
Definition
subtract.c:20
Generated by
1.14.0