Define and use Constants : const « Language « Flash / Flex / ActionScript






Define and use Constants

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        const BOILING_POINT:int = 212;
        
        trace(BOILING_POINT);
    }
  }
}

        








Related examples in the same category

1.A constant is a variable which remains fixed for the remainder of the program.