«

»

Mar 23

Print this Post

Anternating Colors Function (altColor)

Each time the function is called alternates between returning the two values.
Useful for alternating colors in a table.

strColor = 0
function altColor(strColor0,strColor1)
	if strColor = 0 then
		altColor = strColor0
		strColor = 1
	else
		altColor = strColor1
		strColor = 0
	end if
end function

Permanent link to this article: https://www.wperry.net/code/altcolor/

Leave a Reply

Your email address will not be published. Required fields are marked *