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.




_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to