Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A Is page range inclusive or exclusive?

I may be wrong, but when I saw this I immediately thought of Python's range, where the number used is the stop number - i.e., stop before you get to that number. That also fits well with the way lo...

posted 4y ago by manassehkatz‭  ·  edited 4y ago by manassehkatz‭

Answer
#2: Post edited by user avatar manassehkatz‭ · 2020-06-08T16:11:10Z (over 4 years ago)
  • I may be wrong, but when I saw this I immediately thought of [Python's range](https://docs.python.org/3/library/functions.html#func-range), where the number used is the **stop** number - i.e., stop before you get to that number. That also fits well with the way loops are typically structured in many other computer languages. So from a programming standpoint, this makes perfect sense.
  • However, unless (and arguably, even if) your readers are computer programmers, the expectation will be that **pages x - y** means all pages with numbers >= x and <= y. In addition to examples provided by others, the obvious example to me of why it must be that way is the last page of the book. If a book has 100 pages numbered 1 - 100, and you are referencing information on the last 2 pages, the reference will be 99-100. Referencing 99-101 would clearly not make sense since 101 does not exist. Using Python notation, the reference would be `range(99,101)` but it is a lot simpler to say 99-100.
  • In fact, a program to *extract* or otherwise process the pages might be something like `extract_pages(x, y)` and internally reference `range(x, y+1)`, so that the user of the function would pass the actual first & last page numbers.
  • There are good reasons why `range` and similar programming constructs use a **stop** value rather than a **last** value, but those are computer science discussions and not really relevant here.
  • I may be wrong, but when I saw this I immediately thought of [Python's range](https://docs.python.org/3/library/functions.html#func-range), where the number used is the **stop** number - i.e., stop before you get to that number. That also fits well with the way loops are typically structured in many other computer languages. So from a programming standpoint, this makes perfect sense.
  • However, unless (and arguably, even if) your readers are computer programmers, the expectation will be that **pages x - y** means all pages with numbers >= x and <= y. In addition to examples provided by others, the obvious example to me of why it must be that way is the last page of the book. If a book has 100 pages numbered 1 - 100, and you are referencing information on the last 2 pages, the reference will be 99-100. Referencing 99-101 would clearly not make sense since 101 does not exist. Using Python notation, the reference would be `range(99,101)` but it is a lot simpler to say 99-100.
  • In fact, a program to *extract* or otherwise process the pages might be something like `extract_pages(x, y)` and internally reference `range(x, y+1)`, so that the user of the function would pass the actual first & last page numbers.
  • There are good reasons why `range` and similar programming constructs use a **stop** (termination condition) value rather than a **last** value, but those are computer science discussions and not really relevant here.
#1: Initial revision by user avatar manassehkatz‭ · 2020-06-08T04:16:34Z (over 4 years ago)
I may be wrong, but when I saw this I immediately thought of [Python's range](https://docs.python.org/3/library/functions.html#func-range), where the number used is the **stop** number - i.e., stop before you get to that number. That also fits well with the way loops are typically structured in many other computer languages. So from a programming standpoint, this makes perfect sense.

However, unless (and arguably, even if) your readers are computer programmers, the expectation will be that **pages x - y** means all pages with numbers >= x and <= y. In addition to examples provided by others, the obvious example to me of why it must be that way is the last page of the book. If a book has 100 pages numbered 1 - 100, and you are referencing information on the last 2 pages, the reference will be 99-100. Referencing 99-101 would clearly not make sense since 101 does not exist. Using Python notation, the reference would be `range(99,101)` but it is a lot simpler to say 99-100.

In fact, a program to *extract* or otherwise process the pages might be something like `extract_pages(x, y)` and internally reference `range(x, y+1)`, so that the user of the function would pass the actual first & last page numbers.

There are good reasons why `range` and similar programming constructs use a **stop** value rather than a **last** value, but those are computer science discussions and not really relevant here.