Top "Constants" questions

Constants in programming are definitions whose value is fixed throughout a program's execution.

Java's final vs. C++'s const

The Java for C++ programmers tutorial says that (highlight is my own): The keyword final is roughly equivalent to const …

java c++ constants final
What is the best way to create constants in Objective-C

I am creating a Reddit client for learning purposes. I need to have a file with constants in it. I …

objective-c constants
Include constant in string without concatenating

Is there a way in PHP to include a constant in a string without concatenating? define('MY_CONSTANT', 42); echo "This …

php string constants concatenation
How to reference constants in EL?

How do you reference an constants with EL on a JSP page? I have an interface Addresses with a constant …

jsp constants el
Initialize a constant sized array in an initializer list

I've got a situation which can be summarized in the following: class Test { Test(); int MySet[10]; }; is it possible to …

c++ arrays class constants initializer-list
const before parameter vs const after function name c++

What is the difference betweeen something like this friend Circle copy(const Circle &); and something like this friend Circle …

c++ function constants
Go naming conventions for const

I'm trying to determine whether there is a naming convention for the names of const in Golang. I personally would …

go constants naming-conventions
What does __FILE__ mean?

I have the following code from Codeigniter index.php My understanding is that, If / of string position in $system_folder (…

php codeigniter path constants
Difference between `const shared_ptr<T>` and `shared_ptr<const T>`?

I'm writing an accessor method for a shared pointer in C++ that goes something like this: class Foo { public: return_…

c++ boost constants shared-ptr
Can I get CONST's defined on a PHP class?

I have several CONST's defined on some classes, and want to get a list of them. For example: class Profile { …

php constants class-constants