File: %25rc2for.sci

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 (31 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
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
function [stk,nwrk,txt]=%rc2for(nwrk)
// genere le code relatif a la concatenation en ligne des matrices
//!

// Copyright INRIA
rhs=abs(evstr(op(3)))
nl='0';typ=0
for k=1:rhs
 sk=stk(top-rhs+k)
 typ=maxi(typ,evstr(sk(3)))
 nl=addf(nl,sk(4))
end
nc=sk(5)

typ=string(typ)
 
[out,nwrk,txt]=outname(nwrk,typ,nl,nc)
lout=length(out)
nl1='0'
for k=1:rhs
  sk=stk(top-rhs+k)
  if part(out,lout)==')' then
    o1=part(out,1:lout-1)+'+'+mulf(nl1,nc)+')'
  else
    o1=out+'('+addf(nl1,'1')+',1)'
  end
  n1=sk(4)
  txt=[txt;gencall(['dmcopy',sk(1),n1,o1,nl,n1,nc])];
  nl1=addf(nl1,n1)
end
stk=list(out,'-1',typ,nl,nc)