address := NumPut(object, VarOrAddress [, Offset = 0, Type = "UInt"])
value := NumGet(VarOrAddress [, Offset = 0, Type = "UInt"])
| address | the address to the right of the item just written. |
| object | the value to store |
| type | For Type, specify UInt, Int, Int64, Short, UShort, Char, UChar, Double, or Float, or a the number of bytes in your type. (named types enclosed in parentheses) for details see DllCall Types. If an integer is too large to fit in the specified Type, its most significant bytes are ignored; e.g. NumPut(257, var, 0, "Char") would store the number 1. For arbitrary sizes, use a size that is not already included in the named types |
| VarOrAddress | For VarOrAddress, passing MyVar is equivalent to passing &MyVar. However, omitting the "&" performs better and ensures that the target address is valid (invalid addresses return ""). By contrast, anything other than a naked variable passed to VarOrAddress is treated as a raw address; consequently, specifying MyVar+0 forces the number in MyVar to be used instead of the address of MyVar itself. |
varsetcapacity(a, 10000, 0)
a = a
element = element%A_Index%
numput("element0", a, 0, 10)
loop, 10
{
element = element%A_Index%
numput(element, a, 10 * A_Index, 10)
}
msgbox % a
loop, 10
{
ListVars
msgbox % el := numget(a, 10 * A_Index, 10)
}
return