For years it was possible to use the more easy on the eye keywords and, or, not in place of operators &&, ||, ! in C++. However, when working with C codebases these keywords aren't available. Though they are just syntactic sugar, in my view they greatly simplify readability, especially while expressing complex logical conditions.
TIL, that there is a thing in C called the 'C alternative tokens', which allows us to use these and a few more symbols instead of the operators. One has to only include the header "iso646.h", and these are part of the C standard from a long time, so I suppose It should be available in most compiler environments.
TIL, that there is a thing in C called the 'C alternative tokens', which allows us to use these and a few more symbols instead of the operators. One has to only include the header "iso646.h", and these are part of the C standard from a long time, so I suppose It should be available in most compiler environments.
No comments:
Post a Comment