ðH geocities.com /Baja/Dunes/7592/vbcc6.htm geocities.com/Baja/Dunes/7592/vbcc6.htm .delayed x
MÔJ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °oÙ ¢ OK text/html ÀÃg ¢ ÿÿÿÿ b‰.H Fri, 10 Jul 1998 01:16:18 GMT ƒ Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98) en, * MÔJ ¢
Visual Basic Naming Conventions
Page 6
Previous Page
|
Home Page
|
VB Page
|
Next Page
In-Line Comments
End-of-line comments are usually not needed for annotating your actual code. In general
the syntax of VB is readable. In cases where a function or subroutine contains a certain number
of logical blocks, you can introduce each block with a separate comment on it's own line. Use as many
lines for the comment as you need, but keep the lines short so that they can be displayed on
a VGA monitor without scrolling left and right. End-of-line comments are sometimes helpful to comment
'Loop', 'Next nJ', 'Else' and 'ElseIf' in order to clarify the expected condition, or identify the top
of the loop.
Use comments to explain the code, not echo it; if your comments become very involved, consider
restructuring the code. For more complicated subroutines, it may be more informative to move
complicated documentation into the routine's header documentation.
File Headers
Every module should have a header that sits as a comment in the module's definitions area.
This header identifies the module and summarizes the external interfaces to it. Here is an example:
'***************************************************************
'* Module: Utilities
'*
'* File Name: util.bas
'*
'* Author: John Haro
'*
'* Description:
'*
'* This module contains all of the generic utilities used
'* in the Dental application.
'*
'*
'*
'* Revisions:
'*---date------rev. by--------------brief descr.-----------------
'* 1.27.1998 j.Haro added instance checking
'*
'*
'***************************************************************
Function and Subroutine Headers
A function header is a comment that describes what the function does and summarizes its interface.
The description should focus on what the function does, although for complicated or longer functions
it might be appropriate to summarize the how as well.
Here is an example of a function header.
'***************************************************************
'* Synopsis: Initialize the Patient Browser form
'*
'*
'* Parameters:
'*----name------------------[I/O]--description------------------
'*
'*
'* Nonlocal Data:
'*----name------------------[I/O]--description------------------
'*
'*
'*
'* Description:
'* - init forms and private variables
'* - init the user selection tree, or load if management
'* - check user permissions to use the form
'* - load the grid with current patients
'*
'* > j.haro 11/2/1997
'***************************************************************
Page 6
Previous Page
|
Home Page
|
VB Page
|
Next Page