点击或拖拽改变大小

ArrayStore Function (Array, Usual, DWord)

X#
将数组存储到缓冲区。

命名空间:  XSharp.RT
程序集:  XSharp.RT (在 XSharp.RT.dll 中) 版本:2.24 GA
Syntax
 FUNCTION ArrayStore(
	aSource AS ARRAY,
	Buff AS USUAL*,
	dwLen AS DWORD
) AS DWORD
Request Example 查看代码

Parameters

aSource
类型:Array
要存储到缓冲区的数组。
Buff
类型:Usual*
指向缓冲区的指针。
dwLen
类型:DWord
缓冲区的长度。

Return Value

类型:DWord
存储到缓冲区的字节数。
备注
将数组的内容存储到由 Buff 指向的缓冲区中。在写入之前,您应确保缓冲区已分配且足够大。
Examples
此示例将数组的元素值写入缓冲区。
一个 DIM 数组作为目标指针:
X#
 1FUNCTION Start()
 2    LOCAL DIM aDestination[4] AS USUAL
 3    LOCAL aList[4]
 4    ArrayPut(aList, 1, 1)
 5    ArrayPut(aList, 2, 3)
 6    ArrayPut(aList, 3, 5)
 7    ArrayPut(aList, 4, 7)
 8    ArrayStore(aList, @aDestination, 4*6)
 9    ? aDestination[1]        // Result: 1
10    ? aDestination[2]        // Result: 3
11    ? aDestination[3]        // Result: 5
12    ? aDestination[4]        // Result: 7
See Also