When all
are where they should be, an environment variable is created so that the system can locate the files
at will.
You are now ready to develop with Neko!
Hello World! in Triplicate
So, now you get to actually compile something in haXe, albeit something simple. Almost every
programming book available starts the reader off with a ??? Hello World! ??? example, whereby the resulting
application will display a nice friendly message. You ??™ ll follow this tradition. The exception, however, is
that you will be compiling this example to run on three different platforms.
Here is the code you are going to compile. It is not important at this time that you understand what the
code does, as the language will be discussed throughout the first part of the book.
class HelloWorld
{
public static function main()
{
trace(???Hello World???);
}
}
You ??™ ll need a text editor to create the file. You can use Notepad on Windows or vi on Linux, but be sure
that the text editor saves to a plain text format and doesn ??™ t add any extra text style tags or you ??™ ll find
your code will not compile.
Pages:
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67