Functions and returns

Blitz3D Forums/Blitz3D Programming/Functions and returns

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.

Type Vector
	Field x
	Field y
	Field z
End Type


You can't copy a type directly since it simply reassigns the address of the types, and doesn't copy the data.

but you could create a function to copy your type

i.e.
Function CopyVector.Vector(Source.Vector)
Local temp.Vector = New Vector

temp\x = Source\x
temp\y = Source\y
temp\z = Source\z

Return temp

End Function