Swap Type.

Blitz3D Forums/Blitz3D Programming/Swap Type.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yeah, but...

Type col
	Field s$
End Type

red.col = New col
red\s$ = "I am red"

blue.col = New col
blue\s$ = "I am blue"

temp.col = red

red = blue
blue = temp

Print "'red' = " + red\s$

Print "'blue' = " + blue\s$

Print "'temp' = " + temp\s$

WaitKey()

End
See...It's still red. It's just that blue is now pointing to it! ;o)


YAN