SetSegment (FUN)ΒΆ
FUNCTION SetSegment : IString
Initializes the passed IString instance and uses the specified memory area for this purpose
Example for a 80 byte IString instance:
abyMemory : ARRAY[0..79) OF BYTE;
myString : _UTF8String;
itfString : IString := SetSegment(myString, ADR(abyMemory), SIZEOF(abyMemory), 0);
- InOut:
Scope
Name
Type
Comment
Return
SetSegment
Input
itfString
String instance of an_UTF8String|
pbyMemory
POINTER TO BYTE
Pointer to the first byte of the memory.This address should aligned to a__XWORD
boundary!udiSize
UDINT
Size of the whole allocated memoryudiLength
UDINT
Length of the segment in bytesOutput
eErrorID