File: %25h2for.sci

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (19 lines) | stat: -rw-r--r-- 462 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
function [stk,nwrk,txt,top]=%h2for(nwrk)
//  &
// Copyright INRIA
s2=stk(top);s1=stk(top-1);
txt=[]
[e1,te1]=s1(1:2);
[e2,te2]=s2(1:2);
//
if te2=='2'|te2=='3' then e2='('+e2+')',end
if te1=='2'|te1=='3' then e1='('+e1+')',end

if s1(4)=='1'&s1(5)=='1'&s2(4)=='1'&s2(5)=='1' then
  stk=list(e1+'.and.'+e2,'1','0',s2(4),s1(5))
else
  txt='c Warning: boolean and on matrices not yet handled'
  stk=list(e1+'.and.'+e2,'1','0',s1(4),s1(5))
end
top=top-1
endfunction