View Full Version : Programming
newgrl101
05-02-2005, 12:41
What's "L" in the programs? It seems to be a numerical value but what is it equivalant to in metric system. :confused:
Thanks
Where is this "L" to which you refer?
Dave Scheck
05-02-2005, 13:02
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
05-02-2005, 13:05
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-2017, Jelsoft Enterprises Ltd.