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);
}
 							(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
Post a Comment