_ or __ in front of variables

Hello

Newbie question here - but I have noticed on a few peoples example programs, the use of _ or __ in front of some variables. I was just wondering what the purpose of these underscores is?

Do they serve a purpose, or are they just so the variables stand out or something?

Thanks

Typically, the underscore is used in front of member variables in a class, to distinguish them (for the reader) from local variables. The presence or absence of the _ (or __) makes no difference to the compiler.

Thanks
So by 'member variables' you mean what I would call 'Global Variables' ?

As in variables that can be used throughout the sketch rather than local ones to a function.

Sorry coming from IEC PLC programming to this and still learning.

Since they have no effect to the compiler, that is good to know.

Thanks

So by 'member variables' you mean what I would call 'Global Variables' ?

No, not at all, sorry.

What he means is variables that are part of a class.
Not global, not local in a function, but in a separate class.