Functions with variable-length argument lists

BlitzMax Forums/BlitzMax Programming/Functions with variable-length argument lists

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.

or create a function with multiple default arguments:

function test(x:Int = null , y:Int = null , z:Int = null , t:Int = null)
	if X <> null print X
	if Y <> null print Y
	if Z <> null print Z
	if t <> null print t
end function

test(1)
test(1 , 2)
test(1 , 2 , 3)
test(1,2,3,4)


Not ideal of course