View Full Version : Programming
newgrl101
02-05-2005, 12:41 PM
What's "L" in the programs? It seems to be a numerical value but what is it equivalant to in metric system. :confused:
Thanks
jgannon
02-05-2005, 12:45 PM
Where is this "L" to which you refer?
Dave Scheck
02-05-2005, 01:02 PM
I found an example in robot.h of the kickoff navigation code
#define PI_MRAD 3142L
From this (http://www.newtonlabs.com/ic/dist/ic-monolithic.html) site
Long integer constants are created by appending the suffix "l" or "L" (upper- or lower-case alphabetic L) to a decimal integer. For example, 0L is the long zero. Either the upper or lower-case "L" may be used, but upper-case is the convention for readability.
Kevin Watson
02-05-2005, 01:05 PM
What's "L" in the programs? It seems to be a numerical value but what is it equivalant to in metric system. :confused:
ThanksDo you mean something like 0L (zero ell)? It's just a way of telling the compiler how much precision to use in calculations that use this constant. In this case, it tells the compiler to use a 32-bit (L)ong.
-Kevin
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.