FULL_UPPER_CASE

To any programmer worth paying a salary, anything in FULL_UPPER_CASE is an instant heads-up that this 'label' is probably, more than likely, in fact, certainly, a #define

This issue is one of the most pernicious errors in any programming language. You can spend hours or days, tairing your hair out, wondering why things just don't work.

You can stare at the screen for a fortnight and the 'problem' will not be seen.

The basic rule that not even Microsoft break is:

+all defines are FULLY_UPPER_CASE
+nothing else, ever, is.

class MY_TEST

is an instant alert that it is not what it appears to be.

conversely

class my_test 

is NOT a #define

There are NO technical reasons why this rule should be broken. There ARE aesthetic reasons why the rule is defied to make the code 'look good'

Typically, in Bis, 

class MFD
class HUD

both are accidents, waiting to happen.

------------------------------

These comments also apply to YOU as much as a professional coder. You will come back to your code months later and forget you have hidden #defines


class PineApples

what happens when you never find it? How would you ever remember you said in a header somewhere

#define PineApples  Oranges

-----------------------------

The rapify module of the dll, and consequently the rapify.exe, (and it should be noted pboProject and makepbo), will optionally check for this error.

It will warn of double barrelled gotchas.

+#define THINGY MixEdCase

+class FRED  // is not a #define

+class fred // IS a define

unfortunately it is endemic in bis constructs to use upper case when they shouldn't. Notably in fsm files and rsc classes.
This has bled thru to the community where they have simply copy and pasted 'what works'.
Description.ext files eg are plastered with IDC, not, idc for instance.

This makes it impractical to have this checking done by default.

Instead, you are invited to use the -U option of the rapify cmdline

-U  enable upper case warnings

pragmas for the dll compiler.
----------------------------
you can also do similar in the code itself by using (what in effect are #pragmas). These defines have no affect if using bis tools too, since they are only interpreted by my compiler.
(the definition in fact of what a pragma is)

#define MIKERO_ENABLE_UPPER_CASE_CHECKING

This is the equivalent of the -U option, but enabled only on a per 'file' basis rather than globally applied to all files (via makepbo eg)

(a 'file' here means all the file + all of it's includes)

You can also selectively prevent the check (even if intially enabled) with

#define MIKERO_DISABLE_UPPER_CASE_CHECKING

Again, you can apply this to the whole file to disable checking int this one 'file' versus the global checking done by makepbo -U

And you can selectively enable / disable it in sections of the code.

A simple example might be....

#define MIKERO_ENABLE_UPPER_CASE_CHECKING // top of file

code......

#define MIKERO_DISABLE_UPPER_CASE_CHECKING

class HUD
{
#undef MIKERO_DISABLE_UPPER_CASE_CHECKING


in a similar manner, you could reverse this to generally disable checking (top of file)
and then enable it for certain sections


