• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

15.1. Whitespace

The tab, space, and carriage return (i.e., line break) characters are used in ActionScript just as they are used in English: to separate words from each other so that they don't all runtogetherlikethis. In programmer-speak, these characters are known as whitespace and are used in source code to separate tokens (the keywords, identifiers, and expressions roughly akin to words, phrases, and sentences in English). Here is an example of incorrect and correct whitespace usage:

varx;   // Oops! No whitespace between the var keyword and the variable x.
var x;  // That's better...because of the whitespace, the interpreter
        // can now understand our code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint