Skip to content

Commit 74f16e3

Browse files
committed
Update README.md
1 parent 5aa4da8 commit 74f16e3

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
NetCDF-D
22
========
33

4-
D bindings to the NetCDF library
4+
D bindings to the NetCDF C library (https://github.com/Unidata/netcdf-c and http://www.unidata.ucar.edu/software/netcdf/)
5+
6+
Usage
7+
-----
8+
9+
```import netcdf;``` and you're away.
10+
11+
Everything should work identically to the C version, with the exception of the backward compatibility and deprecated sections which have been removed. D version blocks have been used in place of C version macros. The names of the versions are kept the same.
12+
13+
14+
Note that this is a binding a C library, where type sizes are somewhat implementation defined. I would recommend against using functions taking ```c_long```/```c_ulong``` in favour of ```int```/```uint``` and ```long```/```ulong```.[1]
15+
16+
Architectures / C compilers where C types don't comply with ```sizeof(int) == 4 && sizeof(long long) == 8``` or have ```float```/```double``` types laid out differently to the IEEE-754 standard single and double precision formats are not supported at this time.[2]
17+
18+
19+
[1] Note that the function naming has not been changed. Functions with ```long```/```ulong``` in the name take ```c_long```/```c_ulong``` as parameters, functions with (u)longlong in the name take ```long```/```ulong```.
20+
21+
[2] Things will probably still work if you can avoid using the parts of the C API that use the offending types.

0 commit comments

Comments
 (0)