[Lazarus] How do you use codetools to declare new variables

Sven Barth pascaldragon at googlemail.com
Thu Oct 14 11:35:38 CEST 2010


Am 14.10.2010 11:22, schrieb Frank Church:
> I remember seeing in the docs where after creating a variable, some key
> press will jump to the var section of a procedure to insert that variable.
>
> Can someone remind me what it is?

Ctrl+Shift+C

You need to be on an assignment to the variable (e.g. "s :=''" or "i := 
5", so that CodeTools can evaluate the type.

But be careful if you have something like:

r := Rect(1, 2, 3, 4);

At least on Windows this will declare the type as RECT and will add the 
unit Windows to the uses clause.

Regards,
Sven




More information about the Lazarus mailing list