Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Underscore?

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    3

    Underscore?

    Hello, very new to arduino,

    just a quick question

    in sample code I noticed an "underscore" got me curious.

    Declaring a Joystick object

    Joystick_ Joystick();

    what, if anything, does this indicate?

    Thankyou

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,166
    The underscore is a valid character anywhere in a C/C++ variable name. It doesn't mean anything special in the language (i.e. to the compiler) but can be used to make a variable name easier to read (e.g. count_per_second instead of countpersecond).

    Where did you see "Joystick_" ?

    Pete

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    3
    I saw it in the code for 32 button box, video with attached code in the description.
    I think !

  4. #4
    Junior Member
    Join Date
    Aug 2019
    Posts
    3
    Sorry Pete,
    there should have been a "thank you" in there, somewhere

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,166
    No problemo

    Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •