Top "Constants" questions

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

Constant pointer vs Pointer to constant

I want to know the difference between const int* ptr; and int * const ptr; and how it works. It is …

c pointers constants
Declaring static constants in ES6 classes?

I want to implement constants in a class, because that's where it makes sense to locate them in the code. …

javascript class constants ecmascript-6
define() vs. const

In PHP, when do you use define('FOO', 1); and when do you use const FOO = 1; ? What are the main differences …

php constants
Why does JSHint throw a warning if I am using const?

This is the error I get when using const: <error line="2" column="1" severity="warning" message="&apos;const&…

javascript node.js constants jslint jshint
Difference between `constexpr` and `const`

What's the difference between constexpr and const? When can I use only one of them? When can I use both …

c++ c++11 constants constexpr
C# naming convention for constants?

private const int THE_ANSWER = 42; or private const int theAnswer = 42; Personally I think with modern IDEs we should go with …

c# naming-conventions constants
Const in JavaScript: when to use it and is it necessary?

I've recently come across the const keyword in JavaScript. From what I can tell, it is used to create immutable …

javascript node.js constants immutability
What is the difference between char * const and const char *?

What's the difference between: char * const and const char *

c pointers constants
Class constants in python

In python, I want a class to have some "constants" (practically, variables) which will be common in all subclasses. Is …

python constants
How to select multiple rows filled with constants?

Selecting constants without referring to a table is perfectly legal in an SQL statement: SELECT 1, 2, 3 The result set that the …

sql select constants