From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,20bf0d0544bba2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-09 07:52:18 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Declaring subtypes Date: Tue, 9 Dec 2003 15:52:16 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <95476e79.0312090710.68a031a4@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1070985136 6930 134.91.1.34 (9 Dec 2003 15:52:16 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 9 Dec 2003 15:52:16 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:3276 Date: 2003-12-09T15:52:16+00:00 List-Id: Kevin Hostelley wrote: : I am rather new to Ada and I had a design question. I'm working on a : web based application and I was wondering if declaring subtypes of : String for common database fields was overkill. For example: : : subtype Address_Line is String(1..60); : subtype City is String(1..40); : subtype Zip_Code is String(1..9); : : : I understand that Strong typing is one of the strengths of Ada but I : just don't know how far to go with it. If you look back just a few weeks there was a discussions of this topic in this group. (With comments from Robert Eachus, among others) An alternative might be to use Bounded_String types. You could also consider Wide_String or Bounded_Wide_String, if you have an internationally usable data base. -- Georg