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

« back to all changes in this revision

Viewing changes to routines/scicos/itosci.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 itosci(x,mx,nx)
 
2
C     fortran to scilab
 
3
 
4
C.. Formal Arguments .. 
 
5
c     Copyright INRIA
 
6
      integer  x(*)
 
7
      integer  mx
 
8
      integer  nx
 
9
 
10
C.. Local Scalars .. 
 
11
      integer  il,l
 
12
 
13
C.. External Calls .. 
 
14
      external error, int2db
 
15
 
16
C.. Include Statements ..
 
17
      include "../stack.h"
 
18
 
19
C.. Statement Functions ..
 
20
      integer  iadr
 
21
      integer  sadr
 
22
      iadr(l) = l + l - 1
 
23
      sadr(l) = (l/2) + 1
 
24
 
25
C ... Executable Statements ...
 
26
 
27
C     
 
28
      m = mx
 
29
      n = nx
 
30
      if(mx*nx.eq.0) then
 
31
         n = 0
 
32
         m = 0
 
33
      endif
 
34
 
 
35
      if (top .ge. bot) then
 
36
        call error(18)
 
37
      else
 
38
        top = top + 1
 
39
        il = iadr(lstk(top))
 
40
        l = sadr(il+4)
 
41
        err = l + m*n - lstk(bot)
 
42
        if (err .gt. 0) then
 
43
          call error(17)
 
44
        else
 
45
          istk(il) = 1
 
46
          istk(il+1) = m
 
47
          istk(il+2) = n
 
48
          istk(il+3) = 0
 
49
          if(n.ne.0) call int2db(n*m,x,1,stk(l),1)
 
50
          lstk(top+1) = l + n*m
 
51
        endif
 
52
      endif
 
53
      end