[GRASS-dev] [GRASS GIS] #2421: Functions from CDHC lib have no prefix
GRASS GIS
trac at osgeo.org
Wed Sep 17 13:32:38 PDT 2014
#2421: Functions from CDHC lib have no prefix
----------------------------------+-----------------------------------------
Reporter: martinl | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: cdhclib, api, prefix | Platform: Unspecified
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by glynn):
Replying to [comment:4 wenzeslaus]:
> Even more by the way, does the
[http://grass.osgeo.org/programming7/shapiro1_8c_source.html#l00032
following syntax] mean something special?
>
{{{
(double).6872
}}}
No.
> I'm pretty sure that it is the same as writing just `.6872`
Yes (although a leading zero is preferable, i.e. "0.6872").
A floating-point literal with no suffix has type "double". A suffix of "f"
or "F" makes the type "float". In C99 and later, a suffix of "l" or "L"
makes the type "long double"
It may be that the code was converted from another language using a
converter which always adds an explicit cast. Or it may have been
maintained by someone relatively unfamiliar with C who added the cast
"just to be sure".
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2421#comment:5>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list