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

Valutazione Template - Joomla! Forum - community, help and support

SD Datastring Convention

First use of Arduino Uno : avrdude error on Blink uploading