KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Utilizing Comments in the Method Editor to Search for Method References
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: March 11, 2024

The 4D method editor provides many quality of life features that allow writing in the 4D language to be as convient as possible. These features include autocompletion suggestions, color coding and tokenization of items, and more.

A feature that might not be used as often are adding comments. Comments can be used in many ways such as describing what the code is doing or informing why a certain value is being used.

Another useful way to use comments are to include the method name. This can typically be done by inserting a comment header macro or manually with a custom comment at the start of the method. The usefulness of doing so it allowing anyone viewing the method to easily search the callers. By selecting the method name and performing a search for references, a search result can quickly be displayed of references to the method.