Wednesday, March 2, 2011

PROGRAMMING READABILITY

MEANINGFUL IDENTIFIERS

I use meaningful identifiers like Enter Key(txtEnterKey), ASCII VALUE(lblResult), QUIT(cmdQuit), Case  and CLEAR(cmdClear). it is readable because I use simple variable.

LOGIC STRUCTURE

I use case and switch for the iteration, and if then statement.

CODING PRACTICE 

Private Sub txtEnterKey_KeyDown (KeyCode As Integer, Shift As Integer)

Select Case KeyCode
         Case vbKeyDelete
          lblResult.Caption="Delete Pressed!"
          txtEnterKey.Text="(Delete)"
         Case vbKeyInsert
          lblResult.Caption="Insert Pressed!"       
          txtEnterKey.Text="(Insert)"
          Case vbKeyEnd
          lblResult.Caption="End Pressed!"       
          txtEnterKey.Text="(End)"
 
End Select
End Sub

NOTES AND COMMENTS 


In this program i didn't use comments.

PROGRAM DOCUMENTATION


PROGRAM LISTING


I use txtEnterKey form my textboz where will you input a number, letter and other,

I use lblResult for my label box where the result would be shown


I use cmdClear for clearing the text box and label box.

I use cmdQuit for the exit of my program

PROGRAM SPECIFICATION


for my program I use Visual basic 6.0, and this program shows the ascii code of the letter, number and others.

FILE LAYOUTS AND RECORD DESCRIPTION


None

OPERATING INSTRUCTIONS


My progam uses a text box where you would enter a letter, number and other, then a label box that shows the ascii code.




       


     

No comments:

Post a Comment