Code Editor: Say hello to Comment blocks

Automatically translated from English

Adding a block of comments at the beginning of a method is useful for adding a note about what a method does, as well as a list of input/output parameters. And having a few lines of human-readable text within a complicated section of code can be convenient to help you and others recall the purpose of this particular section of code. Beginning with 4D v18, your programming experience is enhanced with the addition of comment blocks!

Comments are text (notes, descriptions, reminders, etc.) in the source code, designated with special characters so they’ll be ignored by the compiler during code execution. Comments can be on a single line comment or across multiple lines. Now instead of having many lines prefixed with //, you can simply use /* at the beginning of a comment and */ at the end to comment an entire block. You can also collapse and expand them! And that’s not all, you can even add comments to any part of a line, even inside an if condition or a loop: 

Why comments are important

  • In a team with multiple developers working on the same project, well-commented code is helpful to others working on it so they can better understand the code and ease the process of code review/debugging.
  • We’re only human and forgetting things is completely normal. If you see or edit your code later, comments can help you remember the logic you used while writing that code. Even if you write some really simple code, try reading it months or years later. Will it still seem simple, or would you wish you’d added comments?

 

Vanessa Talbot

• Product Owner •

Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.

Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.