Top "Constants" questions

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

How do I create a constant in Python?

Is there a way to declare a constant in Python? In Java we can create constant values in this manner: …

python constants
How to convert a std::string to const char* or char*?

How can I convert an std::string to a char* or a const char*?

c++ string char constants
What is the best way to implement constants in Java?

I've seen examples like this: public class MaxSeconds { public static final int MAX_SECONDS = 25; } and supposed that I could have …

java constants
What does the PHP error message "Notice: Use of undefined constant" mean?

PHP is writing this error in the logs: "Notice: Use of undefined constant". Error in logs: PHP Notice: Use of …

php constants undefined
What is the difference between const int*, const int * const, and int const *?

I always mess up how to use const int*, const int * const, and int const * correctly. Is there a set …

c++ c pointers int constants
What is meant with "const" at end of function declaration?

I got a book, where there is written something like: class Foo { public: int Bar(int random_arg) const { // code } }; …

c++ constants
Are there constants in JavaScript?

Is there a way to use constants in JavaScript? If not, what's the common practice for specifying variables that are …

javascript constants
How do I turn off PHP Notices?

Notice: Constant DIR_FS_CATALOG already defined I've already commented out display_errors in php.ini, but is not working. …

php error-handling constants
What is the difference between const and readonly in C#?

What is the difference between const and readonly in C#? When would you use one over the other?

c# .net constants readonly
Constants in Objective-C

I'm developing a Cocoa application, and I'm using constant NSStrings as ways to store key names for my preferences. I …

ios objective-c cocoa nsstring constants