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

« back to all changes in this revision

Viewing changes to examples/interface-tour/intex14f.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 intex14f(fname)
 
2
      include 'stack.h'
 
3
c  -------------------------------
 
4
c
 
5
c   Accessing the Scilab Stack :
 
6
c   Creation of a Scilab Matrix "C"
 
7
c   from a name and an array of data
 
8
c
 
9
      character*(*) fname
 
10
      logical cwritemat
 
11
      logical checklhs,checkrhs
 
12
 
 
13
      double precision C(3)
 
14
 
 
15
      minlhs=1
 
16
      maxlhs=1
 
17
      minrhs=0
 
18
      maxrhs=0
 
19
 
 
20
      if(.not.checkrhs(fname,minrhs,maxrhs)) return
 
21
      if(.not.checklhs(fname,minlhs,maxlhs)) return
 
22
 
 
23
      nrows=1
 
24
      ncols=3
 
25
      C(1)=10.0d0
 
26
      C(2)=20.0d0
 
27
      C(3)=30.0d0
 
28
 
 
29
c  Sending array C to Scilab as variable "C" (size [1,3]) 
 
30
      if(.not.cwritemat("C"//char(0), nrows, ncols, C)) return
 
31
 
 
32
c  No output
 
33
      lhsvar(1) = 0
 
34
      return
 
35
      end
 
36
 
 
37