Xojo WTF

Strings are also a bit weird

dim a as string = "Alpha"
dim b as string = a
b = "Beta"
log "a=" + a + " b=" + b
// a=Alpha b=Beta

Strings are immutable and assignment creates a new String.

Compare this to Arrays, in which 2 array variables can point to the same object:

dim a(0) as string
a(0) = "Alpha"
dim b() as string = a
b(0) = "Beta"
log "a(0)=" + a(0) + " b(0)=" + b(0)
//a(0)=Beta b(0)=Beta