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

« back to all changes in this revision

Viewing changes to examples/link-examples/ext8f.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 ext8f(y)
 
2
c     -------------------------------------------
 
3
c     same example with call to cmatptr
 
4
c     -->param=[1,2,3];         
 
5
c     -->link('ext8c.o','ext8c','C');     
 
6
c     -->y=call('ext8c','out',size(param),1,'d');
 
7
c     Copyright INRIA
 
8
      logical cmatptr
 
9
      double precision y(*)
 
10
      include '../../routines/stack.h'
 
11
c     If variable 'param' exists gets its pointer in 
 
12
c     internal stack else return
 
13
      if(.not.cmatptr('param'//char(0),m,n,lp)) return
 
14
c     ********************************
 
15
c     param entries are in stk(lp+i),i=0,m*n
 
16
c     we can change param 
 
17
      stk(lp)=18.0d0
 
18
c     and read param 
 
19
      do 10 i=1,m*n
 
20
         y(i) = stk(lp+i-1)
 
21
 10   continue
 
22
      return
 
23
      end