What could be the value of a variable in all uppercase letters?

As stated in the question, I am doing homework that has two variables, BOOK and MAGAZINE, in capital letters, and I cannot figure out what the purpose might be.

Who has a key?

The icon in the Visio class diagram looks like a rectangle with an equal sign on it, and the lock declares it closed.

This is an image of a class diagram.

Sincerely.

+4
source share
3 answers

These are private constants. You can indicate the icon next to their name. Take a look at the TEST constant in this example ...

Screen shot of private const in C # with intelisense

EDIT: All caps are just conditional, but are commonly used to represent constants.

+4
source

Variables in all uppercase letters in any language usually refer to constants, that is, the value should never change.

In this case, they can refer to an enumerated type, which is a special kind of constant, basically, is just a symbol for itself.

+4
source

They are probably constants, possibly defining a key or index. Without a more specific question, I cannot give you anything but a vague answer, sorry.

+1
source

Source: https://habr.com/ru/post/1380120/


All Articles