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

Thread: Redeclaration error from Teensiduino

  1. #1

    Redeclaration error from Teensiduino

    When I open a brand new sketch in Arduino/Teensiduino and enter "float y0;" as the first line, this error occurs after verify:
    ""float y0" redeclared as different kind of symbol".

    This doesn't occur when the line is "float x0" or "float z0;". It doesn't occur when the board is set to Arduino Uno, but it does happen when set to Teensy 3.6, Teensy 4.0, and Teensy 3.1/3.2.

    Is "y0" a reserved variable name?

    Thanks,
    Michael

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,694
    Yes, looks like the C library is defining y0(), y1(), yn(), j0() and other functions with global scope.

    https://www.gnu.org/software/libc/ma...Functions.html

    These names can be used as local variables, but not global variables.

Posting Permissions

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