From 2bc2fd7eeb61ad68f96d00c4356c23120b5304b3 Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 19 Aug 2024 14:40:34 +0200 Subject: [PATCH] Add a recap for the Log chapter --- book/pages/03_log.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/book/pages/03_log.md b/book/pages/03_log.md index 84b7327..5d3b3a0 100644 --- a/book/pages/03_log.md +++ b/book/pages/03_log.md @@ -353,3 +353,12 @@ Wait, that is not what we wanted ! We wanted `__LINE__` to be expanded to `8` __ Success ! +## Recap + +In this chapter we've learned: +1. Adjacent literal strings are concatenated automatically at compile-time +1. Logs can be enriched with the magic constants `__FILE__`, `__func__` and `__LINE__` +1. Function-like macros can be variadic, allowing zero or more extra arguments + 1. The extra arguements can be pasted with `__VA_ARGS__` + 1. And `__VA_OPT__()` can be used to remove characters when zero extra arguments are passed +1. The `#` operator can create a string literal from anything