[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Initialization of Local Arrays and Structures

When the gcc_extensions pragma is on, CodeWarrior C allows the initialization of local arrays and structs with non-constant values (Listing 3.7)

GNU C extension for initializing arrays and structs:
void myFunc( int i, double x )
{
  int arr[2] = { i, i + 1 };
  struct myStruct = { i, x }; 
}


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000