CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Extract/Introduce variable

Last modified: 11 February 2024

The Extract Variable refactoring puts the result of the selected expression into a variable. It declares a new variable and uses the expression as an initializer. The original expression is replaced with the new variable.

This refactoring is available for C/C++, Objective-C/C++, Python and JavaScript.