Functions are used for operations that give back a value.
STATIC PUBLIC SUB Main() DIM hForm AS Fmain hForm = NEW Fmain hForm.show END PUBLIC SUB Button1_Click() Label1.Text=sayHello() Label2.Text=timesFive(TextBox1.Text)'the parameter of the function is declared as
END PUBLIC FUNCTION sayHello() AS String'the returntype is String
word AS String word = "Hello" RETURN word END PUBLIC FUNCTION timesFive(x AS Integer) AS Integer RETURN x * 5 END