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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d93b7c6dd17cbc81 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Strings and reading from a file Date: 1999/05/12 Message-ID: <7hc3k8$6ft$1@nnrp1.deja.com>#1/1 X-Deja-AN: 477006198 References: <7han2q$jkp$1@news.iinet.net.au> <7hbnnl$rca$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x37.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Wed May 12 14:35:53 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-05-12T00:00:00+00:00 List-Id: In article <7hbnnl$rca$1@nnrp1.deja.com>, Robert Dewar wrote: > In article <7han2q$jkp$1@news.iinet.net.au>, > "Cameron Hodge" wrote: > > Now I know I get the length of the string when I read it in > and can declare > > the varialle there and then, but I am reading in many strings > all of > > different lengths into an array. > > So, keep track of these lengths! Simple enough logic to do that. In case you don't understand how this helps, you should know that you can pass just *part* of a string (or any array for that matter) to a subroutine. Assume your 20 character string is named "My_String" and you have its length stored in "My_String_End": Ada.Text_IO.Put_Line ( My_String(1..My_String_End) ); -- T.E.D. --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---