Declaring Variable

From RAD Studio
Jump to: navigation, search

Go Up to Refactoring Procedures Index


Editing Delphi code in the Code Editor, you can use the Refactor > Declare Variable menu command to declare new variables.

To declare a variable

  1. In the Code Editor, click a variable name that has not yet been declared.

    Note: Any undeclared variable will be highlighted with a red wavy underline by Error Insight.

  2. Choose the Refactor > Declare Variable menu command. If the variable has already been declared in the same scope, the command is not available.
  3. Fill in the Declare New Variable dialog box as needed.
  4. Click OK. The variable declaration is added to the procedure, based on the values you entered in the Declare New Variable dialog box.


See Also