Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. 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
whose presence guarantees termination of a loop that processes
structured (especially sequential) data. The sentinel value makes it
possible to detect the end of the data when no other means to do so
(such as an explicit size indication) is provided. The value should be
selected in such a way that it is guaranteed to be distinct from all
legal data values, since otherwise the presence of such values would be
taken to signal the end of the data, prematurely.