Mike, Are you sure the C preprocessor recognizes the keyword "true"? I compiled the following code in Visual Studio and it took the #else path. (i.e. it printed "false"). So I don't think this is a bug although Visual Studio did not give me any compiler error. It just treated "true" as a "pre-processor variable" that contains a value 0. I don't have RobotC in front of me so I don't know what RobotC does. If it produces a compiler error, you can argue it is a bug. Nevertheless, I don't think it should treat "true" as a Boolean keyword.
Nope, I'm pretty sure it does not, since true is a boolean and c doesn't have those, however robotC does.
I could always #define TRUE 1 - as was done for so many years in C, then have a mixture of TRUE and true all over the place, that would look so, ummm, professional?
Users browsing this forum: No registered users and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum