3.2.2 Constantsand variables can be used in the program to express those that may change the amount of data corresponding to, in C + +, we use constants to express those always remain unchanged data volume. In simple terms, the values, characters,
3.2.2 Constantsand variables can be used in the program to express those that may change the amount of data corresponding to, in C + +, we use constants to express those always remain unchanged data volume. In simple terms, the values, characters,
Constants are a very new data type in php. I will introduce some usage of PHP constants in detail for beginners. if you need to know them, refer to the PHP constant define () function.
Constants are a very new data type in php. I will introduce some
PHP constantsThe define () function is used to define constants. Once a constant is defined, it cannot be changed or undefined.Example of defining constants: The code is as follows:Copy code Define ("CONSTANT", "Hello! ");Echo CONSTANT;?>
Article turned from: http://www.cnblogs.com/daocaoren/archive/2011/07/14/2106278.html1. What is a const?A constant type is a type that uses the const description of a type modifier, and the value of a variable or object of a constant type cannot be
1. What is a const?A constant type is a type that uses the const description of a type modifier, and the value of a variable or object of a constant type cannot be updated. (Of course, we can rescue to update:)2. Why is const introduced? The initial
The compiler will replace the const variable with the corresponding value during the compilation process, in order to perform this substitution, the compiler must know the initial value of the variable. If the program contains multiple files, then
A program usually uses a constant value to define some relatively fixed and practical values. For example, you want to define a playing card category. Playing cards have two attributes: Color and number. However, the color is only red peach (Red
1. What is const?
A common type is a type described by the Type modifier Const. The values of variables or objects of a common type cannot be updated. (Of course, we can steal the bar for updating :)
2. Why is const introduced?
The initial purpose
A constant is an identifier whose value remains unchanged during running. The C language uses # define to define constants (called macro constants ). In addition to # define, the C ++ language can also use const to define constants (called const
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.