Using Haxe: Part 6: Enums

Learning Haxe

Using Haxe

Haxe is a strongly-typed multi-paradigm programming language that also supports cross-platform compiling into many different source and byte-code languages such as ActionScript 3, JavaScript, Java, C++, C#, PHP, Python, Lua, and Node.js.


Enums

In programming terminology, an enumeration (enum) is a description of a data structure. Instead of storing data directly, it shapes how data can be used through listing possible values.

Using Enums

In Haxe, enums are created using the enum keyword.

An enumerator describes a new type and the possible values. Each entry in an enum is any allowed identifier in Haxe. Entries cannot be expressions or other evaluate to values. An enum describes only.

Example Usage

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.