[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Order of variables in "whos"

From: John W. Eaton
Subject: Order of variables in "whos"
Date: Mon, 4 May 1998 12:03:51 -0500 (CDT)

On  4-May-1998, (Ted Harding) <address@hidden> wrote:

| It seems that the order in which variables are listed by "whos" is
| independent of the order in which they are created, of the
| alphabetical order of their names, and of their array dimensions.
| Is it random, or is there some hidden regularity?

As someone said, the strange order is due to having the symbol table
information stored in a hash table.  I thought they were sorted (and I
think they were at one time) but either a change in the C++ string
class or a misunderstanding on my part broke the comparison function.
Please try the following patch.



Mon May  4 11:56:20 1998  John W. Eaton  <address@hidden>

        * (symbol_record_info_cmp): Use string::compare instead
        of string::operator==.

*** src/      Tue Apr  7 15:40:17 1998
--- src/       Mon May  4 11:56:44 1998
*** 1018,1024 ****
  static inline int
  symbol_record_info_cmp (symbol_record_info *a, symbol_record_info *b)
!   return (a->name () == b->name ());
  static int
--- 1018,1026 ----
  static inline int
  symbol_record_info_cmp (symbol_record_info *a, symbol_record_info *b)
!   string a_nm = a->name ();
!   string b_nm = b->name ();
!   return (b_nm);
  static int

reply via email to

[Prev in Thread] Current Thread [Next in Thread]