Функции используются для операций, которые возвращают значение.
STATIC PUBLIC SUB Main()'the parameter of the function is declared as
DIM hForm AS Fmain
hForm = NEW Fmain
hForm.show
END
PUBLIC SUB Button1_Click()
Label1.Text=sayHello()
Label2.Text=timesFive(TextBox1.Text)
END'the returntype is String
PUBLIC FUNCTION sayHello() AS String
word AS String
word = "Hello"
RETURN word
END
PUBLIC FUNCTION timesFive(x AS Integer) AS Integer
RETURN x * 5
END