base.TypeInfo.describe()
Display the type information and values of a program variable.
Syntax
Important: This feature is deprecated, and may be removed
in a future version.
base.TypeInfo.describe(
field { base-type
| record-type
| dynamic-array-type
| static-array-type
| dictionary-type
}
)
- field is the program variable to convert to DOM.
- base-type is a base data type of Genero (
INTEGER
,DATE
,VARCHAR
) - record-type is a
RECORD ... END RECORD
type. - dynamic-array-type is a
DYNAMIC ARRAY OF ...
type. - static-array-type is an
ARRAY[n] OF ...
type. - 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 is 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.