'whos' with incorrect fields

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


On 12-Mar-2008, David Bateman wrote:

| David Bateman wrote:
| > John W. Eaton wrote:
| >   
| >> On 12-Mar-2008, G.. wrote:
| >>
| >> | 
| >> | Let
| >> | 
| >> | octave:1> A.a = B.b = 0 ;
| >> | octave:2> whos A.A B.b
| >> | error: structure has no member `A'
| >> | 
| >> | *** local user variables:
| >> | 
| >> |   Prot Name        Size                     Bytes  Class
| >> |   ==== ====        ====                     =====  ===== 
| >> |    rwd A.A         1x0                          0  cs-list
| >> |    rwd B.b        -1x-1                         0  unknown
| >> | 
| >> | Total is 1 element using 0 bytes
| >>
| >> Did you mean
| >>
| >>   whos A.a
| >>
| >> ?
| >>   
| >>     
| > I presume so.. However, that isn't the issue.. Octave should only return
| > an error above and not print out anything..
| >
| > D.
| >
| >
| >   
| Furthermore, in Octave 3.0.0 "whos A.a" prints the fields of the
| structure, whereas in 3.1.x it doesn't.. This appears to be an issue
| introduced with the new symbol table code.

I consider the new behavior to be correct.  The who and whos functions
look for symbol names.  A.a is not a symbol name so can't match an
entry in the symbol table.  Is this worth fixing in 3.0.x?  I guess I
would consider a patch.

jwe


More information about the Bug-octave mailing list