[personal profile] gdt

Dear HSC students,

Despite what you may have been told, phone numbers are not integers. Consider the well-known phone number 000. This is not the same as the phone number 0.

Strictly phone numbers are a ordered set, each element of the set being one of ('0', '1', ..., '9').

Depending upon the application the number might be a local number (55501234), a full national number (255501234) or a full international number (61255501234). Moreover phone systems may require 'access codes' to identify the type of number (the good old "dial 9 to get an outside line"), so the dialled number may have not much to do with the phone number. This all means there may be no reliable comparison operator for phone numbers.

Phone numbers are ordered, but numbers which dial with less digits appear earlier appear before numbers which dial with more digits (that is, a breadth-first traversal of an ordered tree).

Complicating the character set there are additional characters in the Touch Tone set: '*', '#', 'A', 'B', 'C', 'D'. There are also two signals in the Plain Old Telephone Service: pause and hook flash, traditionally written as ',' and '!'.

There is also a great deal of syntatic sugar. The most notable being '+' used to represent an international number. When dialling '+' the system substitutes the international access code (such as 0011 in Australia). Other sugar includes '(', ')', '-' and space.

The most expeditious way to represent a number is to use a string. With a reduced character set if you must, but real world programmers know that's just asking for trouble when faced with a real number like "(02) 5550 1234 ask for Jane".

From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User (will be screened)
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

Glen Turner

July 2017

S M T W T F S
      1
2345678
9 101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2017-08-22 20:47
Powered by Dreamwidth Studios