Re: Little interesting idea to quickly add local variable, maybe even fields.



Skybuck Flying пишет:
Suppose you programming some routine like so:

procedure SomeRoutine;
begin

... blablabla...


// Now you want to add an index variable called: vIndex of type integer.
// The idea is to type the following:
var vIndex : integer;

// then when pressing shift-enter... delphi simply adds this line of text to some routine like so:

end;

procedure SomeRoutine;
var
vIndex : integer;
begin

... blablabla ...

end;

TATA ! ;) :)

It will only do this if the variable does not yet exist... otherwise the following will show:

procedure SomeRoutine;
var
vIndex : integer;
begin

... blablabla ...

var vIndex : integer; already exists // <- selected

end;

Then it can be easily overwritten.

Worth a try ;)

http://deex.delphist.com/dden.htm

http://www.adaic.com/standards/05rm/html/RM-5-6.html#S0145

--
If you want to get to the top, you have to start at the bottom
.



Relevant Pages