User Tools

Site Tools


at-m42:lecture2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
at-m42:lecture2 [2009/04/27 13:47] eechrisat-m42:lecture2 [2011/01/14 12:45] (current) – external edit 127.0.0.1
Line 186: Line 186:
 <code groovy> <code groovy>
 def count = 0     // define and initialize def count = 0     // define and initialize
-count = count 1 // increase current value by one+count = count 1 // increase current value by one
 </code> </code>
  
Line 194: Line 194:
 Variables have names by which they can be referenced. These names are known as //identifiers//. A Grrovy identifier must obey the following rule Variables have names by which they can be referenced. These names are known as //identifiers//. A Grrovy identifier must obey the following rule
 > //An identifier is a case-sensitive combination of letters and digits, the first of which must be a letter. The underscore character (''_'') is considered to be a letter. An identifier must not be a Groovy keyword.// > //An identifier is a case-sensitive combination of letters and digits, the first of which must be a letter. The underscore character (''_'') is considered to be a letter. An identifier must not be a Groovy keyword.//
 +
 ===== Increment and Decrement Operators ===== ===== Increment and Decrement Operators =====
 //Unary operators// add one or delete one from the argument. //Unary operators// add one or delete one from the argument.
at-m42/lecture2.1240840050.txt.gz · Last modified: 2011/01/14 12:25 (external edit)