[↑]
SmileBASIC4 Replica Reference
RINGCOPY
Recognize array as ring buffer and copy data to it

RINGCOPY CopyDestinationArray,CopyDestinationOffset,CopySourceArray[[,CopySourceOffset],NumberOfCopyElements]
RINGCOPY CopyDestinationArray,CopyDestinationOffset,CopySourceArray[[,CopySourceOffset],NumberOfCopyElements] OUT Variable

・Similar to the COPY command, the value between arrays is copied, but even if the number of copy elements at the copy source is larger than the copy destination, the number of elements is not expanded and the data is copied by folding back to the beginning of the array.
・You can specify up to a 2D array for both the copy destination and copy source. When a 2D array is specified, it is handled as a multi-channel ring buffer (or data).
・If a 2D array is specified for both the copy destination and the copy source, the number of channels (number of elements in the first dimension) must be the same.
・When the copy destination is 2D and the copy source is a 1D array, the copy source data is copied to all channels of the copy destination in the same way.
・Operation is not guaranteed if the copy destination and copy source are the same array.

Arguments

CopyDestinationArray

Array treated as a copy destination ring buffer

CopyDestinationOffset

Copy start position at the copy destination

CopySourceArray

Copy source array

CopySourceOffset

Copy start position at the copy source

・0, if not specified.

NumberOfCopyElements

Number of elements to copy

・If not specified, it's the number of elements in the copy source array.

Return Value

End position of copied data

・When handled as a ring buffer, the returned value is the next copy destination offset.

About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|