Castalia allows inline variable declaration. In the main body of your code, you can declare variables and they will be automatically added to the function or procedure, and the declaration replaced by a reference to the variable.
For example, you begin with the following simple procedure:
procedure InlineVarTest;
begin
|
end;
Type "var S: String" followed by the spacebar.
procedure InlineVarTest;
begin var S: String<space> end;
The variable S will be added to the procedure, and the declaration replaced with a reference to S:
procedure InlineVarTest;
var
S: String;
begin
S|
end;
You can then complete your statement, without ever having to jump between code blocks.
procedure InlineVarTest;
var
S: String;
begin
S := 'Inline variable declaration is cool!';
ShowMessage(S);
end;