File: ftob.f

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (33 lines) | stat: -rw-r--r-- 737 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
33
      subroutine ftob(x,nx,topx)
c     Copyright INRIA
      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