RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
254
innovators for industry
Ctrl Command copy_dst_src
Function
creates entries in the internal management table for an indexed character, text string or
subroutine with the specified index (
Dst
) by copying the table entries of another index
(
Src
).
Call
copy_dst_src( Dst, Src, Mode )
Parameters
Dst
Index (as an unsigned 32-bit value) of the indexed character, text string or
subroutine whose entries should be copied from
Src
;
allowed range: [0 … 1023] for indexed characters or subroutines,
[1024+0 … 1024+41] for indexed text strings
Src
Index (as an unsigned 32-bit value) of the indexed character, text string or
subroutine whose entries should be copied to
Dst
;
allowed range: [0 … 1023] for indexed characters or subroutines,
[1024+0 … 1024+41] for indexed text strings
Mode
This parameter (unsigned 32-bit value) determines which internal
management tables should be changed:
Bit #0 = 0: Dst is the index of an indexed character or text string.
= 1: Dst is the index of an indexed subroutine.
Bit #1 = 0: Src is the index of an indexed character or text string.
= 1: Src is the index of an indexed subroutine.
Bits #2-31: will not be evaluated.
Comments
• If an index value (
Dst
and/or
Src
) is invalid, then the command will be ignored
(
return code:
RTC5_PARAM_ERROR
).
•
copy_dst_src
creates an additional reference (index) to an indexed character, text string
or subroutine (that can also be called with this new index). The command only alters
the corresponding entry in the internal management table and does not modify the list
buffer’s memory contents. This allows copying, renumbering or converting between
indexed characters, text strings or subroutines without having to reload each time.
• A real copy of an indexed character, text string or subroutine in the protected buffer
area can be created (after the
copy_dst_src
command) with
Characters, text strings and/or subroutines with multiple references are thereby written
several times to the list memory. Keep this in mind in order to prevent unintended
buffer overflow of the protected buffer area.
• Also see
"Management of Indexed Characters and Text Strings", page 81
RTC
®
4
RTC
®
5 new command
References
,