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

« back to all changes in this revision

Viewing changes to macros/percent/%h_e.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 r=%h_e(i,h)
 
2
  if type(i)==10 then
 
3
    r=get(h,i)
 
4
  elseif type(i)==15 then
 
5
    n=lstsize(i)
 
6
    
 
7
    for k=1:n
 
8
      p=i(k)
 
9
      if type(p)==10 then
 
10
        if type(h)==9 then
 
11
          h=get(h,p),
 
12
        else
 
13
          h=h(p)
 
14
        end
 
15
      elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
 
16
        h=h(p)
 
17
      elseif type(p)==15 then
 
18
        h=h(p(:))
 
19
      else
 
20
        error('Invalid path')
 
21
      end
 
22
    end
 
23
    r=h
 
24
  else
 
25
    error('Invalid path')
 
26
  end
 
27
  if type(r)==10 then r=stripblanks(r),end
 
28
endfunction