mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
29 lines
476 B
C
29 lines
476 B
C
fn void test()
|
|
{
|
|
int x = 0;
|
|
if (x < 0) x++;
|
|
if (x <
|
|
0) x++;
|
|
if (x < 0
|
|
&& x < 0) x++;
|
|
|
|
|
|
if (x < 0) x++; // #error: if-statements with an 'else' must use '{ }' even around a single statement.
|
|
else { x++; };
|
|
|
|
if (x < 0)
|
|
{
|
|
x++;
|
|
}
|
|
else x++; // #error: An 'else' must use '{ }' even around a single statement.
|
|
|
|
if (x < 0)
|
|
{
|
|
x++;
|
|
}
|
|
else if (x > 0)
|
|
{
|
|
x++;
|
|
}
|
|
|
|
} |