ArrayPutT Function (Array OfT, DWord, T) | |
Write a value to an array element.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION ArrayPut<T>(
aTarget AS ARRAY OF<T>,
dwElement AS DWORD,
uValue AS T
)
AS T
public static T ArrayPut<T>(
Array Of<T> aTarget,
uint dwElement,
T uValue
)
Request Example
View SourceParameters
- aTarget
- Type: Array OfT
The array to write to. - dwElement
- Type: DWord
The number of the array element to receive the value. - uValue
- Type: T
The value to write to the array element.
Type Parameters
- T
- The type of the array elements
Return Value
Type:
T
The value assigned.
Remarks
ArrayPut() writes values to specified array elements.
If a value is already there, it is overwritten.
Examples
This example writes values to array elements:
1FUNCTION Start()
2 LOCAL aStates[2]
3 ArrayPut(aStates, 1, "Montana")
4 ArrayPut(aStates, 2, "Wyoming")
5
6 aStates[1] := "Montana"
7 aStates[2] := "Wyoming"
See Also