"Natural" zero-based counting at its best.
"Natural" zero-based counting at its best.
All room numbers were 5 digits, and skipped numbers if there were multiple windows in one room, based on the theory that such a room might later be sub-divided, and wanting to avoid renumbering of rooms down the hallway.
(I encountered this around 2003, so might have well changed since then; didn't find any references only with a quick search).
But then again people measure distance in feet and write dates as month day year :)
So there was a floor with rooms numbered 1xx and 0xx. There was also a floor below the 0xx floor. They just numbered it 00xx. And you could enter the building on any of those floors depending on what door you picked.
The class I taught was in 0005. Room 005 was someone's office. So on the first day of every semester we would have students waiting outside the door of 005 instead of 0005...
Floors 1 through 10 are "regular" floors. L is the lobby. P1 through P3 are the parking (basement) levels.
So you have three types: regular, lobby, and parking. And the elevator labels are of type regular | lobby | parking.
(Now you can't disagree with me because sum types are popular on HN, and I have framed this in terms of sum types.)
up: (regular | lobby | parking) -> (regular | lobby | parking)
down: (regular | lobby | parking) -> (regular | lobby | parking)
and which_way: (regular | lobby | parking) x (regular | lobby | parking) -> direction
If you use subset of integers you can just use operators inc, dec and <.Yeah I know it was a joke.
Hmm, are there actually an infinite number of floors? Do we need to switch to floating point?
Why separate the floors that are on the same level?
> Hmm, are there actually an infinite number of floors?
I assumed there isn't and that we use a subset of integers. If you have infinite number of floors - feel free to use full set of integers (if you have enough memory that is).
> Do we need to switch to floating point?
No point, if you have more than aleph0 floors - floats won't help you.
0 is ground floor.
To add to the fun the only continuous corridor through the entire T-shaped building was on Level 10, one end of which (the base of the T) was at ground level on its part of the hill. There was a famous 'kink' in the middle of the top / cross-bar of the T (apparently the longest corridor in Europe) because they started building from each end and were slightly off.
This is a great example.
I wonder how many multiples of people who like arguing about starting from 1 vs 0 and how many people were confused for more than a day
The elevator, however, goes from floor '1' (the basement), to floor '5' (the top or fourth floor).
This really confuses visitors.
The Elevator Mafia want $10,000 to fix it.
So your initial assumption is incorrect from my experience.
I've seen setups like you mention, but they definitely aren't the majority in places I've lived.