source: branches/branch-1.4/zoo-project/zoo-services/hello-fortran/service.f @ 822

Last change on this file since 822 was 1, checked in by djay, 15 years ago

Initial ZOO SVN Repository Import.

File size: 1.4 KB
Line 
1ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
2c     Simply create a welcome message
3ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4       Integer FUNCTION HELLOF(zoo_main_cfg,zoo_inputs,zoo_outputs)
5     & RESULT (R)
6       Integer R, ls, iLenStr
7       CHARACTER*(1024) zoo_main_cfg(10,30),zoo_inputs(10,30),
8     & zoo_outputs(10,30)
9        CHARACTER*(1024) TMP
10
11       write(0,*) 'Hello '//zoo_inputs(4,1)//' from the Fortran world !'
12
13       ls = iLenStr(zoo_inputs(4,1))
14       TMP = zoo_inputs(4,1)
15       zoo_outputs(1,1) = 'name'//CHAR(0)
16       zoo_outputs(2,1) = 'result'//CHAR(0)
17       zoo_outputs(3,1) = 'value'//CHAR(0)
18       zoo_outputs(4,1) = 'Hello '//TMP(1:ls)//
19     & ' from the Fortran world !'//CHAR(0)
20       zoo_outputs(5,1) = 'datatype'//CHAR(0)
21       zoo_outputs(6,1) = 'string'//CHAR(0)
22
23       R = 3
24       Return
25       END
26
27       Integer Function iLenStr(cString)
28ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
29c     Compute String Length (thanks to Abdelatif Djerboua from RHEA)
30ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
31       Character*(*) cString
32       Integer       iLen,i
33
34      iLen = Len(cString)
35      Do i=iLen,1,-1
36         If(ichar(cString(i:i)).NE.0) Goto 10
37      EndDo
38      i = 1
39  10  Continue
40      iLenStr = i
41
42      Return
43      End Function iLenStr
44
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png