Sub όνομα διαδικασίας() δηλώσεις τοπικών μεταβλητών; εντολές end Sub
Sub main() hello MsgBox "Back from hello" hello End Sub ' Display hello world Sub hello() MsgBox "Hello, world" End Sub
Sub main() StrongMessage "Hello", 5, "*" StrongMessage "world", 10, "!" End Sub ' Display the message msg prefixed by n instances of the string s Sub StrongMessage(msg As String, n As Integer, s As String) Dim head As String ' Could use String(s, n) here For i = 1 To n head = head + s Next i MsgBox head + msg + head End Sub
Function όνομα συνάρτησης(δηλώσεις παραμέτρων) as τύπος αποτελέσματος δηλώσεις τοπικών μεταβλητών; εντολές όνομα = τιμή end Function
Sub main() MsgBox "64!=" + Str(factorial(45)) End Sub ' Return n! Function factorial(n As Integer) As Double Dim i As Integer Dim r As Double ' result r = 1 For i = 1 To n r = r * i Next i factorial = r End Function
Ποσό | Επιτόκιο |
0-999.999 | 2.25 |
1.000.000-4.999.999 | 2.5 |
5.000.000-10.000.000 | 2.8 |
10.000.000 και άνω | 2.9 |