HelloWorld 

 

Well, every programing language has a HelloWorld example, Heximus may as well have one as well but with a twist. Literally.  Heximus rotates Hello World and randomly changes color.  If you want a really simple helloworld example simply open a console or terminal window and type p "Hello World"   "p" is the short form of the print command. But for a more entertaining version, see below.

 

// Simple Hello World
// Display "Hello World" centered

w = canvas.getWidth / 2 // get center point
h = canvas.getHeight / 2

outputstring = "Hello World"
s = min(w,h)
fs = s / len(outputstring)


paint.setColor(green)

paint.setTextSize(fs*2)

dowhile (1)  // loop forever

canvas.drawRGB 0,47,108 // clear screen

color = rgb(random(255),random(255),random(255))
paint.setColor(color)

canvas.drawText outputstring, w,h,"CC"

angle = angle + 30

canvas.DRAW

endwhile