axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: clarification Re: [Axiom-developer] retrieving axiom commands


From: Bill Page
Subject: RE: clarification Re: [Axiom-developer] retrieving axiom commands
Date: Wed, 24 Jan 2007 10:32:53 -0500

On January 23, 2007 10:56 PM Arthur Ralfs
> 
> Bill Page wrote:
> > ....
> > In SPAD you can write something like this:
> >
> > --- File: CommandLine.spad ---
> > )abbrev package CL CommandLine
> > CommandLine(): Exports == Implementation where
> >   Exports ==> with
> >     current: () -> String
> >   Implementation ==> add
> >     current() ==
> >       -- if $currentLine is a list, command is last entry
> >       if list?(_$currentLine$Lisp)$SExpression then
> >         string last(_$currentLine$Lisp)$Lisp
> >       else
> >         string _$currentLine$Lisp
> >
> > --- end ---
> >
> > ...
> > Does that help?
> >
> Thank you, that's very helpful, although it turns out that 
> $internalHistoryTable  has the information I need, rather
> than $currentLine.
> 

Great.

Concerning $internalHistoryTable, I worry that this variable
might not always have the information that you need. Consider
the effect of the command:

(1) -> )history )file myhistory
   When the history facility is active, history information will be
      maintained in a file (and not in an internal table).

which is (more and less) described here:

http://wiki.axiom-developer.org/axiom--test--1/src/interp/IHistBoot

See also

  )history [ )on | )off ]

Of course, this depends on exactly what and when you want to do
what you want to do. :-)

Regards,
Bill Page.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]