Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: yaro on January 23, 2007, 08:03:38 pm

Title: finding variable declaration
Post by: yaro on January 23, 2007, 08:03:38 pm
Does codeblocks support finding variable declaration?

When I select a text which is a function name then it is able to find function declaration/definition but it doesn't work for variables.
When the text is a variable then it says not found xyz.

My second question is whether code completion supports completion of struct members like in xyz. or xyz->

Thanks
Title: Re: finding variable declaration
Post by: joubertdj on January 24, 2007, 06:20:09 am
Yes it does. Although there is a patch that will improve the editor going to the correct line first time. It is Patch 1740.
Title: Re: finding variable declaration
Post by: yaro on January 24, 2007, 12:18:26 pm
I'm just curious how it works because it doesn't work for plain C for me. Are it's limitations described somewhere?
Title: Re: finding variable declaration
Post by: raph on January 24, 2007, 01:09:12 pm
It should work.
Which version of codeblocks do you use? svn?
Title: Re: finding variable declaration
Post by: yaro on January 24, 2007, 01:56:58 pm
I found out it works for global variables but doesn't work for local function variables.

If you have something like

void test()
{
  int aa = 0;

  aa = aa + 1; <- it will be unable to find where aa is defined
}

It also doesn't work for function parameters. I use latest nightly build.

I think it would be nice to add cscope functions to codeblocks or at least grepping for symbol like KDevelop has.