File: get2f.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (33 lines) | stat: -rw-r--r-- 921 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
function [stk,top,vnms,vtps]=get2f(nam,stk,top,vnms,vtps)
// realise la traduction fortran de l'acquisition d'une variable (stackg)
//!
// Copyright INRIA
top=top+1
vn=find(nam==vnms(:,2))
if vn==[] then
  op1=lst(ilst+1)
  if op1(1)<>'5'|op1(2)<>'24' then
    if nam=='%eps' then
      stk(top)=list('%eps','0','1','1','1')
      nv=prod(size(vnms))/2+1;
      vnms=[vnms;['%eps','%eps']]
      vtps(nv)=list('1','1','1',0)
    elseif nam=='%i' then
      stk(top)=list(['0.0d0','1.0d0'],'0','1','1','1')
    elseif nam=='%io' then
      stk(top)=list(%io,'0','0','1','2')
      nv=prod(size(vnms))/2+1;
      vnms=[vnms;['%io','%io']]
      vtps(nv)=list('0','1','2',0)
    else
      error('variable: ' +nam+' undefined!')
    end
  else
    stk(top)=list(nam,'?','0','0','0',0)
  end
else
  typ=vtps(vn)
//  stk(top)=list(vnms(vn,2),'0',typ(1),typ(2),typ(3))
  stk(top)=list(vnms(vn,2),'0',typ(1),typ(2),typ(3))
end