Files
c3c/resources/testfragments/test.c3
2024-02-17 15:19:27 +01:00

18 lines
245 B
C

import std::io;
extern fn int printf(char* message, ...);
macro void @swap(&a, &b)
{
$typeof(*a) temp = *a;
*a = *b;
*b = temp;
}
fn void main()
{
int x = 1;
int y = 2;
@swap(x, y);
printf("x: %d y: %d\n", x, y);
}