◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────C/C++ Language───────────────────────────────────────────────────────── Keyword: __based Syntax: type __based( base ) declarator Summary: Specifies that a pointer is a 16-bit value interpreted as an offset from <base>; or that a data object resides in the segment given by <base>; or that a function resides in the segment given by <base>. For the 32-bit compiler, specifies that a pointer is a 32-bit offset from a 32-bit pointer base. The __based keyword supersedes the alloc_text pragma for specifying the location of a function. The alloc_text pragma is still supported for compatibility reasons. See also: _bfreeseg, _bheapseg, _bmalloc, __far, __huge, __near, __segment, __segname, __self ◄Memory models► Based pointers can address any location in memory but are only two bytes in size because they contain only the offset portion of an address. The segment portion of the address is stored separately and is combined with the offset when needed. Multiple based pointers can share the same segment value, so they require less memory than far pointers. See: ◄Pointers Based on a Fixed Segment► ◄Pointers Based on a Nonfixed Segment► ◄Pointers Based on the __self Keyword► ◄Pointers Based on Void► You also can use the __based keyword to specify the segment in which data or functions reside. See: ◄Data Based in a Segment► ◄Functions Based in a Segment► -♦-