[futurebasic] C array garbage value

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2017 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Sat, 11 Feb 2017 12:08:04 -0500
BeginCFunction
void MyFunction1( int count ) {
    int dim[count];
   memset( dim, 0, sizeof(dim) );
    for ( int d = 0; d < count; d++ ) {
        dim[d] = 15;
    }
    int d = dim[1];    // garbage value -- please gimme a break
    NSLog(@"%d",d);
}
EndC