objective c - retrieving number from array that can be manipulated -
i trying retrieve number stored in array can manipulate @ later stage.
for example have sum in array i.e. 500 , divide number x.
how accomplished?
so far have , doesn't work:
nserror *error; nsarray *level4results = [context executefetchrequest:request error:&error]; nslog(@"%@", level4results);//check sum value of array int l4sum = ((int)[level4results indexofobject:0]) / 7; nslog(@"%d", l4sum); //check if l4sum gets values passed
the output was:
2013-05-19 18:50:49.648 bla.v1[6254:c07] ( { sumvalue = 633; } ) 2013-05-19 18:50:49.650 bla.v1[6254:c07] 306783378
did try using [level4results objectatindex:0] instead of [level4results indexofobject:0] ?
Comments
Post a Comment