Variable is the place to store variable values or data temporarily in an application. variable contents are not fixed, meaning can change.
The terms of the variable naming:
The terms of the variable naming:
- Must begin with a letter of the alphabet
- May not use special characters, for example (, <> # $!, space)
- Consists of a maximum of 255 characters
- Can not use the same variable name in one piece
- There should refer to the name of the procedure, function, form, and etc.
I will give an example of a program for variable declarations. Here is the look of the program :
Insert Coding :
Dim kata As String <-- Variable Declaration use Dim
Dim hasil As String <-- Variable Declaration use Dim
Private Sub Command1_Click(Index As Integer)Dim kal As StringDim panjang As Integerkal = Label1.Captionpanjang = Len(kal)Label2.Caption = panjangEnd Sub
Private Sub Command2_Click()kata = Label1.Captionhasil = Left(kata, 3)Label2.Caption = hasilEnd Sub
Private Sub Command3_Click()kata = Label1.Captionhasil = Right(kata, 3)Label2.Caption = hasilEnd Sub
Private Sub Command4_Click()kata = Label1.Captionhasil = Mid(kata, 3, 3)Label2.Caption = hasilEnd Sub
Private Sub Command5_Click()kata = Label1.Captionhasil = UCase(kata)Label2.Caption = hasilEnd Sub
Private Sub Command6_Click()kata = Label1.Captionhasil = LCase(kata)Label2.Caption = hasilEnd Sub
Private Sub Text1_Change()Label1.Caption = Text1.TextEnd Sub
A few posts today, may be helpful.
Thank you. :)
Title : VB 6.0 Variable Declaration
Description : Variable is the place to store variable values or data temporarily in an application. variable contents are not fixed, meaning can change....
Description : Variable is the place to store variable values or data temporarily in an application. variable contents are not fixed, meaning can change....
0 Response to "VB 6.0 Variable Declaration"
Posting Komentar