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,e0dc3fcb6c922d48 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Unconstrained String Handling. Date: 1997/07/10 Message-ID: #1/1 X-Deja-AN: 256130716 Distribution: world References: Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-07-10T00:00:00+00:00 List-Id: In article , RC wrote: >Is there a portable way to handle data elements of type: string? > >(Any attributes which can be accessed for instance.) > >As for constant strings: > > line1: constant string := "Some text."; > > >begin > put_line (line1); > put_line (line1'last); > >.... > > > >procedure string_op (ip_text: IN STRING) is >begin > ????? ip_text'First yields the index position of the first element of the actual parameter. ip_text'Last yields the last index position of the string. ip_text'Range is shorthand for ip_text'First .. ip_text'Last. ip_text'Length yields the length of the actual argument; it's the same value as ip_text'last - ip_first + 1. What are you trying to do, exactly? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271