Example Hello world programs

Contents



HBasic code with HBasic stdgui library


 In this example we use the normal HBasic stdgui library package and start 
the program execution with the HBasic interpreter or compiler.


Sub button1_clicked()
Print "Hello world"
End Sub

Example hello_world.bas:  Example of a normal HBasic method.



HBasic code with HBasic NET library

In this example we use the normal HBasic stdgui library package and start the program execution with the HBasic interpreter or compiler.


Sub button1_clicked()
System.Console.WriteLine( "Hello world" )
End Sub

Example hello_world.bas:  Example of a normal HBasic method.




HBasic code with HBasic NET library

In this example

HBasic code with NET compiler

class mainclass
Sub Main
   System.WriteLine( "Hello world" )
End Sub
End Class


Class mainclass
Sub Main
    System.WriteLine( "Hello world" )
End Sub
End Class


Example hello_world.bas:  Example of a normal HBasic method.



HBasic code with HBasic NET library

In this example

HBasic using Console library methods


Include Console package

Sub button1_clicked()
   Console.WriteLine( "Hello world" )
End Sub



HBasic code with HBasic NET library

In this example

HBasic using NET Console library methods


Include NET package mscorlib

Sub button1_clicked()
   System.Console.writeLine( "Hello world" )
End Sub


HBasic code with HBasic NET library

In this example

C# Code with DotGNU Compiler

(result of compilation may be used as library)

Using System;
class
{
   Method Main()
   {
       Console.WriteLine( "Hello world" );
   }
}

Hello world in IL Assembler Code