Posts

Showing posts with the label sentinel value

Sentinel Value

In computer  programming , a  sentinel  value (also referred to as a flag value, trip value, rogue value, signal value, or dummy data) is a special value in the context of an algorithm which uses its presence as a condition of termination, typically in a loop or recursive algorithm. More info on the same here  https://en.wikipedia.org/wiki/Sentinel_value In Objective-C it looks something like this where 'nil' is the sentinel. NSArray *arrayElements = [ NSArray arrayWithObjects : @"One" , @"Two" , @"Three" , @"Four" , nil ];