Jump to content

Data descriptor

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Peter Flass (talk | contribs) at 22:32, 16 January 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing a data descriptor is a structure containing information that describes data.

Data descriptors may be used in compilers[1], as a software structure at run time in languages like Ada[2] or PL/I, or as a hardware structure in some computers such as Burroughs large systems.

Data descriptors are typically used at run-time to pass argument information to called subroutines. HP OpenVMS and Multics have system-wide language independent standards for argument descriptors[3].

Unlike a dope vector, a data descriptor does not contain address information.

Example

The following descriptor is used by IBM Enterprise PL/I to describe a character string[4]:

      +--------+--------+--------+--------+
      |  desc  | string |        | flags  |
      |  type  |  type  | (res)  |        |
      +--------+--------+--------+--------+
      |       maximum string length       |
      |                                   |
      +--------+--------+--------+--------+
 byte         0        1        2        3
  • 'desc type' is 2 to indicate that this is an element descriptor rather than an array or structure descriptor.
  • 'string type' indicates that this is a character or a bit string, with varying or nonvarying length. 2 indicates a nonvarying (fixed-length) character string.
  • '(res)' is a reserved byte not used for character strings.
  • 'flags' indicate the encoding of the string, EBCDIC or ASCII, and the encoding of the length of varying strings.
  • 'maximum string length' is the actual length of the string for nonvarying strings, or the maximum length for varying strings.

See also

References

  1. ^ Holt, Richard C (July, 1987). "Data descriptors: a compile-time model of data and addressing". ACM Transactions on Programming Languages and Systems (TOPLAS). 9 (3): 367โ€“389. doi:10.1145/24039.24051. {{cite journal}}: Check date values in: |date= (help)
  2. ^ Schonberg, Ed. "Ada Compared with C++". The Advantages of Ada 95. Retrieved January 15, 2013.
  3. ^ Hewlett-Packard. "Chapter 7 OpenVMS Argument Descriptors". HP OpenVMS Systems Documentation. Retrieved January 15, 2013.
  4. ^ IBM Corporation (2006). Enterprise PL/I for z/OSProgramming Guide (PDF). p. 385.