Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Comments/Remarks and Program Compiling

Simple question (I would believe!):

Anything in a VB program that has an apostrophe in front of it is "greened out" as a remark or comment. Now, does that remark/comment compile into the final product? If it does, is there a way to prevent that from occuring without removing them all manually?

Thanks for the answer! Any evidence would be appreciated.
0
doinVBstuff
Asked:
doinVBstuff
1 Solution
 
dr_binksCommented:
They shouldnt be compiled. It would be pretty silly to add stuff into the compiled program that wont be read by any person or even by the computer, it would take up Unnesessary space.

~Binks
0
 
sk33v3Commented:
No. you can test this out by opening a blank project and then boudle click on the form to open the code window. Under the Form_Load event type the following

'' This is evidence that comments do not get compiled into the executable.
'' So even though you comment your code no one other than those with your
'' source can read them.
'' Also variable names are not saved. IE If you have Dim Counter as long
'' some one trying to reverse compile your program will not be able to see
'' the Word Counter. VB replaces it with a generic name

Compile the program. you can then open the program in notepad and see the comments are not compiled.
0
 
Arthur_WoodCommented:
Just to make it unanimous, COMMENTS (' This would be a comment) are NOT compiled into the EXE

AW
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
doinVBstuffAuthor Commented:
Ok, so that I get this straight, they are not compiled into the program. So, it begs to ask the question, are they actually removed or just hidden? The reason I ask is because I noticed that with one of my larger programs, if I remove the comments, it seems to make the compiled program smaller in actual size. Is this just coincidental or something more?

Thanks for all the answers so far.
0
 
sk33v3Commented:
Just coincidental. You may have removed more than just comments. maybe a component reference or a variable declaration that was not used. The variable names and comments are not compiled into the program on VB6. Are you using VB6 or something else?
0
 
dr_binksCommented:
comments are totally ignored by the compiler, so when the exe is created the compiler hasnt readthe comments to put them into the exe.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now