When you execute a word processor's print command, you are normally prompted to specify the pages you want printed. You might, for example, enter:
10-15,25-28,8-4,13-20,9,8-8
The expression you enter is a list of print ranges, separated by commas.
Each print range is either a single positive integer, or two positive integers separated by a hyphen. In the latter case we call the first integer low and the second one high. A print range for which low > high is simply ignored. A print range that specifies page numbers exceeding the number of pages is processed so that only the pages available in the document are printed. Pages are numbered starting from 1.
Some of the print ranges may overlap. Pages which are common to two or more print ranges will be printed only once. (In the example given, pages 13, 14 and 15 are common to two print ranges.)