| Home > Computer & I'net > Scalar Data... |
|
|
|||||||||||||||
|
|
|||||||||||||||
|
||||||||||||||||
Scalar Data | ||||
Scalar data is symbolized by a $ sign. For correct processing, the $ must be followed by a letter (non-numeric) character. Scalar names are CaSe SeNsItIvE. $A is different than $a. You can use up to 255 characters for a scalar name which includes numbers, letters, and underscores. Assigning or changine values of a scalar is as easy as an equals sign. Here are some quick examples :
There are two types of data values. NUMBERS and STRINGS. Numbers are characters ranging from 0 to 9. No letters or other symbols. Strings are a collection of characters which my include : letters, numbers and/or symbols. Strings can be a word, sentence, or even just a number. Strings come in two varieties. CONSTANTS and VARIABLES. String constants are a set value. They do not change.
String variables are quite different. They are containers with a name label on them. The value (contents) of the container may change. The NAME of the string variable should be descriptive. You can tell a string variable as it starts with one of these symbols $ @ %. The $ represents a scalar variable, the @ represents an array, and the % represents a hash. All of these variable types have a unique function and will be discussed in detail as you go through these tutorials further. Here is a quick example though...
----------------- Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission. | ||||
| Articles |
•Auto & Trucks•Business•Computer & I'net·General·Apache·CSS·Database·Hardware·HTML·Javascript&DHTML·Linux·MySQL·Operating SystemPerl / CGI·PHP·Programming·Publishing·Search Engines·Software Problems·SSI·Tips & Tricks·Utilities·Web Design•Family•Food & Drink•Gardening•Health•Other•Pets•Psychology•Spiritual•Travel•Women |
| Calculators |
|