Function EN Version 12.11

@GetHexDump

System

Syntax

@GetHexDump(VAR);
@GetHexDump(VAR;FNOPTIONS1);
@GetHexDump(VAR;FNOPTIONS1;TEXTRETTYPE2);

Description

@GetHexDump returns the content of the variable VAR as a hex dump.
VAR may be of any type, except HUGE data types*.

*HUGE data types (see @GetDataType):
VHUGEHUGEITEM      HI
VHUGERTCOMPONENTS      RC
VHUGEHUGERT         HR
VHUGEVIEWMAPLAYOUT   VML
VHUGEVIEWFORMAT      VF
VHUGEVIEWMAPDATATYP   VMD
VHUGEIDLIST         IL
VHUGEUNIDLIST      HUL
VHUGETEXTLIST      HTL
VHUGEIIDLIST      IIL
VHUGERFC822         HRF8
VHUGEMIMEPART      HMP

FN FNOPTIONS1:
Option      Hex   Dec   Comment
HEXDUMP_OPT_ADDRESS   0001*   00001*   Outputs the relative address before the hex values in each line.
HEXDUMP_OPT_ASCII   0002*   00002*   Outputs the displayable characters after the hex values in each line.
HEXDUMP_OPT_STREAM   0004   00004   Stream mode. In stream mode, the hex values are not output line by line, but all consecutively. Options 1 & 2 are ignored in stream mode!
HEXDUMP_OPT_STREAM_COMPRESS   0008   00008   This stream-mode option (not available in line-by-line mode) omits the spaces between the hex values.
*=default
Bit vector; to combine several options, add the values.

TEXT TEXTRETTYPE2:
A = TEXT
B = BINBUFFER (default)

Return:
A handle to the allocated binary buffer of data type BINBUFFER, a TEXT or @Error.
If a BINBUFFER is returned, the current position in this BINBUFFER is after the actual output text.
The BINBUFFER is generally allocated a few bytes larger than the actual text would require.

Example: @GetHexDump(VAR)

Var:="123456789012345678";
HexDumpBinBuffer:=@GetHexDump(Var);
HexDumpBinBuffer:=@DestroyBuffer(HexDumpBinBuffer);

The TEXT variable Var is output as a dump into a BINBUFFER HexDumpBinBuffer.
The BINBUFFER is then released again.

Example: @GetHexDump(VAR;FNOPTIONS1)

Var:="123456789012345678";
Options:=4;
HexDumpBinBuffer:=@GetHexDump(Var;Options);
@LogReport(HexDumpBinBuffer;3);
HexDumpBinBuffer:=@DestroyBuffer(HexDumpBinBuffer);

The TEXT variable Var is output as a stream dump into a BINBUFFER HexDumpBinBuffer.
The content of the BINBUFFER HexDumpBinBuffer is output to the APILOG and then the BINBUFFER HexDumpBinBuffer is released again.

Example output in the APILOG:
Buffer:000002A59E1C242C Position:00000035 AllocSize:86 UsedSize:53
   00000000 33 31 20 33 32 20 33 33 20 33 34 20 33 35 20 33 36 20 33 37 31 32 33 34 35 36 37
   00000014 20 33 38 20 33 39 20 33 30 20 33 31 20 33 32 20 33 33 20 33 38 39 30 31 32 33 3
   00000028 34 20 33 35 20 33 36 20 33 37 20 33 38 4 35 36 37 38

Example: @GetHexDump(VAR;FNOPTIONS1;TEXTRETTYPE2)

Var:="123456789012345678";
Options:=12;
RetType:="A";
RetHexText:=@GetHexDump(Var;Options;RetType);
@LogReport(RetHexText;3);

The TEXT variable Var is assigned as a stream dump without spaces to the TEXT variable RetHexText.
The TEXT RetHexText is output in the APILOG.

Example output in the APILOG:
313233343536373839303132333435363738

Note : This text was machine-translated and may contain inaccuracies.