QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 


  << Previous Topic | Next Topic >>Return to Index  

When and how to use comments, mostly by example...

May 16 2002 at 4:32 PM
Iain  (no login)

At the ver beginning of the code, to declare general info about the program:
'
' Progname
' By whoever
' Date
'
'
' General description
' Technechalities (such as files and there directorys)
'
' Any other required info


When using comments in the code, use these hints:

NEVER do this:
' Checks if A = 1
IF A = 1 THEN BLAH

At the beginningof all subs, write a short description of what they do

In complicated sections, explain them in English so as to make it so other programmers understand it better

Finally, use comments so as to inseart options other coders can use, instead of the ones alrady in the code. Ie:
A = B * C
'Or use this code:
'A = C * B

I know, it is a lousy example, but it convies the message well.
Iain

 

 Respond to this message   
Current Topic - When and how to use comments, mostly by example...
  << Previous Topic | Next Topic >>Return to Index  
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums