1. PROGRAMMING READABILITY
Use Meaningful identifiers:
Dim intRandom As Integer, intSum As Integer
Dim intCounter As Integer
Logic Structure:
for this program I used For and Next statement.
For intCounter = 1 To intRandom Step 1
intsum + inSum = intCounter
Next intCounter
lblDisplay.Caption = "The sum of 1 to " & intRandom & " is " & intSum
End Sub
Coding Practice:
intRandom = 0
intSum = 0
intCounter = 0
lblNumber = ""
lblDisplay = ""
cmdGenerate.Enabled = True
cmdReset.Enabled = False
cmdGenerate.Focus
End Sub
Notes and Comments:
I didn't used notes and comments for this program.
2. PROGRAM DOCUMENTATION
Program listing:
For my commandButton i used
cmdGenerate, cmdAdd , cmdReset
for my labelbox i used
lblNumber and lblDisplay
Program specification:
I used the Visual Basic 6.o for my program.
File layouts and Record Description:
Dim intRandom As Integer, intSum As Integer
Dim intCounter As Integer
Operating Instructions:
No comments:
Post a Comment