anchor.diff:  ----
   
   [NOTE]
  -Groovy also supports the Java colon variation with colons: `for (char c : text) {}`,
  -where the type of the variable is mandatory.
  +Groovy also supports the Java colon variation with colons: `for (char c : text) {}`
   
   ===== while loop
   
  
positive.code: include::{projectdir}/src/spec/test/SemanticsTest.groovy[tags=classic_for_loop_example,indent=0]
  ----
  
  ===== for in loop
  
  The for loop in Groovy is much simpler and works with any kind of array, collection, Map, etc.
  
negative.code: ----
  include::{projectdir}/src/spec/test/SemanticsTest.groovy[tags=while_loop_example,indent=0]
  ----
  
  ===== do/while loop
  
  Java's class do/while loop is now supported. Example:
  
  
  [source,groovy]
  --------------------------------------
  // classic Java-style do..while loop
  def count = 5
  def fact = 1
  do {
      fact *= count--
  } while(count > 1)
  assert fact == 120
  --------------------------------------
  
  ==== Exception handling
  
  