Mixed declarations and statements in C99

C99 enables you to mix declarations and statements within compound statements, like in C++. For example:

void foo(float i)
{
    i = (i > 0) ? -i : i;
    float j = sqrt(i);    // illegal in C90
}

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0472E
Non-ConfidentialID071611