Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

6.8. Operators

An important basic idea in any programming language is that of operators. Operators are symbols that represent action taken upon objects, such as setting, comparing, or testing values. Some operators will seem like common sense, such as arithmetic operators: addition (+), subtraction (−), multiplication (*), division (/), and more. Others, however, may not be as obvious.

For example, did you know that, in addition to adding two numbers, the plus operator (+) can join two strings of text? A single equals sign (x = 1) is an assignment operator, because it is used to assign a value to something, but did you know there is also a double equals sign (==) operator? The latter is used to compare two values to determine whether they are equal.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint