mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Updated TODO
This commit is contained in:
committed by
Christoffer Lerno
parent
eabef8f468
commit
9bf89574f9
@@ -517,11 +517,52 @@ func void testDefault(int x = 2, int y = 100, int z = -100)
|
||||
{
|
||||
printf("x = %d, y = %d, z = %d\n", x, y, z);
|
||||
}
|
||||
|
||||
func int testReturnDefer()
|
||||
{
|
||||
int i = 0;
|
||||
i++;
|
||||
defer ++i;
|
||||
return i;
|
||||
}
|
||||
|
||||
func void testDefer()
|
||||
{
|
||||
printf("1 == %d\n", testReturnDefer());
|
||||
printf("1");
|
||||
defer printf("8\n");
|
||||
printf("2");
|
||||
{
|
||||
printf("3");
|
||||
defer printf("5");
|
||||
printf("4");
|
||||
}
|
||||
int i = 0;
|
||||
goto JUMP;
|
||||
defer printf("ERROR");
|
||||
int r = 0;
|
||||
JUMP:
|
||||
defer printf("-JUMPDEFER-");
|
||||
if (i++ < 2) goto JUMP;
|
||||
switch (int boo = 2)
|
||||
{
|
||||
case 0:
|
||||
printf("\n0\n");
|
||||
case 2:
|
||||
defer printf("*CaseDefer*");
|
||||
printf("-Case2-");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
defer printf("7");
|
||||
printf("6");
|
||||
}
|
||||
func int main(int x)
|
||||
{
|
||||
printf("Helo!\n");
|
||||
testDefault(y = 99);
|
||||
testPointers(2, 3);
|
||||
testDefer();
|
||||
int efd = 9;
|
||||
uint fefoek = 1;
|
||||
printf("Helo: %d\n", efd + cast(fefoek, int));
|
||||
|
||||
Reference in New Issue
Block a user