Definition/Declaration/Use usage
Andreas Pakulat
apaku at gmx.de
Tue Aug 28 08:55:02 UTC 2007
Hi,
this is somewhat related to the question from Aleix last week, but a bit
more specific...
Given this C++ snippet:
int i;
i=2;
int j = i+1;
Whats a declaration, a definition and a use? In particular is line 2 a
definition or just a use? Is line 3 a use for variable i and a
declaration+definition for j? And line one, is it just a declaration or
also a definition?
Can the DUChain handle "re-declaration" and "re-definition" as needed by
languages such as ruby and python? I mean for code like this:
foo=myobject1()
foo.doSmth()
foo=myobject2()
foo.doOther()
can I create 2 declarations for foo in lines 1 and 3 respectively and
DUChain will still be usable?
Andreas
--
It's lucky you're going so slowly, because you're going in the wrong direction.
More information about the KDevelop-devel
mailing list