~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to macros/percent/%cblock_c_cblock.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function a=%cblock_c_cblock(a,b)
 
2
  na=length(a)
 
3
  if na==1 then a=b,return,end
 
4
  if length(b)==1 then return,end
 
5
  v1=getfield(na,a)
 
6
  v2=getfield(2,b)
 
7
  
 
8
  if size(v1,1)<>size(v2,1) then error(5),end
 
9
  if type(v1)==type(v2) then
 
10
    setfield(na,[v1 v2],a)
 
11
  else
 
12
    setfield(na+1,v2,a);na=na+1
 
13
  end
 
14
  
 
15
  for k=3:length(b)
 
16
    setfield(na+1,getfield(k,b),a)
 
17
    na=na+1
 
18
  end
 
19
endfunction