What does 1000L mean here? Who can help?


void playtone(int tone, int duration) {
  (long = 0; < duration * 1000l; += tone * 2) {
    digitalwrite(speakerpin, high);
    delaymicroseconds(tone);
    digitalwrite(speakerpin, low);
    delaymicroseconds(tone);
  }

it means 1000 long integer , in context used make sure multiplication "duration * 1000" results in long integer , not overflow (as without l).


Arduino Forum > Using Arduino > Programming Questions > What does 1000L mean here? Who can help?


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'