List Info

Thread: Definition/Declaration/Use usage




Definition/Declaration/Use usage
user name
2007-08-28 03:55:02
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.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )