C: file_id = Hopen(filename, access. block_size); an_id = ANstart(file_id); status = ANreadann(ann_id, buf, HDstrlen(buf)); status = ANendaccess(ann_id); status = ANend(an_id); status = Hclose(file_id); FORTRAN: file_id = hopen(filename, access, block_size) an_id = afstart(file_id) status = afreadann(ann_id, buf, buf_length) status = anendaccess(ann_id) status = afend(an_id) status = hclose(file_id)
ANreadann has three parameters: ann_id, buf and buf_length. The ann_id parameter is the identifier for the annotation to be read, the buf parameter is the buffer the annotation string will be read into and the buf_length parameter is the length of the buffer. As with ANwriteann, the HDstrlen function can be used to dynamically determine the length of the buffer. In either C or Fortran-77, specifying a buffer length value different from the actual length of the buffer will result in the annotation either being truncated or null-padded accordingly.
TABLE 10M ANreadann Parameter List