August 2000
Intermediate to advanced
800 pages
13h 15m
English
The equal sign (=) is used to set the value of a variable. This is called the assignment operator. On the left side of the assignment operator is a variable that will receive a value. On the right side is an expression, which could be a simple string constant or a complex combination of operators, variables, and constants.
When you assign a value to a variable, its type will change to fit the type of data you put into it. This is in contrast to C, which tries to convert values to fit the type of the variable. Assigning an integer to a variable that previously held a string converts the variable to an integer.
| String Constants | Integer Constants | Double Constants |
|---|---|---|
| $myString = ... |
Read now
Unlock full access