$dbgStringPlain
Get a string that represents the Struct or Struct collection, without the annotations ($tags).
Struct->$dbgStringPlain
Return Values
Returns a string that can be used for debugging.
Value |
Error Constant |
Meaning |
---|---|---|
-84
|
UACTERR_NO_OBJECT
|
Struct refers to zero Structs |
-1151
|
USTRUCTERR_NO_COMMON_CHARACTERISTICS
|
Collection of Structs that do not share a common parent or the specified characteristic |
-1157
|
USTRUCTERR_ILLEGAL_MEMBER_TYPE
|
Not a valid Struct member type |
Description
$dbgStringPlain is intended
for use during development, to visually represent and format the contents of a
struct
variable. It can be used to display the Struct as string, for example, in
the message frame. This function is also used in the Debugger.
The returned string shows only the nested structure of the Struct, without the $tags Structs. This makes it easier to use when annotations are not relevant.
In the returned string:
-
The name of the Struct is printed on the first line between square brackets, with proper indentation.
-
A Struct leaf is followed by an equal sign (
=
) and its value. -
String values are in double quotes.
-
All other data types (numeric/float, date, raw, and so on) are displayed without quotes
-
A node with no members and no value is considered to hold an empty string
Example: Uniface Component Struct
For example, given the following component structure:
And the following data:
The Struct function $dbgStringPlain returns a formatted string that represents the Struct:
[DATA_FRM] [NM_ENTITY.NM] [OCC] [FIELD1] = "Text can be bold or italic" [FIELD2] = "but not in all widgets."
- Named top-level Struct with name of component
- Named Struct node for entity
- Struct node for occurrence. The name is fixed
to
OCC
- Struct leaf for field
Version | Change |
---|---|
9.5.01 E101 | Introduced |