[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clumsy patch for h = history (n)
From: |
Ben Abbott |
Subject: |
clumsy patch for h = history (n) |
Date: |
Wed, 19 Dec 2012 18:15:09 -0500 |
All,
Jordi has pushed a changesets that enable "history" to return a cell-string of
the history.
http://hg.savannah.gnu.org/hgweb/octave/rev/dbb7896f15c7
http://hg.savannah.gnu.org/hgweb/octave/rev/1eee8d8c59fd
These were in response to the feature request below.
https://savannah.gnu.org/bugs/index.php?37947
At present to return the last N commands a string representation of N must be
passed. For example,
last_10_commands = history ("10");
And passing a numeric value gives an error.
last_10_commands = history (10)
error: history: expecting all arguments to be strings
Fixing this "correctly" on the c++ side is a lot of work. A job I am not able
to do, and one Jordi doesn't have time for.
A work around is to use a simple, but clumsy, m-file wrapper for built-in ...
see the attached.
Does anyone have an opinion as to whether this should or should not be done?
Ben
history.m
Description: Binary data
- clumsy patch for h = history (n),
Ben Abbott <=