what does it mean if u begin a variable/function name with __ (an underscore or 2)?
Printable View
what does it mean if u begin a variable/function name with __ (an underscore or 2)?
It means you've started it with two underscores...
Quzah.
It also means you're breaking, or close to breaking, a C standard ruling. Read about them here .
Personally, I avoid naming variables that begin with an underscore.
>It also means you're breaking, or close to breaking, a C standard ruling.
Or to be more precise, you're most definitely using an identifier that is reserved in all cases by the implementation:
>Personally, I avoid naming variables that begin with an underscore.Quote:
7.1.3 Reserved identifiers
...
-- All identifiers that begin with an underscore and either an uppercase letter or another
underscore are always reserved for any use.
A good habit to get into. Much easier than remembering the complex rules concerning reserved identifiers. ;)
>>you're most definitely using an identifier that is reserved in all cases by the implementation<<
Well... nit picking the nit picker.... a name like _myvar isn't reserved according to that rule ;) But let's not get too deep.
Welcome back, btw.
>Well... nit picking the nit picker.... a name like _myvar isn't reserved according to that rule
That's true, the next rule that I didn't paste explains how the single underscore works:
;)Quote:
— All identifiers that begin with an underscore are always reserved for use as identifiers
with file scope in both the ordinary and tag name spaces.
>Welcome back, btw.
Thanks.
I thought it meant you were Microsoft. It's used as a warning to users. ;)