Learning Haxe: Part 6: Loops

Learning 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.


Haxe supports two forms of looping keywords: for and while.


Haxe does not support the C-style of for loops. All for loops follow the for… in pattern.

For the purposes of moving through a range of values, Haxe supports a range operator that defines a pattern of min…max where min is inclusive and max is exclusive.

Haxe also understands more complex data structures through functionality known as comprehension. Loop keywords can be used to move through the data entries.


The while keyword works on Boolean expressions in Haxe. They continue to loop until the condition is no longer true.

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.