Get address of label?

Heywood Floyd soul8o8 at gmail.com
Sat Dec 25 10:13:05 PST 2010


Is this possible somehow:

	int op(int r, int i)
	{
		static auto tbl = [&add, &sub, &mul];
		goto tbl[i % 3];
	
		add:
			r++;
			goto end;
		sub:
			r--;
			goto end;
		mul:
			r*=r;
			goto end;
		end:
		return r;
	}

Happy holidays!
BR
/HF




More information about the Digitalmars-d-learn mailing list