'whos' with incorrect fields

John W. Eaton jwe at bevo.che.wisc.edu
Wed Mar 12 12:56:14 CDT 2008


On 12-Mar-2008, David Bateman wrote:

| It is matlab compatible behavior. Does that make it correct? The
| printing of structure fields was deliberately added. See the thread
| 
| http://www.nabble.com/Evaluating-struct-fields-in-whos-to9236889.html#a9236889
| 
| which was added with this patch
| 
| 2004-07-23  Oyvind Kristiansen  <oyvinkri at stud.ntnu.no>
| 
|         * symtab.cc (symbol_record::subsymbols_list): New method.
|         (symbol_record::maybe_list): Call to subsymbols_list and merge
|         result with the original list of symbols.
| 
| This was also in the PROJECT file and removed prior to the 3.0 release. See
| 
| http://www.nabble.com/Cleaned-up-PROJECTS-file-to10639050.html#a10639050
| 
| I think the 3.0.0 behavior is useful and I'd like to see it in 3.1.x

You can get the same information by using a temporary variable, and
then the who{,s} functions don't have to include the extra complexity
of looking at argument names and calling eval on them.  For example

  tmp = A.a; whos tmp

Also, what information from something like "whos x.a{4}" is not
available in some other way?  For example

  size (x.a{4})    (same as Size in whos output)
  sizeof (x.a{4})  (same as Bytes in whos output)
  class (x.a{4})   (same as Class in whos output)

jwe


More information about the Bug-octave mailing list