Input to action routines is done using the functions idba_set*, and output is read with the functions idba_enq* (see 2.5):
c Set the extremes of an area and retrieve all the stations in it
call idba_setd(handle, "latmin", 30.D0)
call idba_setd(handle, "latmax", 50.D0)
call idba_setd(handle, "lonmin", 10.D0)
call idba_setd(handle, "lonmax", 20.D0)
call idba_quantesono(handle, count)
c Get the informations about a station
do while (count.gt.0)
call idba_elencamele(handle)
call idba_enqc(handle, "name", cname)
call idba_enqi(handle, "ana_id", id)
call idba_enqd(handle, "lat", lat)
call idba_enqd(handle, "lon", lon)
c ....
count = count - 1
enddo
Note that, when one uses idba_setc, idba_seti, idba_enqc,
idba_enqi with parameters that have some decimal digits, DB-ALLe will
work with values as if they did not have a decimal point. That is, if latitude
is read with idba_enqi, then the result will be
.
The following example shows exactly what happens:
c Set the latitude to 30.0 degrees
call idba_setr(handle, "lat", 30.0)
c Set the latitude to 30.0 degrees
call idba_setd(handle, "lat", 30.0D0)
c Set the latitude to 0.00030 degrees
call idba_seti(handle, "lat", 30)
c Set the latitude to 30.0 degrees
call idba_seti(handle, "lat", 3000000)
c Set the latitude to 0.00030 degrees
call idba_setc(handle, "lat", "30")
c Set the latitude to 30.0 degrees
call idba_setc(handle, "lat", "3000000")