spec: What is the definition of a symbol?
Basile B.
b2.temp at gmx.com
Sat Nov 21 00:02:15 UTC 2020
On Friday, 20 November 2020 at 21:23:24 UTC, Paul Backus wrote:
> On Friday, 20 November 2020 at 21:16:47 UTC, Basile B. wrote:
>>
>> I'd go for something like that:
>>
>> «A symbol is a declaration. This includes
>
> A symbol is not a declaration. `int x;` is a declaration, but
> `x` by itself is not.
`int x;` is a variable declaration. Variable declarations are all
symbols (DSymbol in the compiler). `x` in this case represents
the symbol name, `int` its type.
More information about the Digitalmars-d
mailing list