CLion
 
Get CLion

Extract/Introduce variable

Last modified: 23 October 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.