formatting

This commit is contained in:
Boris Verkhovskiy 2024-06-29 13:44:40 -06:00 committed by GitHub
parent 9c0f34ec2f
commit 4db27cd98d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,7 @@ enum days {SUN = 1, MON, TUE, WED = 99, THU, FRI, SAT};
// <アングルブラケット>で囲まれたファイル名はヘッダーファイルをシステムライブラリから
// 探すことをコンパイラに伝え、自分で書いたヘッダーファイルを使うときには ”引用符” で
//そのファイルのパスを囲みます。
#include "my_header.h" // ローカルファイル
#include "my_header.h" // ローカルファイル
#include "../my_lib/my_lib_header.h" // 相対パス
// 予め関数を .h (ヘッダー)ファイルで宣言するか、
@ -279,7 +279,7 @@ int main (int argc, char** argv)
// 剰余演算もありますが、負の値を計算するときには注意してください:
11 % 3; // => 2 (11 = 2 + 3*x (x=3))
(-11) % 3; // => -2 (-11 = -2 + 3*x (x=-3))
11 % (-3); // => 直感に反し被除数と同じ符号になる、2 (11 = 2 + (-3)*x (x=-3))
11 % (-3); // => 直感に反し被除数と同じ符号になる、2 (11 = 2 + (-3)*x (x=-3))
// 比較演算は親しみがあるかもしれませんが、Cには真偽型がなく、
// 代わりに整数型が使われます。(C99以降は _Bool型がstdbool.hで
@ -401,7 +401,7 @@ int main (int argc, char** argv)
exit(-1);
break;
}
// goto文
typedef enum { false, true } bool;
// C99より前のC標準ではブール値が標準で定義されていません。
@ -868,7 +868,7 @@ typedef void (*my_fnp_type)(char *);
/*
( MUL(x, y) (x * y);
( MUL(x, y) (x * y);
MUL(1 + 2, 3) (1 + 2 * 3))
*/
// struct, typedefも同じように定義できます。
@ -895,7 +895,6 @@ Node createLinkedList(int *vals, int len);
*/
#endif // if系列マクロの終わり
```
## 関連記事、教材(一部英語)