aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libvoclient/examples/f77registry.f
blob: d7f2fb216a7deb60d7b15330dfa5cb7034aedc0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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