Josh,

> Thanks. You're probably right ... reformatting the phone numbers is
> going to be a lot less work than a custom type.

 I remember from  the old days of Delphi/InterBase, and  even older days of
Paradox, there were so called input masks, US phone code mask would be like

(999)_000-00-00

 or  something like  that (no  default values)  Borland has  released their
Turbo stuff for public domain, so it might be worth looking at.
 Implementing a  generic picture functions  (as in PL/I) would  probably be
easier and  cover more cases.  However, watch your back  with user-supplied
format strings, there's a plenty of ruined lives at BugTraq :)
 I'm just not sure what to do if 8 or 9 digits are supplied? Maybe, reject,
assuming that  such things should  be caught  by UI, and  if we get  such a
weird thing, there's something really really wrong?


--

 Well I tried to be meek
  And I have tried to be mild
 But I spat like a woman
  And I sulked like a child
 I have lived behind the walls
  That have made me alone
 Striven for peace
  Which I never have known

 Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)

Reply via email to