clean slate
- Subject: clean slate
- From: Edwin Woollett
- Date: Fri, 8 May 2009 13:23:30 -0700
On 7 May 2009, Robert Dodier wrote
----------------------------------------
> reset(fpprintprec) restores the original value of fpprintprec.
-----------------------------------
Thanks, this is more straightforward.
On 8 May 2009 Leo Butler wrote:
--------------------------------------
> kill allows you to do this directly without a second init file:
> mkill() := ( kill(allbut(mstate,mkill)), etc. )$
-------------------------------------------
Thanks, this is much simpler.
my new mstate.mac startup file:
---------------------------------
disp (" mkill(), mstate() " )$
mstate ( ) := (
print (" functions = ",functions),
print (" values = ",values),
print (" arrays = ",arrays),
print (" facts() = ",facts() ),
print (" myoptions = ",myoptions),
print (" labels = ",labels),
print (" fpprec = ",fpprec," fpprintprec = ",fpprintprec ) )$
mkill ( ) := ( kill ( allbut (mstate,mkill)),
reset (fpprintprec,fpprec),
print ("----- clean start"))$
--------------------------
and record of behavior:
with new session of Xmaxima:
-----------------------
Maxima 5.18.1 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
mkill(), mstate()
hello ted
(%i1) mstate()$
functions = [mstate(), mkill()]
values = []
arrays = []
facts() = []
myoptions = [maxima_userdir, maxima_tempdir, file_search_maxima]
labels = [%i1]
fpprec = 16 fpprintprec = 0
(%i2) load(qfft);
type qfft_syntax(); to see qfft and qift syntax
(%o2) c:/work2/qfft.mac
(%i3) fpprec:10$
(%i4) mstate()$
functions = [mstate(), mkill(), qfft_syntax(), chop_syntax(),
current_small(), setsmall(val), _chop%(ex), fchop(expr), fchop1(expr,
small),
nyquist(ns, fs), sample(expr, var, ns, dvar), vf(flist, dvar),
sample_plot(expr, var, vmax, ymin, ymax, flist, dvar, psize),
sample_plot_eps(expr, var, vmax, ymin, ymax, flist, dvar, psize, fname),
_fabs%(e), pwr_of_2(ns), qfft(flist), qift(glist), kg(glist),
flines(flist, nlw, ymax, [klim]), glines(glist, nlw, ymax, [klim]),
glines_eps(glist, nlw, fld, ymax, fname, [klim]),
flines_eps(flist, nlw, fld, ymax, fname, [klim]),
kgpoints(kglist, psize, ymax, [klim]),
kgpoints_eps(kglist, psize, ymax, fname, [klim]), kg_np(glist),
_sshort%(mysum), _lshort%(alist), short(expr), browse([v]), nonzero(alist),
absmax(alist), maglist(alist, numlist)]
values = [_small%]
arrays = []
facts() = []
myoptions = [maxima_userdir, maxima_tempdir, file_search_maxima,
fpprintprec,
fpprec]
labels = [%i4, %o3, %i3, %o2, %i2, %o1, %i1]
fpprec = 10 fpprintprec = 5
(%i5) mkill()$
----- clean start
(%i1) mstate()$
functions = [mstate(), mkill()]
values = []
arrays = []
facts() = []
myoptions = [maxima_userdir, maxima_tempdir, file_search_maxima,
fpprintprec,
fpprec]
labels = [%i1, %o0]
fpprec = 16 fpprintprec = 0
-----------------------------------