User forums > General (but related to Code::Blocks)

finding variable declaration

(1/1)

yaro:
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

joubertdj:
Yes it does. Although there is a patch that will improve the editor going to the correct line first time. It is Patch 1740.

yaro:
I'm just curious how it works because it doesn't work for plain C for me. Are it's limitations described somewhere?

raph:
It should work.
Which version of codeblocks do you use? svn?

yaro:
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.

Navigation

[0] Message Index

Go to full version