5 ms·
Not even in C. You can have an if condition that is actually a macro that expands with parentheses. For example the macros in ctype.h, so you can actually write
by nikai 11y ago
Not even in C. You can have an if condition that is actually a macro that expands with parentheses. For example the macros in ctype.h, so you can actually write
if islower(c) {
(..)
}
- raverbashing 11y agoYeah, but macros are not really part of the language, they're more a writing aid than anything really. So, for the sake of good practices, write if with parenthesis.
- olavk 11y agoThat is cheating!
- cygx 11y agoThat's not portable, though: A comforming implementation may very well implement islower as a function call, and you should treat is as such.