<aname="l00054"></a>00054 <spanclass="comment">/* Loop on all the messages in a file.*/</span>
<aname="l00055"></a>00055 <spanclass="keywordflow">while</span> ((h = <aname="a2"></a><aclass="code"href="group__grib__handle.html#g5e24f8499aa7e4178ccc25a5de3145c5"title="Create a handle from a file resource.">grib_handle_new_from_file</a>(0,in,&err)) != NULL ) {
<aname="l00056"></a>00056 <spanclass="comment">/* Check of errors after reading a message. */</span>
<aname="l00059"></a>00059 <spanclass="comment">/* Get the double representing the missing value in the field. */</span>
<aname="l00060"></a>00060 GRIB_CHECK(<aname="a4"></a><aclass="code"href="group__get__set.html#g5d9eeda38bf59ee3fa9ce3f92e65009e"title="Get a double value from a key, if several keys of the same name are present, the...">grib_get_double</a>(h,<spanclass="stringliteral">"missingValue"</span>,&missingValue),0);
<aname="l00061"></a>00061
<aname="l00062"></a>00062 <spanclass="comment">/* A new iterator on lat/lon/values is created from the message handle h. */</span>
<aname="l00063"></a>00063 iter=<aname="a5"></a><aclass="code"href="group__iterators.html#gefb1f87110bdce732edc9154cf0e7d58"title="Create a new iterator from a handle, using current geometry and values.">grib_iterator_new</a>(h,0,&err);
<aname="l00067"></a>00067 <spanclass="comment">/* Loop on all the lat/lon/values. */</span>
<aname="l00068"></a>00068 <spanclass="keywordflow">while</span>(<aname="a6"></a><aclass="code"href="group__iterators.html#g4f73056dbfdda3de0060559b9b39ea34"title="Get the next value from an iterator.">grib_iterator_next</a>(iter,&lat,&lon,&value)) {
<aname="l00069"></a>00069 <spanclass="comment">/* You can now print lat and lon, */</span>
<aname="l00078"></a>00078 <spanclass="comment">/* At the end the iterator is deleted to free memory. */</span>
<aname="l00079"></a>00079 <aname="a7"></a><aclass="code"href="group__iterators.html#gd46ed73a16af56e6f3b46fe86ee8a759"title="Frees an iterator from memory.">grib_iterator_delete</a>(iter);
<aname="l00080"></a>00080
<aname="l00081"></a>00081 <spanclass="comment">/* At the end the grib_handle is deleted to free memory. */</span>
<aname="l00082"></a>00082 <aname="a8"></a><aclass="code"href="group__grib__handle.html#g0e4b2585f22247c49b930c1579257677"title="Frees a handle, also frees the message if it is not a user message.">grib_handle_delete</a>(h);