Proyek Queri-queri Lanjut dan Sub-subqueri
Variables dan Data
Integer 2 bytes
Long 4 bytes +/- 2,147,483,648
Single 4 bytes +/ E38 +/ E-45
Double 8 bytes +/ E-308 +/ E-324
Currency 8 bytes +/- 922,337,203,685,
Variant Any data Type Null
Fungsi-fungsi Internal standar
Fungsi String LCase, UCase Format StrComp Len InStr Chr, Asc String Trim, LTrim, RTrim Left, Right, Mid & Concatenation
Len Len"Ramanujan") = 9
InStr ("8764 main"," ") = 5
String String(5, "a") = "aaaaa"
Trim, LTrim, RTrim Trim(" Maria ") = "Maria"
Left, Right, Mid Left("jackson",5) = "Jacks"
& Concatenation "Frank" & "Rose = "FrankRose"
Fungsi Matematis Standar Numeric
Exp, Log Atn, Cos, Sin, Tan Sqr Abs Sgn Int, Fix Rnd, Randomize
Conditions
Basic Conditions If (conditiona1) Then statement for true Else Statement for false If (condition2) Then statements for true End If
Nested Conditions Response = MsgBox (...) If (response = vbYes) Then 'statements for Yes Else If (response = vbNo) Then 'statements for No Else 'statements for Cancel End If End If
Pernyataan Select Response = MsgBox(... ) Select Case response case vbYes 'statements for Yes Case vbNo 'statements for No Case vbCancel 'statements for cancel End Case
Loops
Input dan Output
Subroutines
Subroutine StatusMessage dapat dipanggil dari lokasi mana saja. Main program... StatusMessage "trying to connect."... StatusMessage "verifying access."... End main program Sub StatusMessage (Msg As String) 'Display Msg, location, color End Sub
Komputasi
Variable Scope
Form Button1 Button2
Form-Module Code Sub Button1_Click() Dim I1 As Integer I1 = 3 End Sub Sub Button2_Click() Dim i1 As Integer I1 = 7 End Sub
Proyek Queri-queri Lanjut dan Sub- subqueri