Re: What is 'symbol' and its uses?
Shigio YAMAGUCHI <[email protected]> Wed, 30 Jan 2013 21:30:04 +0900
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Organization | GNU Project |
| Message-ID | <[email protected]> |
Hello, On Wed, 30 Jan 2013 16:39:04 +0800 Leo Liu <[email protected]> wrote: > Hello, > > I am confused by the meaning of 'symbol' as found in 'man global'. In > particular, the output from 'global -c' and 'global -cs'. > > How should they differ? I am using GNU global with a java project but I > am new to Java. GLOBAL classifies all symbols into three, that is, definitions, references and other symbols. Reference (-r option) means the reference to a symbol which has definitions. Other symbol (-s option) means the reference to a symbol which has no definition. For example: +----------------------------------------------------------------- |int func0() { <= definition (not referred to) |} |int func() { <= definition (referred to) | ... |} | | ... | | func(); <= reference (func is defined) | func1(); <= other symbol (func1 is not defined) +----------------------------------------------------------------- Global works like follows: $ global -c func func0 $ global -cr func $ global -cs func1 $ global -crs func func1 > Also, does 'global -r TAGNAME' include definitions in the results? If so > can I exclude them? No, it doesn't. The description in 'man global' seems to be bad. I'll rewrite it. Shigio -- Shigio YAMAGUCHI <[email protected]> PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3