A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. For example, the word "hamburger" and the phrase "I ate 3 hamburgers" are both strings. Even "12345" could be considered a string, if specified correctly. Typically, programmers must enclose strings in quotation marks for the data to recognized as a string and not a number or variable name.
For example, in the comparison:
if (Option1 == Option2) then ...
Option1 and Option2 may be variables containing integers, strings, or other data. If the values are the same, the test returns a value of true, otherwise the result is false. In the comparison:
if ("Option1" == "Option2") then ...
Option1 and Option2 are being treated as strings. Therefore the test is comparing the words "Option1" and "Option2," which would return false. The length of a string is often determined by using a null character.
Friday, March 27, 2009
What is String?
Posted by
lc marshal
at
10:37 PM
Subscribe to:
Post Comments (Atom)
Search Articles
Study Categories
- 3D (1)
- actionscript (3)
- Activity (5)
- Articles (1)
- Blog (1)
- browser (5)
- CMS (1)
- Computing (1)
- css (1)
- database (6)
- Designer Guidelines (2)
- dreamweaver (4)
- Editor's Pick (1)
- Events (2)
- flash (9)
- Games (1)
- google (2)
- Graphic (4)
- html (2)
- IIS (2)
- javascript (7)
- Joomla (3)
- Lazacode (2)
- menu navigation (2)
- Mobile (1)
- MySQL (5)
- Online Tools (1)
- Open Source Development Kit (11)
- OS (5)
- pdf (1)
- PHP (7)
- PHP. Server (1)
- Powerpoint (1)
- Ruby (1)
- Server (5)
- Software/Tools (8)
- tracker (1)
- video (1)
- Vista (2)
- VMS (1)
- Web Editor (5)
- Web Idea (2)
- Website tricks (2)
- What is? (6)
- Windows (2)
- Wordpress (1)
0 comments:
Post a Comment