All pastes #225914 Raw Edit

This smells of aweso

public text v1 · immutable
#225914 ·published 2006-10-28 06:21 UTC
rendered paste body
Type YourTypeAnyway
	`your normal crap...
	`blah blah blah
	`
	Children(256) as integer
	Owner as integer
EndType


Dim BigFuckingArray(1280) As YourTypeAnyway


` example:
` we shall make #4 the child of #1

For i = 1 to 256
	if BigFuckingArray(1).Children(i) = 0
		` yay! this one's free ^_^
		found=1:exit
	endif
Next i

if found <> 1 then end

` found = 1, we have a free entry..

BigFuckingArray(1).Children(i) = 4
BigFuckingArray(4).Owner = 1