1 c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 c This file must be used under the terms of the CeCILL.
5 c This source file is licensed as described in the file COPYING, which
6 c you should have received as part of this distribution. The terms
7 c are also available at
8 c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9 subroutine intclear(fname)
12 parameter (nz3=nsiz-3,nz2=nsiz-2)
15 logical getsmat,checkval,checklhs
17 integer a, blank,percen,helps(nsiz)
20 data a/10/,blank/40/,percen/56/
21 data helps /353243448,673717273,nz2*673720360/
26 if(.not.checklhs(fname,1,1)) return
29 if (macr.ne.0 .or. paus.ne.0) then
30 if(rstk(pt-2).eq.909) then
31 c . clear within an exec'd macro
34 c . clear within a macro, an execstr, an exec or a pause
35 k = lpt(1) - (13+nsiz)
36 if(lin(k+7).ne.0.and.istk(lin(k+6)).eq.10) goto 02
37 c . clear within a macro, an exec or a pause
38 bot = min(bbot,lin(k+5))
43 c . clear all variable
45 c . preserve %help variable
50 if (fin.gt.0) i1=min(fin,i1)
67 lstk(top+1) = lstk(top) + 1
73 if(.not.getsmat(fname,top0,top,m,n,1,1,lr,nlr)) return
74 if(.not.checkval(fname,m*n,1)) return
79 c . check for valid variable name
82 if((ic.gt.blank.and.(i.gt.0.and.ic.eq.percen)).or.
83 $ (i.eq.0.and.ic.lt.a)) then
89 call namstr(id,istk(lr),nlr,0)
92 lstk(top+1) = lstk(top) + 1
95 if (err .gt. 0.or.err1.gt.0) return
101 lstk(top+1) = lstk(top) + 1