Qore Programming Language

  • Increase font size
  • Default font size
  • Decrease font size

HelloWorld example

E-mail Print PDF
An object-oriented, multithreaded "hello world" example program :-)
The simplest form would actually be just:
print("hello world\n");
This gives (a little) more of Qore:
#!/usr/bin/env qore

# set the exec-class option and give the class name in case the file is renamed
%exec-class HelloWorld

# an object-oriented, threaded hello world :-)
class HelloWorld
{
    constructor()
    {
	background $.output("Hello, world!");
    }
    private output($arg)
    {
	printf("%s\n", $arg);
    }
}


Last Updated on Saturday, 25 December 2010 20:01