I was reading a book on c++ (A Complete Guide to Programming in C++ by Ulla Kirch-Prinz and Peter Prinz; ISBN: 0-7637-1817-3) and it mentioned that isupper(), along with islower(), isalpha(), isdigit(), isalnum(), isspace(), and isprint(), are macros for character classification.
I find this kind of weird for two reasons:
In the same book, it talks about how, even though macros can have arguments, they are still essentially just placeholder names that are filled in with the definition. This seems weird, since I don't know what kind of replacement text would operate conditionally. That sounds more in line with either a function or a built-in operation (like
sizeof).It also seems weird because I've heard some people call these functions, while I've also heard some people call them macros.
Any explanation would be dearly appreciated. I'm moderately new to this, so I'm still trying to figure this all out. Thank you.