qc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_self
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Keyword:   _self
 
  Syntax:    _self
 
  Summary:   A base expression that names itself as a base.
 
  See also:  _based, _segment, _segname
 
     The _self keyword can be used to cast to a segment value, as in
     the example below:
 
          typedef struct tree TREE;
 
          struct tree
          {
             int name;
             TREE _based( (_segment)_self )*left;
             TREE _based( (_segment)_self )*right;
          };
 
          void main()
          {
             TREE _based( _segname( "MYSEGMENT" ) )t1;
          }
 
     Any based declarations that are based on _self must apply to
     pointers only. Ordinary data objects cannot be self-based.
 
     The example above declares a structure called tree and then
     declares t1 to be such a structure. The pointers within the
     structure are self-based, meaning that they will point within the
     segment in which the tree structure is located.
                                    -♦-