EncodeRune2 (FUN)

FUNCTION EncodeRune2 : UDINT

Encodes a rune in memory segments, if it doesn’t fit in the first
segment than the second segment is used. The rune has to be valid,
otherwise nothing is returned. The function returns the number of
written bytes as well as the offset of the second memory segment.
InOut:

Scope

Name

Type

Comment

Return

EncodeRune2

UDINT

Input

diRune

RUNE

The rune to be encoded

pbyData

POINTER TO BYTE

Pointer to the first byte of the first segment

udiSize

UDINT

Size of the first segment in bytes

pbyData2

POINTER TO BYTE

Pointer to the first byte of the second segment

udiSize2

UDINT

Size of the second segment in bytes

Output

udiOffset

UDINT

Offset of the second segment needed bytes