aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libvoclient/examples/f77registry.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vendor/voclient/libvoclient/examples/f77registry.f
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vendor/voclient/libvoclient/examples/f77registry.f')
-rw-r--r--vendor/voclient/libvoclient/examples/f77registry.f45
1 files changed, 45 insertions, 0 deletions
diff --git a/vendor/voclient/libvoclient/examples/f77registry.f b/vendor/voclient/libvoclient/examples/f77registry.f
new file mode 100644
index 00000000..d7f2fb21
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77registry.f
@@ -0,0 +1,45 @@
+C
+C F77REGISTRY -- Fortran example task of VOClient Registry interface
+C
+C M.Fitzpatrick, NOAO, July 2006
+
+ program f77registry
+
+ character svc*10, term*60
+ character title*70, type*20, sname*20
+ integer result, ier, count
+
+ svc = "cone"
+ term = "cool stars"
+
+c Initialize the VOClient interface
+ call vfinitvoclient ("", ier)
+
+c Do a keyword Registry search of Cone services.
+ call vfregsearchbysvc (svc, term, 0, result, ier)
+
+C Summarize the results
+ call vfresgetcount (result, count)
+ print *, "#"
+ print *, "# Service Type: ", svc
+ print *, "# Search Term: ", term
+ print *, "#"
+ print *, "# Found ", count, " matching records"
+ print *, "#"
+
+ do 10 i = 1, count
+
+ call vfresgetstr (result, "Title", i, title, len)
+ call vfresgetstr (result, "ShortName", i, sname, len)
+ call vfresgetstr (result, "Type", i, type, len)
+
+ print *, "----------------------------------------------------"
+ print *, "Title: ", title
+ print *, "Type: ", type, " ShortName: ", sname
+
+10 continue
+
+c Shut down the VO Client
+ call vfclosevoclient (0)
+ stop
+ end