base.TypeInfo.describe()

Display the type information and values of a program variable.

Syntax

Important: This feature is deprecated, its use is discouraged although not prohibited.
base.TypeInfo.describe(
      field { primitive-type
            | record-type
            | array-type
            | dictionary-type
            }
    )
  1. field is the program variable to convert to DOM.
  2. primitive-type is a primitive data type of Genero (INTEGER, DATE, VARCHAR)
  3. record-type is a RECORD ... END RECORD type.
  4. array-type is a DYNAMIC ARRAY OF ... or ARRAY[n] OF ... type.
  5. dictionary-type is a DICTIONARY OF ... type.

Usage

Use the base.TypeInfo.describe() class method to display the type definition and values of the program variable passed as argument. Type information and values are written to the stdout stream.

The method follows the same data formatting rules as base.TypeInfo.create().

Note: The base.TypeInfo.describe() method is deprecated. As replacement, use the base.TypeInfo.create() method to create an om.DomNode object, and produce the XML string with the om.DomNode.toString() method.

Example

MAIN
  DEFINE r RECORD
      key INTEGER,
      lastname CHAR(20),
      birthdate DATE,
      comment VARCHAR(200)
  END RECORD
  LET r.key = 234
  LET r.lastname = "Johnson"
  LET r.birthdate = MDY(12,24,1962)
  LET r.comment = "   "
  CALL base.TypeInfo.describe( r )
END MAIN
Output:
Field type is :
  RECORD (4 members)
    key:INTEGER
    lastname:CHAR(20)
    birthdate:DATE
    comment:VARCHAR(200)
Field type end.