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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7936408ed8296efa X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-20 10:11:19 PST Path: supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!isdnet!enst!enst.fr!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: User define attributes Date: Fri, 20 Apr 2001 19:08:31 +0000 (GMT) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: avanie.enst.fr 987786678 33312 137.194.161.2 (20 Apr 2001 17:11:18 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 20 Apr 2001 17:11:18 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Sender: alves@lux38 In-Reply-To: <3ADDFE24.9B3E1038@gsde.hou.us.ray.com> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.3 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:7048 Date: 2001-04-20T19:08:31+00:00 On Wed, 18 Apr 2001, Samuel T. Harris wrote: > > generic > type Index_Type is (<>); > type Component_Type is private; > ... > package Array_Attribute_Functions is > function Width (Item : Array_Type) return Natural; > function Image (Item : Array_Type) return String; > function Value (Item : String) return Array_Type; > end Array_Attribute_Functions; > > ... My package Bundles is along those lines. generic type Names is (<>); package Bundles is type Bundle_Type is array(Names) of Unbounded_String; function Bundle( S: String; Indicator: String := "=>"; Separator: String := ",") return Bundle_Type; -- Parses a bundle representation S into a Bundle_Type. -- White space between tokens is ignored. -- Unnamed items are assigned Null_Unbounded_String. -- B = Bundle(Image(B)) holds. function Image( ... It has served me long and well. It is now in Adlib (lexis.di.fct.unl.pt/ADaLIB), category Miscelany. -- Marius Amado Alves alves@systran.lu Project Tradaut-Pt Systran Luxembourg 12, Rue de Vianden L-2680 LUXEMBOURG Tel 352 + 45 46 53 Fax 352 + 45 74 75 Mob 351 +939354002