---
schema_version: "1"
id: c9d1dbb1b5e8a630dad84f6aeb9f2d56bc02c18c1cc15f4b89fb50637f7b077a
title: Using Comments in AMPscript
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/guide/language-basics/mc-ampscript-guide-language-basics-comments.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics-comments.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9bfeefb11292ea2901e74eb49611e73471b401016b1ba6a85ceaf396da77389b
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# Using Comments in AMPscript

As with any other programming language, it's a good idea to include comments in your AMPscript code. By including comments, you can improve the readability of your code, and make it easier for other users to maintain in the future.

You can add comments to [AMPscript code blocks](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics.md#ampscript-code-blocks) or to code blocks that use [tag-based syntax](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics.md#ampscript_tag-based_syntax). You can’t add comments to [inline AMPscript](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics.md#ampscript_tag-based_syntax).

To add a comment to your AMPscript code, start the comment with the `/*` delimiter and end it with the `*/` delimiter. You can create single-line comments, multi-line comments, or include comments inline with code. This example includes a comment block that explains the code that follows it.

```
%%[
  Var @membersChelsea, @rowCount

  /* Retrieve rows from the Membership Rewards Programme data extension where
     the value in the "area" column is "chelsea" (case-insensitive) */
  Set @membersChelsea = LookupRows("membershiprewardsprogramme","area","chelsea")
  Set @rowCount = RowCount(@membersChelsea)
  ...
]%%
```
