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

« back to all changes in this revision

Viewing changes to macros/percent/%3d_i_h.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 h=%3d_i_h(i,v,h)
 
2
 if type(i)==10 then
 
3
    set(h,i,v)
 
4
 elseif type(i)==15 then
 
5
    hdl=h
 
6
    p=i($)
 
7
    if type(p)==1|type(p)==4|type(p)==2|type(p)==129|type(p)==15 then
 
8
      index=i($)
 
9
      i($)=null()
 
10
    else
 
11
      index=:
 
12
    end
 
13
    n=lstsize(i)
 
14
    for k=1:n-1
 
15
      p=i(k)
 
16
      if type(p)==10 then
 
17
        hdl=get(hdl,p),
 
18
      elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
 
19
        hdl=hdl(p)
 
20
      elseif type(p)==15 then
 
21
        hdl=hdl(p(:))
 
22
      else
 
23
        error('Invalid path')
 
24
      end
 
25
    end
 
26
    if type(index)==15 then
 
27
      hdl=hdl(index(:))
 
28
    else
 
29
      hdl=hdl(index)
 
30
    end
 
31
    set(hdl,i($),v)
 
32
  else
 
33
    error('Invalid path')
 
34
  end
 
35
endfunction
 
 
b'\\ No newline at end of file'