'whos' with incorrect fields

View: New views
10 Messages — Rating Filter:   Alert me  

'whos' with incorrect fields

by G.. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

But B.b should show up as

octave:3> whos B.b

*** local user variables:

  Prot Name        Size                     Bytes  Class
  ==== ====        ====                     =====  =====
   rwd B.b         1x1                          8  double

Total is 1 element using 8 bytes


G.

----------------------------------------------------------------------
GNU Octave Version 3.0.0
GNU Octave License: GNU General Public License
Operating System: Linux 2.4.18-nec3.4p1.045 #1 SMP Mon Apr 9 16:57:17 JST 2007 ia64
----------------------------------------------------------------------

'whos' with incorrect fields

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

?

jwe
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by G.. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 03/12/2008 05:12 PM, 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

No. I used A.A to create an error. My concern was B.b.

G.

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by David Bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.


--
David Bateman                                David.Bateman@...
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by David Bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

D.


--
David Bateman                                David.Bateman@...
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by David Bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton wrote:

> 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
>
>  
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@...>

        * 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

Regards
David


 

--
David Bateman                                David.Bateman@...
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>
|
|         * 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
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

Re: 'whos' with incorrect fields

by dbateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


John W. Eaton wrote:
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@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)
Yes the information is available by other means, but using whos was convenient.. I'll miss it, but seems you've made up your mind..

D.


Re: 'whos' with incorrect fields

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 12-Mar-2008, dbateman wrote:

| Yes the information is available by other means, but using whos was
| convenient.. I'll miss it, but seems you've made up your mind..

Not necessarily.  I checked in the following patch.

jwe



# HG changeset patch
# User John W. Eaton <jwe@...>
# Date 1205371027 14400
# Node ID 84122fb29c754281b397edf119de16fd79848943
# Parent  522433b05f45aa127364b8d60fb092eb5b1a6a96
whos: handle index expressions

diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,18 @@ 2008-03-12  John W. Eaton  <jwe@...
 2008-03-12  John W. Eaton  <jwe@...>
+
+ * variables.cc (Vwhos_line_format): Omit print_dims parameter.
+ Fix doc string in Vwhos_line_format DEVAR.
+ (symbol_record_name_compare): Delete unused function.
+ (whos_parameter::dimensions): Delete struct field.
+ (symbol_info_list): New class.
+ (dimensions_string_req_first_space, make_dimensions_string,
+ dimensions_string_req_total_space): Delete.
+ (parse_whos_line_format): Move functionality to new
+ symbol_info_list class.
+ (print_symbol_info_line): Move functionality to new
+ symbol_info_list::struct symbol_info::displaly_line method.
+ (do_who): Simplify with new symbol_info_list class.
+ Handle index expressions in addition to symbol names.
 
  * DLD-FUNCTIONS/dlmread.cc (Fdlmread): Fix separator detection.
 
diff --git a/src/variables.cc b/src/variables.cc
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -66,7 +66,7 @@ static int Vignore_function_time_stamp =
 
 // Defines layout for the whos/who -long command
 static std::string Vwhos_line_format
-  = "  %a:4; %ln:6; %cs:16:6:8:1;  %rb:12;  %lc:-1;\n";
+  = "  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\n";
 
 void
 clear_mex_functions (void)
@@ -1038,26 +1038,12 @@ set_internal_variable (std::string& var,
 }
 
 struct
-symbol_record_name_compare
-{
-  bool operator () (const symbol_table::symbol_record& a,
-    const symbol_table::symbol_record& b)
-  {
-    std::string a_nm = a.name ();
-    std::string b_nm = b.name ();
-
-    return a_nm.compare (b_nm);
-  }
-};
-
-struct
 whos_parameter
 {
   char command;
   char modifier;
   int parameter_length;
   int first_parameter_length;
-  int dimensions;
   int balance;
   std::string text;
   std::string line;
@@ -1148,475 +1134,498 @@ print_descriptor (std::ostream& os, std:
   os << param_buf.str ();
 }
 
-// Calculate how much space needs to be reserved for the first part of
-// the dimensions string.  For example,
-//
-//   mat is a 12x3 matrix
-//            ^^  => 2 columns
+class
+symbol_info_list
+{
+private:
+  struct symbol_info
+  {
+    symbol_info (const symbol_table::symbol_record& sr,
+ const std::string& expr_str = std::string (),
+ const octave_value& expr_val = octave_value ())
+      : name (expr_str.empty () ? sr.name () : expr_str),
+ is_automatic (sr.is_automatic ()),
+ is_formal (sr.is_formal ()),
+ is_global (sr.is_global ()),
+ is_persistent (sr.is_persistent ()),
+ varval (expr_val.is_undefined () ? sr.varval () : expr_val)
+    { }
 
-static int
-dimensions_string_req_first_space (const dim_vector& dims, int print_dims)
-{
-  int first_param_space = 0;
+    void display_line (std::ostream& os,
+       const std::list<whos_parameter>& params) const
+    {
+      dim_vector dims = varval.dims ();
+      std::string dims_str = dims.str ();
 
-  // Calculating dimensions.
+      std::list<whos_parameter>::const_iterator i = params.begin ();
 
-  std::string dim_str = "";
-  std::stringstream ss;
-  long dim = dims.length ();
+      while (i != params.end ())
+ {
+  whos_parameter param = *i;
 
-  first_param_space = (first_param_space >= 1 ? first_param_space : 1);
+  if (param.command != '\0')
+    {
+      // Do the actual printing.
 
-  // Preparing dimension string.
+      switch (param.modifier)
+ {
+ case 'l':
+  os << std::setiosflags (std::ios::left)
+     << std::setw (param.parameter_length);
+  break;
 
-  if ((dim <= print_dims || print_dims < 0) && print_dims != 0)
-    {
-      // Dimensions string must be printed like this: 2x3x4x2.
+ case 'r':
+  os << std::setiosflags (std::ios::right)
+     << std::setw (param.parameter_length);
+  break;
 
-      if (dim == 0 || dim == 1)
- first_param_space = 1; // First parameter is 1.
-      else
-        {
-  ss << dims (0);
-
-  dim_str = ss.str ();
-  first_param_space = dim_str.length ();
- }
-    }
-  else
-    {
-      // Printing dimension string as: a-D.
+ case 'c':
+  if (param.command == 's')
+    {
+      int front = param.first_parameter_length
+ - dims_str.find ('x');
+      int back = param.parameter_length
+ - dims_str.length ()
+ - front;
+      front = (front > 0) ? front : 0;
+      back = (back > 0) ? back : 0;
 
-      ss << dim;
-
-      dim_str = ss.str ();
-      first_param_space = dim_str.length ();
-    }
-
-  return first_param_space;
-}
-
-// Make the dimensions-string.  For example: mat is a 2x3 matrix.
-//                                                    ^^^
-//
-// FIXME -- why not just use the dim_vector::str () method?
-
-std::string
-make_dimensions_string (const dim_vector& dims, int print_dims)
-{
-  // Calculating dimensions.
-
-  std::string dim_str = "";
-  std::stringstream ss;
-  long dim = dims.length ();
-
-  // Preparing dimension string.
-
-  if ((dim <= print_dims || print_dims < 0) && print_dims != 0)
-    {
-      // Only printing the dimension string as: axbxc...
-
-      if (dim == 0)
- ss << "1x1";
-      else
-        {
-  for (int i = 0; i < dim; i++)
-    {
-      if (i == 0)
- {
-  if (dim == 1)
-    {
-      // Looks like this is not going to happen in
-      // Octave, but ...
-
-      ss << "1x" << dims (i);
+      os << std::setiosflags (std::ios::left)
+ << std::setw (front)
+ << ""
+ << std::resetiosflags (std::ios::left)
+ << dims_str
+ << std::setiosflags (std::ios::left)
+ << std::setw (back)
+ << ""
+ << std::resetiosflags (std::ios::left);
     }
   else
-    ss << dims (i);
+    {
+      os << std::setiosflags (std::ios::left)
+ << std::setw (param.parameter_length);
+    }
+  break;
+
+ default:
+  error ("whos_line_format: modifier `%c' unknown",
+ param.modifier);
+
+  os << std::setiosflags (std::ios::right)
+     << std::setw (param.parameter_length);
  }
-      else if (i < dim && dim != 1)
- ss << "x" << dims (i);
+
+      switch (param.command)
+ {
+ case 'a':
+  {
+    char tmp[5];
+
+    tmp[0] = (is_automatic ? 'a' : ' ');
+    tmp[1] = (is_formal ? 'f' : ' ');
+    tmp[2] = (is_global ? 'g' : ' ');
+    tmp[3] = (is_persistent ? 'p' : ' ');
+    tmp[4] = 0;
+
+    os << tmp;
+  }
+  break;
+
+ case 'b':
+  os << varval.byte_size ();
+  break;
+
+ case 'c':
+  os << varval.class_name ();
+  break;
+
+ case 'e':
+  os << varval.capacity ();
+  break;
+
+ case 'n':
+  os << name;
+  break;
+
+ case 's':
+  if (param.modifier != 'c')
+    os << dims_str;
+  break;
+
+ case 't':
+  os << varval.type_name ();
+  break;
+    
+ default:
+  error ("whos_line_format: command `%c' unknown",
+ param.command);
+ }
+
+      os << std::resetiosflags (std::ios::left)
+ << std::resetiosflags (std::ios::right);
+      i++;
+    }
+  else
+    {
+      os << param.text;
+      i++;
     }
  }
     }
-  else
-    {
-      // Printing dimension string as: a-D.
 
-      ss << dim << "-D";
-    }
+    std::string name;
+    bool is_automatic;
+    bool is_formal;
+    bool is_global;
+    bool is_persistent;
+    octave_value varval;
+  };
 
-  dim_str = ss.str ();
+public:
+  symbol_info_list (void) : lst () { }
 
-  return dim_str;
-}
+  symbol_info_list (const symbol_info_list& sil) : lst (sil.lst) { }
 
-// Calculate how much space needs to be reserved for the
-// dimensions string.  For example,
-//
-//   mat is a 12x3 matrix
-//            ^^^^ => 4 columns
-//
-// FIXME -- why not just use the dim_vector::str () method?
+  symbol_info_list& operator = (const symbol_info_list& sil)
+  {
+    if (this != &sil)
+      lst = sil.lst;
 
-static int
-dimensions_string_req_total_space (const dim_vector& dims, int print_dims)
-{
-  std::string dim_str = "";
-  std::stringstream ss;
+    return *this;
+  }
 
-  ss << make_dimensions_string (dims, print_dims);
-  dim_str = ss.str ();
+  ~symbol_info_list (void) { }
 
-  return dim_str.length ();
-}
+  void append (const symbol_table::symbol_record& sr)
+  {
+    lst.push_back (symbol_info (sr));
+  }
 
-static std::list<whos_parameter>
-parse_whos_line_format (const std::list<symbol_table::symbol_record>& symbols)
-{
-  // This method parses the string whos_line_format, and returns
-  // a parameter list, containing all information needed to print
-  // the given attributtes of the symbols
-  int idx;
-  size_t format_len = Vwhos_line_format.length ();
-  char garbage;
-  std::list<whos_parameter> params;
+  void append (const symbol_table::symbol_record& sr,
+       const std::string& expr_str,
+       const octave_value& expr_val)
+  {
+    lst.push_back (symbol_info (sr, expr_str, expr_val));
+  }
 
-  size_t bytes1;
-  int elements1;
+  size_t size (void) const { return lst.size (); }
 
-  std::string param_string = "abcenst";
-  Array<int> param_length (dim_vector (param_string.length (), 1));
-  Array<std::string> param_names (dim_vector (param_string.length (), 1));
-  size_t pos_a, pos_b, pos_c, pos_e, pos_n, pos_s, pos_t;
+  bool empty (void) const { return lst.empty (); }
 
-  pos_a = param_string.find ('a'); // Attributes
-  pos_b = param_string.find ('b'); // Bytes
-  pos_c = param_string.find ('c'); // Class
-  pos_e = param_string.find ('e'); // Elements
-  pos_n = param_string.find ('n'); // Name
-  pos_s = param_string.find ('s'); // Size
-  pos_t = param_string.find ('t'); // Type
+  Octave_map
+  map_value (const std::string& caller_function_name, int nesting_level) const
+  {
+    size_t len = lst.size ();
 
-  param_names(pos_a) = "Attr";
-  param_names(pos_b) = "Bytes";
-  param_names(pos_c) = "Class";
-  param_names(pos_e) = "Elements";
-  param_names(pos_n) = "Name";
-  param_names(pos_s) = "Size";
-  param_names(pos_t) = "Type";
+    Array<octave_value> name_info (len, 1);
+    Array<octave_value> size_info (len, 1);
+    Array<octave_value> bytes_info (len, 1);
+    Array<octave_value> class_info (len, 1);
+    Array<octave_value> global_info (len, 1);
+    Array<octave_value> sparse_info (len, 1);
+    Array<octave_value> complex_info (len, 1);
+    Array<octave_value> nesting_info (len, 1);
+    Array<octave_value> persistent_info (len, 1);
 
-  for (size_t i = 0; i < param_string.length (); i++)
-    param_length(i) = param_names(i) . length ();
+    std::list<symbol_info>::const_iterator p = lst.begin ();
 
-  // Calculating necessary spacing for name column,
-  // bytes column, elements column and class column
+    for (size_t j = 0; j < len; j++)
+      {
+ const symbol_info& si = *p++;
 
-  for (std::list<symbol_table::symbol_record>::const_iterator p = symbols.begin ();
-       p != symbols.end (); p++)
-    {
-      std::stringstream ss1, ss2;
-      std::string str;
+ Octave_map ni;
 
-      str = p->name ();
-      param_length(pos_n) = ((str.length ()
-      > static_cast<size_t> (param_length(pos_n)))
-     ? str.length () : param_length(pos_n));
+ ni.assign ("function", caller_function_name);
+ ni.assign ("level", nesting_level);
 
-      octave_value val = p->varval ();
+ name_info(j) = si.name;
+ global_info(j) = si.is_global;
+ persistent_info(j) = si.is_persistent;
 
-      str = val.type_name ();
-      param_length(pos_t) = ((str.length ()
-      > static_cast<size_t> (param_length(pos_t)))
-     ? str.length () : param_length(pos_t));
+ octave_value val = si.varval;
 
-      elements1 = val.capacity ();
-      ss1 << elements1;
-      str = ss1.str ();
-      param_length(pos_e) = ((str.length ()
-      > static_cast<size_t> (param_length(pos_e)))
-     ? str.length () : param_length(pos_e));
+ size_info(j) = val.size ();
+ bytes_info(j) = val.byte_size ();
+ class_info(j) = val.class_name ();
+ sparse_info(j) = val.is_sparse_type ();
+ complex_info(j) = val.is_complex_type ();
+ nesting_info(j) = ni;
+      }
 
-      bytes1 = val.byte_size ();
-      ss2 << bytes1;
-      str = ss2.str ();
-      param_length(pos_b) = ((str.length ()
-      > static_cast<size_t> (param_length(pos_b)))
-     ? str.length () : param_length (pos_b));
-    }
+    Octave_map info;
 
-  idx = 0;
-  while (static_cast<size_t> (idx) < format_len)
-    {
-      whos_parameter param;
-      param.command = '\0';
+    info.assign ("name", name_info);
+    info.assign ("size", size_info);
+    info.assign ("bytes", bytes_info);
+    info.assign ("class", class_info);
+    info.assign ("global", global_info);
+    info.assign ("sparse", sparse_info);
+    info.assign ("complex", complex_info);
+    info.assign ("nesting", nesting_info);
+    info.assign ("persistent", persistent_info);
 
-      if (Vwhos_line_format[idx] == '%')
-        {
-  bool error_encountered = false;
-  param.modifier = 'r';
-  param.parameter_length = 0;
-  param.dimensions = 8;
+    return info;
+  }
 
-  int a = 0, b = -1, c = 8, balance = 1;
-  unsigned int items;
-  size_t pos;
-  std::string cmd;
+  void display (std::ostream& os)
+  {
+    if (! lst.empty ())
+      {
+ size_t bytes = 0;
+ size_t elements = 0;
 
-  // Parse one command from whos_line_format
-  cmd = Vwhos_line_format.substr (idx, Vwhos_line_format.length ());
-  pos = cmd.find (';');
-  if (pos != NPOS)
-    cmd = cmd.substr (0, pos+1);
-  else
-    error ("parameter without ; in whos_line_format");
+ std::list<whos_parameter> params = parse_whos_line_format ();
 
-  idx += cmd.length ();
+ print_descriptor (os, params);
 
-  // FIXME -- use iostream functions instead of sscanf!
+ octave_stdout << "\n";
 
-  if (cmd.find_first_of ("crl") != 1)
-    items = sscanf (cmd.c_str (), "%c%c:%d:%d:%d:%d;",
-    &garbage, ¶m.command, &a, &b, &c, &balance);
-  else
-    items = sscanf (cmd.c_str (), "%c%c%c:%d:%d:%d:%d;",
-    &garbage, ¶m.modifier, ¶m.command,
-    &a, &b, &c, &balance) - 1;
-
-  if (items < 2)
-    {
-      error ("whos_line_format: parameter structure without command in whos_line_format");
-      error_encountered = true;
-    }
+ for (std::list<symbol_info>::const_iterator p = lst.begin ();
+     p != lst.end (); p++)
+  {
+    p->display_line (os, params);
 
-  // Insert data into parameter
-  param.first_parameter_length = 0;
-  pos = param_string.find (param.command);
-  if (pos != NPOS)
-    {
-      param.parameter_length = param_length(pos);
-      param.text = param_names(pos);
-      param.line.assign (param_names(pos).length (), '=');
+    octave_value val = p->varval;
 
-      param.parameter_length = (a > param.parameter_length
- ? a : param.parameter_length);
-      if (param.command == 's' && param.modifier == 'c' && b > 0)
- param.first_parameter_length = b;
-    }
-  else
-    {
-      error ("whos_line_format: '%c' is not a command",
-     param.command);
-      error_encountered = true;
-    }
+    elements += val.capacity ();
+    bytes += val.byte_size ();
+  }
 
-  if (param.command == 's')
-    {
-      // Have to calculate space needed for printing matrix dimensions
-      // Space needed for Size column is hard to determine in prior,
-      // because it depends on dimensions to be shown. That is why it is
-      // recalculated for each Size-command
-      int first, rest = 0, total;
-      param.dimensions = c;
-      first = param.first_parameter_length;
-      total = param.parameter_length;
+ os << "\nTotal is " << elements
+   << (elements == 1 ? " element" : " elements")
+   << " using " << bytes << (bytes == 1 ? " byte" : " bytes")
+   << "\n";
+      }
+  }
 
-      for (std::list<symbol_table::symbol_record>::const_iterator p = symbols.begin ();
-   p != symbols.end (); p++)
- {
-  octave_value val = p->varval ();
-  dim_vector dims = val.dims ();
-  int first1 = dimensions_string_req_first_space (dims, param.dimensions);
-  int total1 = dimensions_string_req_total_space (dims, param.dimensions);
-  int rest1 = total1 - first1;
-  rest = (rest1 > rest ? rest1 : rest);
-  first = (first1 > first ? first1 : first);
-  total = (total1 > total ? total1 : total);
- }
+  // Parse the string whos_line_format, and return a parameter list,
+  // containing all information needed to print the given
+  // attributtes of the symbols.
+  std::list<whos_parameter> parse_whos_line_format (void)
+  {
+    int idx;
+    size_t format_len = Vwhos_line_format.length ();
+    char garbage;
+    std::list<whos_parameter> params;
 
-      if (param.modifier == 'c')
-        {
-  if (first < balance)
-    first += balance - first;
-  if (rest + balance < param.parameter_length)
-    rest += param.parameter_length - rest - balance;
+    size_t bytes1;
+    int elements1;
 
-  param.parameter_length = first + rest;
-  param.first_parameter_length = first;
-  param.balance = balance;
- }
-      else
-        {
-  param.parameter_length = total;
-  param.first_parameter_length = 0;
- }
-    }
-  else if (param.modifier == 'c')
-    {
-      error ("whos_line_format: modifier 'c' not available for command '%c'",
-     param.command);
-      error_encountered = true;
-    }
+    std::string param_string = "abcenst";
+    Array<int> param_length (dim_vector (param_string.length (), 1));
+    Array<std::string> param_names (dim_vector (param_string.length (), 1));
+    size_t pos_a, pos_b, pos_c, pos_e, pos_n, pos_s, pos_t;
 
-  // What happens if whos_line_format contains negative numbers
-  // at param_length positions?
-  param.balance = (b < 0 ? 0 : param.balance);
-  param.first_parameter_length = (b < 0 ? 0 :
-  param.first_parameter_length);
-  param.parameter_length = (a < 0
-    ? 0
-    : (param.parameter_length
-       < param_length(pos_s)
-       ? param_length(pos_s)
-       : param.parameter_length));
+    pos_a = param_string.find ('a'); // Attributes
+    pos_b = param_string.find ('b'); // Bytes
+    pos_c = param_string.find ('c'); // Class
+    pos_e = param_string.find ('e'); // Elements
+    pos_n = param_string.find ('n'); // Name
+    pos_s = param_string.find ('s'); // Size
+    pos_t = param_string.find ('t'); // Type
 
-  // Parameter will not be pushed into parameter list if ...
-  if (! error_encountered)
+    param_names(pos_a) = "Attr";
+    param_names(pos_b) = "Bytes";
+    param_names(pos_c) = "Class";
+    param_names(pos_e) = "Elements";
+    param_names(pos_n) = "Name";
+    param_names(pos_s) = "Size";
+    param_names(pos_t) = "Type";
+
+    for (size_t i = 0; i < param_string.length (); i++)
+      param_length(i) = param_names(i) . length ();
+
+    // Calculating necessary spacing for name column,
+    // bytes column, elements column and class column
+
+    for (std::list<symbol_info>::const_iterator p = lst.begin ();
+ p != lst.end (); p++)
+      {
+ std::stringstream ss1, ss2;
+ std::string str;
+
+ str = p->name;
+ param_length(pos_n) = ((str.length ()
+ > static_cast<size_t> (param_length(pos_n)))
+       ? str.length () : param_length(pos_n));
+
+ octave_value val = p->varval;
+
+ str = val.type_name ();
+ param_length(pos_t) = ((str.length ()
+ > static_cast<size_t> (param_length(pos_t)))
+       ? str.length () : param_length(pos_t));
+
+ elements1 = val.capacity ();
+ ss1 << elements1;
+ str = ss1.str ();
+ param_length(pos_e) = ((str.length ()
+ > static_cast<size_t> (param_length(pos_e)))
+       ? str.length () : param_length(pos_e));
+
+ bytes1 = val.byte_size ();
+ ss2 << bytes1;
+ str = ss2.str ();
+ param_length(pos_b) = ((str.length ()
+ > static_cast<size_t> (param_length(pos_b)))
+       ? str.length () : param_length (pos_b));
+      }
+
+    idx = 0;
+    while (static_cast<size_t> (idx) < format_len)
+      {
+ whos_parameter param;
+ param.command = '\0';
+
+ if (Vwhos_line_format[idx] == '%')
+  {
+    bool error_encountered = false;
+    param.modifier = 'r';
+    param.parameter_length = 0;
+
+    int a = 0, b = -1, balance = 1;
+    unsigned int items;
+    size_t pos;
+    std::string cmd;
+
+    // Parse one command from whos_line_format
+    cmd = Vwhos_line_format.substr (idx, Vwhos_line_format.length ());
+    pos = cmd.find (';');
+    if (pos != NPOS)
+      cmd = cmd.substr (0, pos+1);
+    else
+      error ("parameter without ; in whos_line_format");
+
+    idx += cmd.length ();
+
+    // FIXME -- use iostream functions instead of sscanf!
+
+    if (cmd.find_first_of ("crl") != 1)
+      items = sscanf (cmd.c_str (), "%c%c:%d:%d:%d;",
+      &garbage, ¶m.command, &a, &b, &balance);
+    else
+      items = sscanf (cmd.c_str (), "%c%c%c:%d:%d:%d;",
+      &garbage, ¶m.modifier, ¶m.command,
+      &a, &b, &balance) - 1;
+
+    if (items < 2)
+      {
+ error ("whos_line_format: parameter structure without command in whos_line_format");
+ error_encountered = true;
+      }
+
+    // Insert data into parameter
+    param.first_parameter_length = 0;
+    pos = param_string.find (param.command);
+    if (pos != NPOS)
+      {
+ param.parameter_length = param_length(pos);
+ param.text = param_names(pos);
+ param.line.assign (param_names(pos).length (), '=');
+
+ param.parameter_length = (a > param.parameter_length
+  ? a : param.parameter_length);
+ if (param.command == 's' && param.modifier == 'c' && b > 0)
+  param.first_parameter_length = b;
+      }
+    else
+      {
+ error ("whos_line_format: '%c' is not a command",
+       param.command);
+ error_encountered = true;
+      }
+
+    if (param.command == 's')
+      {
+ // Have to calculate space needed for printing
+ // matrix dimensions Space needed for Size column is
+ // hard to determine in prior, because it depends on
+ // dimensions to be shown. That is why it is
+ // recalculated for each Size-command int first,
+ // rest = 0, total;
+ int rest = 0;
+ int first = param.first_parameter_length;
+ int total = param.parameter_length;
+
+ for (std::list<symbol_info>::const_iterator p = lst.begin ();
+     p != lst.end (); p++)
+  {
+    octave_value val = p->varval;
+    dim_vector dims = val.dims ();
+    std::string dims_str = dims.str ();
+    int first1 = dims_str.find ('x');
+    int total1 = dims_str.length ();
+    int rest1 = total1 - first1;
+    rest = (rest1 > rest ? rest1 : rest);
+    first = (first1 > first ? first1 : first);
+    total = (total1 > total ? total1 : total);
+  }
+
+ if (param.modifier == 'c')
+  {
+    if (first < balance)
+      first += balance - first;
+    if (rest + balance < param.parameter_length)
+      rest += param.parameter_length - rest - balance;
+
+    param.parameter_length = first + rest;
+    param.first_parameter_length = first;
+    param.balance = balance;
+  }
+ else
+  {
+    param.parameter_length = total;
+    param.first_parameter_length = 0;
+  }
+      }
+    else if (param.modifier == 'c')
+      {
+ error ("whos_line_format: modifier 'c' not available for command '%c'",
+       param.command);
+ error_encountered = true;
+      }
+
+    // What happens if whos_line_format contains negative numbers
+    // at param_length positions?
+    param.balance = (b < 0 ? 0 : param.balance);
+    param.first_parameter_length = (b < 0 ? 0 :
+    param.first_parameter_length);
+    param.parameter_length = (a < 0
+      ? 0
+      : (param.parameter_length
+ < param_length(pos_s)
+ ? param_length(pos_s)
+ : param.parameter_length));
+
+    // Parameter will not be pushed into parameter list if ...
+    if (! error_encountered)
+      params.push_back (param);
+  }
+ else
+  {
+    // Text string, to be printed as it is ...
+    std::string text;
+    size_t pos;
+    text = Vwhos_line_format.substr (idx, Vwhos_line_format.length ());
+    pos = text.find ('%');
+    if (pos != NPOS)
+      text = text.substr (0, pos);
+
+    // Push parameter into list ...
+    idx += text.length ();
+    param.text=text;
+    param.line.assign (text.length(), ' ');
     params.push_back (param);
- }
-      else
-        {
-  // Text string, to be printed as it is ...
-  std::string text;
-  size_t pos;
-  text = Vwhos_line_format.substr (idx, Vwhos_line_format.length ());
-  pos = text.find ('%');
-  if (pos != NPOS)
-    text = text.substr (0, pos);
+  }
+      }
 
-  // Push parameter into list ...
-  idx += text.length ();
-  param.text=text;
-  param.line.assign (text.length(), ' ');
-  params.push_back (param);
- }
-    }
+    return params;
+  }
 
-  return params;
-}
+private:
+  std::list<symbol_info> lst;
 
-void
-print_symbol_info_line (std::ostream& os,
- const symbol_table::symbol_record& sr,
- std::list<whos_parameter>& params)
-{
-  octave_value val = sr.varval ();
-  dim_vector dims = val.dims ();
-
-  std::list<whos_parameter>::iterator i = params.begin ();
-
-  while (i != params.end ())
-    {
-      whos_parameter param = *i;
-
-      if (param.command != '\0')
-        {
-  // Do the actual printing.
-
-  switch (param.modifier)
-    {
-    case 'l':
-      os << std::setiosflags (std::ios::left)
- << std::setw (param.parameter_length);
-      break;
-
-    case 'r':
-      os << std::setiosflags (std::ios::right)
- << std::setw (param.parameter_length);
-      break;
-
-    case 'c':
-      if (param.command == 's')
-        {
-  int front = param.first_parameter_length
-    - dimensions_string_req_first_space (dims, param.dimensions);
-  int back = param.parameter_length
-    - dimensions_string_req_total_space (dims, param.dimensions)
-    - front;
-  front = (front > 0) ? front : 0;
-  back = (back > 0) ? back : 0;
-
-  os << std::setiosflags (std::ios::left)
-     << std::setw (front)
-     << ""
-     << std::resetiosflags (std::ios::left)
-     << make_dimensions_string (dims, param.dimensions)
-     << std::setiosflags (std::ios::left)
-     << std::setw (back)
-     << ""
-     << std::resetiosflags (std::ios::left);
- }
-      else
-        {
-  os << std::setiosflags (std::ios::left)
-     << std::setw (param.parameter_length);
- }
-      break;
-
-    default:
-      error ("whos_line_format: modifier `%c' unknown",
-     param.modifier);
-
-      os << std::setiosflags (std::ios::right)
- << std::setw (param.parameter_length);
-    }
-
-  switch (param.command)
-    {
-    case 'a':
-      {
- char tmp[5];
-
- tmp[0] = (sr.is_automatic () ? 'a' : ' ');
- tmp[1] = (sr.is_formal () ? 'f' : ' ');
- tmp[2] = (sr.is_global () ? 'g' : ' ');
- tmp[3] = (sr.is_persistent () ? 'p' : ' ');
- tmp[4] = 0;
-
- os << tmp;
-      }
-      break;
-
-    case 'b':
-      os << val.byte_size ();
-      break;
-
-    case 'c':
-      os << val.class_name ();
-      break;
-
-    case 'e':
-      os << val.capacity ();
-      break;
-
-    case 'n':
-      os << sr.name ();
-      break;
-
-    case 's':
-      if (param.modifier != 'c')
- os << make_dimensions_string (dims, param.dimensions);
-      break;
-
-    case 't':
-      os << val.type_name ();
-      break;
-    
-    default:
-      error ("whos_line_format: command `%c' unknown", param.command);
-    }
-
-  os << std::resetiosflags (std::ios::left)
-     << std::resetiosflags (std::ios::right);
-  i++;
-        }
-      else
- {
-  os << param.text;
-  i++;
- }
-    }
-}
+};
 
 static octave_value
 do_who (int argc, const string_vector& argv, bool return_list,
@@ -1648,102 +1657,95 @@ do_who (int argc, const string_vector& a
     }
 
   int npats = argc - i;
-  string_vector pats (npats > 0 ? npats : 1);
+  string_vector pats;
   if (npats > 0)
     {
+      pats.resize (npats);
       for (int j = 0; j < npats; j++)
  pats[j] = argv[i+j];
     }
   else
-    pats[0] = "*";
+    {
+      pats.resize (++npats);
+      pats[0] = "*";
+    }
     
   symbol_table::scope_id scope = global_only
     ? symbol_table::global_scope () : symbol_table::current_scope ();
 
-  std::list<symbol_table::symbol_record> symbols
-    = symbol_table::glob_variables (pats, scope);
+  symbol_info_list symbol_stats;
+  std::list<std::string> symbol_names;
 
-  size_t symbols_len = symbols.size ();
+  for (int j = 0; j < npats; j++)
+    {
+      std::string pat = pats[j];
+
+      size_t pos = pat.find_first_of (".({");
+
+      if (pos != NPOS && pos > 0)
+        {
+  if (verbose)
+    {
+      // NOTE: we can only display information for
+      // expressions based on global values if the variable is
+      // global in the current scope because we currently have
+      // no way of looking up the base value in the global
+      // scope and then evaluating the arguments in the
+      // current scope.
+
+      std::string base_name = pat.substr (0, pos);
+
+      if (symbol_table::is_variable (base_name))
+ {
+  symbol_table::symbol_record sr
+    = symbol_table::find_symbol (base_name);
+
+  if (! global_only || sr.is_global ())
+    {
+      int parse_status;
+
+      octave_value expr_val
+ = eval_string (pat, true, parse_status);
+
+      if (! error_state)
+ symbol_stats.append (sr, pat, expr_val);
+      else
+ return retval;
+    }
+ }
+    }
+ }
+      else
+ {
+  std::list<symbol_table::symbol_record> tmp
+    = symbol_table::glob_variables (pats[j], scope);
+
+  for (std::list<symbol_table::symbol_record>::const_iterator p = tmp.begin ();
+       p != tmp.end (); p++)
+    {
+      if (verbose)
+ symbol_stats.append (*p);
+      else
+ symbol_names.push_back (p->name ());
+    }
+ }
+    }
 
   if (return_list)
     {
       if (verbose)
  {
-  Array<octave_value> name_info (symbols_len, 1);
-  Array<octave_value> size_info (symbols_len, 1);
-  Array<octave_value> bytes_info (symbols_len, 1);
-  Array<octave_value> class_info (symbols_len, 1);
-  Array<octave_value> global_info (symbols_len, 1);
-  Array<octave_value> sparse_info (symbols_len, 1);
-  Array<octave_value> complex_info (symbols_len, 1);
-  Array<octave_value> nesting_info (symbols_len, 1);
+  std::string caller_function_name;
+  octave_function *caller = octave_call_stack::caller ();
+  if (caller)
+    caller_function_name = caller->name ();
 
-  std::list<symbol_table::symbol_record>::const_iterator p
-    = symbols.begin ();
-
-  for (size_t j = 0; j < symbols_len; j++)
-    {
-      const symbol_table::symbol_record& sr = *p++;
-
-      Octave_map ni;
-
-      std::string caller_function_name;
-
-      octave_function *caller = octave_call_stack::caller ();
-      if (caller)
- caller_function_name = caller->name ();
-
-      ni.assign ("function", caller_function_name);
-      ni.assign ("level", 1);
-
-      name_info(j) = sr.name ();
-      global_info(j) = sr.is_global ();
-
-      octave_value val = sr.varval ();
-
-      size_info(j) = val.size ();
-      bytes_info(j) = val.byte_size ();
-      class_info(j) = val.class_name ();
-      sparse_info(j) = val.is_sparse_type ();
-      complex_info(j) = val.is_complex_type ();
-      nesting_info(j) = ni;
-    }
-
-  Octave_map info;
-
-  info.assign ("name", name_info);
-  info.assign ("size", size_info);
-  info.assign ("bytes", bytes_info);
-  info.assign ("class", class_info);
-  info.assign ("global", global_info);
-  info.assign ("sparse", sparse_info);
-  info.assign ("complex", complex_info);
-  info.assign ("nesting", nesting_info);
-
-  retval = info;
+  retval = symbol_stats.map_value (caller_function_name, 1);
  }
       else
- {
-  string_vector names;
-
-  if (symbols_len > 0)
-    {
-      names.resize (symbols_len);
-
-      std::list<symbol_table::symbol_record>::const_iterator p
- = symbols.begin ();
-
-      for (size_t j = 0; j < symbols_len; j++)
- {
-  names[j] = p->name ();
-  p++;
- }
-    }
-
-  retval = Cell (names);
- }
+ retval = Cell (string_vector (symbol_names));
     }
-  else if (symbols_len > 0)
+  else if (! (symbol_stats.empty () && symbol_names.empty ()))
     {
       if (global_only)
  octave_stdout << "Global variables:\n\n";
@@ -1751,44 +1753,10 @@ do_who (int argc, const string_vector& a
  octave_stdout << "Variables in the current scope:\n\n";
 
       if (verbose)
- {
-  size_t bytes = 0;
-  size_t elements = 0;
-
-  std::list<whos_parameter> params;
-
-  params = parse_whos_line_format (symbols);
-
-  print_descriptor (octave_stdout, params);
-
-  octave_stdout << "\n";
-
-  for (std::list<symbol_table::symbol_record>::const_iterator p = symbols.begin ();
-       p != symbols.end (); p++)
-    {
-      print_symbol_info_line (octave_stdout, *p, params);
-      octave_value val = p->varval ();
-      elements += val.capacity ();
-      bytes += val.byte_size ();
-    }
-
-  octave_stdout << "\nTotal is " << elements
- << (elements == 1 ? " element" : " elements")
- << " using " << bytes
- << (bytes == 1 ? " byte" : " bytes") << "\n";
- }
+ symbol_stats.display (octave_stdout);
       else
  {
-  string_vector names (symbols_len);
-
-  std::list<symbol_table::symbol_record>::const_iterator p
-    = symbols.begin ();
-
-  for (size_t j = 0; j < symbols_len; j++)
-    {
-      names[j] = p->name ();
-      p++;
-    }
+  string_vector names (symbol_names);
 
   names.list_in_columns (octave_stdout);
  }
@@ -2468,21 +2436,17 @@ A command is composed like this:\n\
 A command is composed like this:\n\
 \n\
 @example\n\
-%[modifier]<command>[:size_of_parameter[:center-specific[\n\
-       :print_dims[:balance]]]];\n\
+%[modifier]<command>[:size_of_parameter[:center-specific[:balance]]];\n\
 @end example\n\
 \n\
 Command and modifier is already explained. Size_of_parameter\n\
 tells how many columns the parameter will need for printing.\n\
-print_dims tells how many dimensions to print. If number of\n\
-dimensions exceeds print_dims, dimensions will be printed like\n\
-x-D.\n\
-center-specific and print_dims may only be applied to command\n\
-%s. A negative value for print_dims will cause Octave to print all\n\
-dimensions whatsoever.\n\
-balance specifies the offset for printing of the dimensions string.\n\
+The @code{center-specific} parameter may only be applied to command\n\
+@samp{%s}.\n\
+The @code{balance} parameter specifies the offset for printing\n\
+the dimensions string.\n\
 \n\
-The default format is \"  %a:4; %ln:6; %cs:16:6:8:1;  %rb:12;  %lc:-1;\\n\".\n\
+The default format is \"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\\n\".\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (whos_line_format);

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave