|
Document of c-modernization-kit (calc) 1.0.0
|
calcHandler 関数の実装ファイル。 More...
Go to the source code of this file.
Functions | |
| int CALC_API | calcHandler (const int kind, const int a, const int b, int *result) |
| 指定された演算種別に基づいて計算を実行します。 | |
calcHandler 関数の実装ファイル。
演算種別に基づいて適切な計算関数を呼び出すハンドラーを提供します。
Definition in file calcHandler.c.
| int CALC_API calcHandler | ( | const int | kind, |
| const int | a, | ||
| const int | b, | ||
| int * | result ) |
指定された演算種別に基づいて計算を実行します。
| [in] | kind | 演算の種別 (CALC_KIND_ADD など)。 |
| [in] | a | 第一オペランド。 |
| [in] | b | 第二オペランド。 |
| [out] | result | 計算結果を格納するポインタ。 |
この関数は演算種別を受け取り、対応する計算関数を呼び出します。 現在サポートされている演算種別は以下の通りです。
| 演算種別 | 説明 |
|---|---|
| CALC_KIND_ADD | 加算を実行 |
| CALC_KIND_SUBTRACT | 減算を実行 |
| CALC_KIND_MULTIPLY | 乗算を実行 |
| CALC_KIND_DIVIDE | 除算を実行 |
Definition at line 21 of file calcHandler.c.
References add(), CALC_API, CALC_ERROR, CALC_KIND_ADD, CALC_KIND_DIVIDE, CALC_KIND_MULTIPLY, CALC_KIND_SUBTRACT, divide(), multiply(), and subtract().
Referenced by main().