4D Blog

Home Product Tag your comments, a feature by developers for developers

Tag your comments, a feature by developers for developers

January 14, 2022

Product

Comments are essential in a developer’s life. When we work on a new feature, we often add comments that are reminders. For example:

  • to validate a part of code with a colleague,
  • to refactor a function,
  • to fix code that is slowing down the performance,
  • to split a method or a class into sections,
  • to prepare the skeleton of a class and add a todo comment inside each function.

 

Even if you write some straightforward code, try reading it months or years later. Will it still seem simple, or would you wish you’d added comments?

4D v19 R4 takes comments to a whole new level with comment tags that enables you to better organize your comments.

There are three new tags at your disposal:

  • MARK
  • TODO
  • FIXME

 

In this previous blog post, we showed you a list in the code editor, allowing you to easily navigate within your class. Comments preceded by these three tags are also displayed in this list.

You can use them within your classes or methods.

How to use them

The MARK tag allows you to split your code into sections. You can write it in three different ways. The other two tags TODO and FIXME, are written in the same way. The benefit is that they have different icons in the list, which allows you to organize your code to prioritize your future actions.

 

  • //MARK: my comment: to add a section
  • //MARK:- my comment with the line: to add a section with a separator line
  • //MARK:-: to only add a separator line
  • //TODO: To do this
  • //FIXME: Fix this

 

Here is an example with an ORDA class:

blank

The functions and comment tags are displayed in their appearing order inside the class and method. If you prefer, you can display the functions and comment tags of a class in alphabetical order by holding Cmd on macOS or Alt on Windows before you deploy the menu.

What’s Next?

Ready to step up your coding game with this new feature? Tell us what you think about this new possibility to organize your code and navigate in your classes or methods. We are waiting for you in the forum.

Discuss

Tags Code editor, v19 R4, v20

Latest related posts

  • February 3, 2026

    4D Write Pro – Adding a margin automatically when bullets are set using standard actions

  • January 22, 2026

    Transform Static Documents into Actionable Knowledge with AIKit

  • January 22, 2026

    Deploy Fluent UI effortlessly in your 4D applications

Vanessa Talbot
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.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • Email, Microsoft 365, Gmail
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • 4D Qodly Pro
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy