I am trying to use the inline variable declaration with Castalia described here.
Here's the excerpt in question from the link above:
Inline Variable Declaration Castalia provides inline variable declaration. In the main body of your code, you can declare variables and Castalia will automatically add it to the variable declaration section of your function or procedure as soon as you press the space bar, the declaration you typed in the main body is replaced by a reference to the variable.
However, it does not seem to work for me. For example, if I press the space bar after myVar: integer
in this code:
procedure test;
begin
myVar: integer
end;
I do not get this automagically (actually nothing happens):
procedure test;
var
myVar: integer;
begin
myVar
end;
There does not seem to be any specific Castalia setting to enable/disable in Castalia->Castalia Options for inline variables and the Embarcadero document does not mention any setting either.
How does the Castalia inline variable declaration work?
See How_to_Use_Inline_Variable_Declaration_(Castalia).
You need to write:
begin
var myVar: Integer[space]
end;
to get
var
myVar: Integer;
begin
myVar
end;