151 of 286
137 MemAddressU Type Function returning UnsignedInteger Invocation MemAddressU(var) Parameter Method Type Description var ByRef any variable The variable of which the address is desired. Discussion This function returns the UnsignedInteger representation of the RAM address of the specified variable. Note that for arrays, you may also specify subscript expressions for all of the array dimensions to yield the address of an individual array element. Without the subscript expressions, the resulting value will be the address of the first element of the array. This function is useful for deriving the address to pass to the several functions that require a RAM address, e.g. BitCopy(), RamPeek(), RamPoke(), etc. The DataAddress property may also be used to determine the address of a variable (except in BasicX compatibility mode). The type of the resulting value is UnsignedInteger. See the examples below. Examples Dim addr as UnsignedInteger Dim ba(1 to 20) as Byte Dim fval as Single addr = MemAddressU(fval) addr = MemAddressU(ba) addr = MemAddressU(ba(2)) addr = ba.DataAddress addr = ba.DataAddress(2) See Also MemAddress, VarPtr