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

« back to all changes in this revision

Viewing changes to macros/m2sci/sci_rem.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 [stk,txt,top]=sci_rem()
2
 
// Copyright INRIA
3
 
txt=[]
4
 
x= stk(top-1)(1)
5
 
y= stk(top)(1)
6
 
if ~(isname(x)|isnum(x)) then
7
 
  x=gettempvar(1)
8
 
  txt=[txt;x+' = '+stk(top-1)(1)]
9
 
end  
10
 
if ~(isname(y)|isnum(y)) then
11
 
  y=gettempvar(1)
12
 
  txt=[txt;y+' = '+stk(top)(1)]
13
 
end  
14
 
e=x+'-fix('+x+'./'+y+').*'+y
15
 
if stk(top)(3)=='1'&stk(top)(4)=='1' then
16
 
  stk=list(e,'2',stk(top-1)(3),stk(top-1)(4),'1')
17
 
elseif stk(top-1)(3)=='1'&stk(top-1)(4)=='1' then
18
 
  stk=list(e,'2',stk(top)(3),stk(top)(4),'1')
19
 
elseif stk(top-1)(3)=='1'|stk(top-1)(4)=='1'
20
 
  stk=list(e,'2',stk(top-1)(3),stk(top-1)(4),'1')
21
 
elseif stk(top)(3)=='1'&stk(top)(4)=='1'
22
 
  stk=list(e,'2',stk(top)(3),stk(top)(4),'1')
23
 
else
24
 
  stk=list(e,'2',stk(top)(3),stk(top)(4),'1')
25
 
end
26
 
top=top-1
27
 
 
28
 
 
29