Page 310 of 346 Start Back Next End ZBasic System Library 298 ZBasic Microcontrollers StrAddress Type Function returning UnsignedInteger Invocation StrAddress(str) Parameter Method Type Description str ByVal String The string variable whose string address is desired. Discussion This function returns the memory address of the first character of a string stored in a string variable. Note that for dynamically allocated strings, the string address will be zero if the string is empty. Note also that the returned address may refer to RAM, Program Memory or Persistent memory. The function StrType() can be used to determine which address space contains the string’s characters. For statically allocated strings, the string address will always be non-zero even if the string is empty. See the section on Strings in the ZBasic Reference Manual for more details about dynamically vs. statically allocated strings. Example Dim str as String Dim addr as UnsignedInteger Dim b as Byte str = "Hello, world!" addr = StrAddress(str) b = RamPeek(addr) ' result will be 72, the letter H Compatibility This function is not available in BasicX compatibility mode. See Also StrType