~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to examples/link-examples-so/ext7f.f

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine ext7f(a,b)
 
2
c     example 7
 
3
c     creating vector c in scilab internal stack
 
4
c     -->link('ext7f.o','ext7f')
 
5
c     -->a=[1,2,3]; b=[2,3,4];
 
6
c     c does not exist (c made by the call to matz)
 
7
c     -->call('ext7f',a,1,'d',b,2,'d','out',1);
 
8
c     c now exists
 
9
c     -->c=a+2*b
 
10
c     Copyright INRIA
 
11
      double precision a(3),b(3),c(3),w
 
12
      logical cwritemat,cwritechain
 
13
      do 1 k=1,3
 
14
         c(k)=a(k)+2.0d0*b(k)
 
15
 1    continue
 
16
c     sending c array values to c Scilab variable 
 
17
c     of size [1,3]
 
18
      if (.not.cwritemat('c'//char(0),1,3,c)) return
 
19
c     sending string 'test' (size 4) to Scilab variable d
 
20
      if (.not.cwritechain('d'//char(0),4,'test')) return
 
21
      return
 
22
      end