Postal Code specifications:
The first segment (A1A) is called the Forward Sortation Area or FSA, the second segment (1A1) is called Local Delivery Unit -- LDU.
The first letter of the FSA is as follows:
The middle digit of the FSA is also used to distinguish between an urban
X(1..9)X or rural
X0X postal code.
The third letter of the FSA is a further geographical subdivision of the codes listed above.
An complete urban code resolves to one side of a city block (even/odd addresses), one building or one large organisation. A rural code designates a post office serving one or more villages and surrounding counties.
The special code H0H 0H0 designates Santa Claus' post office (it is not part of the Greater Montreal Area)