いろいろなテクニック.Nucleo と DISCO-F746 用.
Dependencies: Array_Matrix mbed
Diff: InitializeStruct.hpp
- Revision:
- 1:bbb9f0c3e523
- Parent:
- 0:bb939e0bc6e2
diff -r bb939e0bc6e2 -r bbb9f0c3e523 InitializeStruct.hpp --- a/InitializeStruct.hpp Sun Oct 15 11:41:48 2017 +0000 +++ b/InitializeStruct.hpp Wed Apr 10 06:32:33 2019 +0000 @@ -11,8 +11,9 @@ // x4 = {-7, -8}; // エラー,代入なので使えない x4 = (myStruct){-7, -8}; // 複合リテラル(compound literal)を利用 - printf("\r\nx1.a1 = %d, x1.a2 = %d\r\n", x1.a1, x1.a2); - printf("\r\nx2.a1 = %d, x2.a2 = %d\r\n", x2.a1, x2.a2); - printf("\r\nx3.a1 = %d, x3.a2 = %d\r\n", x3.a1, x3.a2); - printf("\r\nx4.a1 = %d, x4.a2 = %d\r\n", x4.a1, x4.a2); + printf("\r\n"); + printf("x1.a1 = %2d, x1.a2 = %2d\r\n", x1.a1, x1.a2); + printf("x2.a1 = %2d, x2.a2 = %2d\r\n", x2.a1, x2.a2); + printf("x3.a1 = %2d, x3.a2 = %2d\r\n", x3.a1, x3.a2); + printf("x4.a1 = %2d, x4.a2 = %2d\r\n", x4.a1, x4.a2); }