Keyword

# Commenting

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to add comments to your code.

## Usage

``` xojo
// the comment
' the comment
```

| Part        | Type                             | Description              |
|-------------|----------------------------------|--------------------------|
| The comment | `String</api/data_types/string>` | The text of the comment. |

## Notes

The compiler ignores any comments you enter using the //, or the ' . Comments are not included in the built app.

Comments can appear on separate lines or on the same line as executable code, provided they are to the right of any code that will execute. Valid comments appear in the Code Editor in red by default. You can change the color of comments in Options/Preferences.

The `Ctrl '` keyboard shortcut (`⌘ '` on macOS) toggles the selected lines of code between commented out and "live" states. The Comment and Uncomment buttons in the Code Editor toolbar do the same thing.

<div class="note">

<div class="title">

Note

</div>

Enter a URL into a comment will make the URL clickable.

</div>

## Sample code

The following code uses comments to document the results of `Boolean</api/data_types/boolean>` comparisons:

``` xojo
' This is a comment
' This is a comment

Var tax1 As Double ' contains the tax rate
Var tax2 As Double ' contains the tax rate
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |
