Guest User

Untitled

a guest
Jan 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ncInq :: NCID -> IO (Int, Int, Int, Int)
  2. ncInq ncid = do
  3. alloca $ \ndims_ptr -> do
  4. alloca $ \nvars_ptr -> do
  5. alloca $ \natts_ptr -> do
  6. alloca $ \unlimdimid_ptr -> do
  7. status <- nc_inq ncid ndims_ptr nvars_ptr natts_ptr unlimdimid_ptr
  8. ndims <- peek ndims_ptr
  9. nvars <- peek nvars_ptr
  10. natts <- peek natts_ptr
  11. unlimdimid <- peek unlimdimid_ptr
  12. return (fromEnum ndims, fromEnum nvars, fromEnum natts, fromEnum unlimdimid)
Add Comment
Please, Sign In to add comment