Opened 10 years ago
Closed 10 years ago
#2421 closed task (fixed)
Functions from CDHC lib have no prefix
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 7.0.0 |
Component: | Default | Version: | svn-trunk |
Keywords: | cdhclib, api, prefix | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description (last modified by )
In contrast to other GRASS libs, CDHC lib (1) doesn't use any prefix. I would suggest to change eg.
anderson_darling()
to
Cdhc_anderson_darling()
Any option? Marked as blocker since it's API change.
Change History (8)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|---|
Summary: | Functions from CDHC have no prefix → Functions from CDHC lib have no prefix |
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
comment:3 by , 10 years ago
Keywords: | cdhclib prefix added; cdhc removed |
---|
follow-up: 5 comment:4 by , 10 years ago
follow-up: 6 comment:5 by , 10 years ago
Replying to wenzeslaus:
Even more by the way, does the 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".
comment:6 by , 10 years ago
Replying to glynn:
Replying to wenzeslaus:
Even more by the way, does the following syntax mean something special?
(double).6872No.
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".
Thanks for the answer, I also wanted to be sure that I understand.
follow-up: 8 comment:7 by , 10 years ago
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Agreed, they should use prefix.
BTW, if somebody knows something about it, please go ahead and write some documentation, there is none.
Even more by the way, does the following syntax mean something special?
I'm pretty sure that it is the same as writing just
.6872
but one never knows with C.For the other functions which might be similar case as cdhclib, we might try to go through the elements in Globals section in manual but I'm not sure if all the things in the manual are public API, I think they should be according to the Doxyfile settings: