ArrayStoreT Function (Array OfT, T, DWord) | |
Store an array to a buffer.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION ArrayStore<T>(
aSource AS ARRAY OF<T>,
Buff AS T*,
dwLen AS DWORD
)
AS DWORD
public static uint ArrayStore<T>(
Array Of<T> aSource,
T* Buff,
uint dwLen
)
Request Example
View SourceParameters
- aSource
- Type: Array OfT
The array to be stored to a buffer. - Buff
- Type: T*
A pointer to the buffer. - dwLen
- Type: DWord
The length of the buffer.
Type Parameters
- T
- The type of the array elements
Return Value
Type:
DWord
The number of bytes stored to the buffer.
Remarks
Stores the contents of an array into the buffer pointed by Buff. You should insure that the buffer is allocated and is large enough before writing to it.
Examples
This example writes an array's elemental values to a buffer.
A DIM array serves as the destination pointer:
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]
10 ? aDestination[2]
11 ? aDestination[3]
12 ? aDestination[4]
See Also