File: ftob.f

package info (click to toggle)
scilab 2.2-4
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 31,472 kB
  • ctags: 21,963
  • sloc: fortran: 110,983; ansic: 89,717; makefile: 3,016; sh: 1,892; csh: 150; cpp: 101
file content (32 lines) | stat: -rw-r--r-- 715 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
      subroutine ftob(x,nx,topx)
      include '../stack.h'
      integer iadr,sadr
c
c     fortran to scilab
      integer topx,hsize
      double precision x
      dimension x(*)
c
      iadr(l)=l+l-1
      sadr(l)=(l/2)+1
c
      ilx=iadr(lstk(topx))
      hsize=4
      if(istk(ilx).eq.2) hsize=9+istk(ilx+1)*istk(ilx+2)
      if(top.ge.bot) then
         call error(18)
         return
      endif
      top=top+1
      il=iadr(lstk(top))
      err=lstk(top)+sadr(hsize)+nx-lstk(bot)
      if(err.gt.0) then
         call error(17)
         return
      endif
      call icopy(hsize,istk(ilx),1,istk(il),1)
      l=sadr(il+hsize)
      call dcopy(nx,x,1,stk(l),1)
      lstk(top+1)=l+nx
      return
      end