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

« back to all changes in this revision

Viewing changes to macros/m2sci/sci_files/sci_lower.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 [tree]=sci_lower(tree)
 
2
// Copyright INRIA
 
3
// M2SCI function
 
4
// Conversion function for Matlab lower()
 
5
// Input: tree = Matlab funcall tree
 
6
// Ouput: tree = Scilab equivalent for tree
 
7
// Emulation function: mtlb_lower()
 
8
// V.C.
 
9
 
 
10
opt=part("lower",1)
 
11
 
 
12
A = getrhs(tree)
 
13
if A.vtype==String then
 
14
  tree.name="convstr"
 
15
  tree.rhs=Rhs(A,opt)
 
16
  tree.lhs(1).dims=A.dims
 
17
  tree.lhs(1).type=A.type
 
18
elseif A.vtype==Unknown then
 
19
  tree.name="mtlb_lower"
 
20
  tree.lhs(1).dims=A.dims
 
21
  tree.lhs(1).type=A.type
 
22
else
 
23
  if typeof(A)=="funcall" then
 
24
    A.lhs=tree.lhs
 
25
  elseif typeof(A)=="operation" then
 
26
    A.out=tree.lhs
 
27
  end
 
28
  tree=A
 
29
end
 
30
endfunction