Flash / Flex / ActionScript/Language/Comments

Материал из Web эксперт
Перейти к: навигация, поиск

This is a multiline comment

 
package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        /*
        No one here
        but us programmers
        */
    }
  }
}



This is a single-line comment

 
package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        // No one here but us programmers
    }
  }
}



XML Comments

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var xml:XML = <people>
           <!--A list of developers-->
           <person name=" Corey"/>
           <person name=" Brian"/>
           <person name=" Mark"/>
           </people>;
         
        trace(xml);
    }
  }
}