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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,73989f41631a6beb,start X-Google-Attributes: gid103376,public From: Jan Galkowski Subject: What's the deal with "slice" in Ada.Strings.Bounded Date: 1997/07/15 Message-ID: <33CBDCDF.751F5ECB@digicomp.com>#1/1 X-Deja-AN: 257075987 Organization: Digicomp Research Corporation Newsgroups: comp.lang.ada Date: 1997-07-15T00:00:00+00:00 List-Id: The package Ada.Strings.Bounded operates upon a private type "Bounded_String". Among the other constructors and manipulators in that package, there is an interrogator called "Slice". What I'm trying to figure out is how to create a Bounded_String out of the return value from this "Slice". The type given for the return value is the general "String". Naturally, compilers balk at trying to specify a variable having definite dimensions using an object which has indefinite ones. So, how would you suggest making a Bounded_String out of this return value from "Slice"? In other words, how does one write, for this case, a function function To_Bounded_String( Given_String : in String ) return Bounded_String is ... begin ... end To_Bounded_String ; where Bounded_String has been given a fixed length by instantiating "Generic_Bounded_Length". TIA. Ciao. -- Jan Theodore Galkowski, developer, statistician, speaking only for myself, jan@digicomp.com jtgalkowski@worldnet.att.net Member, the American Statistical Association, the Union of Concerned Scientists.