Page 1 of 1

[NXC] __VA_ARGS__

Posted: 17 Jul 2011, 20:16
by muntoo
BREAKING NEWS

Tonight on NBC news:

Code: Select all

#define MyArrayBuild(_aout, ...) asm { arrbuild _aout, __VA_ARGS__ }

task main()
{
	int a[];
	int b[];
	
	ArrayInit(a, 42, 2) // Look ma, no semicolon!
	MyArrayBuild(b, 0, a, 1, a, 3, 4)
	
	// Display contents of b[]
	// For some reason, ArrayLen(b) == 0...
	for(unsigned int i = 0; i < 8 /* ArrayLen(b) */; ++i)
		NumOut(0, 56 - (8 * i), b[i]);
	
	Wait(2000);
}
Can John comment on this exciting new feature in NBC/NXC? Will he be able to shed some light on this mystery? What secrets will he unearth from his ancient knowledge of the Next Byte Code arts?

Over to you, John.