Hello World Program - Ubercode


Hello World Program

Many computer languages have a "Hello World" program that shows you how to get started. The Ubercode "Hello World" takes just a few minutes to type and run:

Hello World Program in the text editor

In the program above, line 1 is the program name (class name in computer speak), so the program is called "HelloWorld" and it's stored in the file "HelloWorld.cls". The program has a function Main on line 3. Main is not case sensitive, so Main or main are both allowed. The Msgbox command on line 5 shows a message on the screen, and lines 6 to 8 end the function and the class. The program looks like this when it runs:

Ubercode Hello World Program

How to run the program

After installing Ubercode double click the Developer Environment icon on the desktop:

Hello World Program - Start the Developer Environment

When the Developer Environment starts it shows a window titled Startup Wizard. We don't need the wizard so click Close to make it go away. In the Developer Environment, use the File - New - Text file command to create a blank window. Your desktop now looks like this:

Hello World Program - Developer Environment with blank text window

Now type in the program shown previously. Here's the text again so you can copy and paste it:

  Ubercode 1 class HelloWorld  

  public function Main()
    call Msgbox("Hello", "My first program", "OK")
  end function

  end class

It doesn't matter whether you enter words in upper or lower case, and extra spaces or missing spaces don't matter. But don't put spaces in the middle or words or change the spelling of the words. Now compile the program and run it by clicking the Run button (you may be prompted to save the program first):

Hello World Program - Run button

Wait a few moments then you will see the the Hello World window. Your program is now running as a real Windows EXE file, also known as an executable file or an application:

Hello World Program - Output

That's it! You can add more code to the example to test out more language features, and you can use the Program - Copy EXE File to zip up the EXE files or to make an installer. So install the Ubercode trial now and start coding!