Going to a Line Number

#### Search Results

Search

# Going to a Line Number

If you know the number of the source-code line you want to find, you can use the Go To command to position the cursor on a specific line. Depending on whether the line number option is switched on or off (this is the default setting), you can specify to search for either a numbered line or a physical line. See also Program Editor Options in the Using Natural Studio documentation.

If you use the Go To command in source code where the specified line is within a collapsed code block, the block is expanded to show the required line. For more information on expanded and collapsed code blocks, see Showing and Hiding Source Code.

To go to a specific line

1. From the Edit or context menu, choose Go To.

   Or:
   Choose the following toolbar button:

   Or:
   Press CTRL+G.

   The Go To dialog box appears.

2. If the Line numbers option is switched on (source-code line numbers are displayed), select the Numbered Line option button. If the Line numbers option is switched off (source-code line numbers are not displayed), select Physical Line. The physical line number is the default setting.

3. In the Line Number text box, enter the line number for which to search.

4. Choose Go To.

   The editor scrolls to the specified line and the cursor is placed at the beginning of the line.