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-Thread: 103376,341ea6d4f1d28719 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!skynet.be!newspost001!tjb!not-for-mail Date: Mon, 28 Feb 2005 17:26:21 +0100 From: Adrien Plisson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: fr-fr, fr-be, fr, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: need a little string hint... References: <1109606915.447479.184780@l41g2000cwc.googlegroups.com> In-Reply-To: <1109606915.447479.184780@l41g2000cwc.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4223462d$0$30168$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 60e94fc6.news.skynet.be X-Trace: 1109607981 news.skynet.be 30168 81.243.63.49:3760 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:8532 Date: 2005-02-28T17:26:21+01:00 List-Id: mferracini wrote: > i need to read from a file "config.sys" host&port number. > but i have a problem with host... > > if i call: Get_Host_By_Name ("localhost") it work fine, > i i use the string read from the file don't work. what happens if you try Get_Host_By_Name ("localhost ") ? in your file, you read the host but discard the value of Last after the call, this value holds the length of the input string. so your string does not contain "localhost" but "localhost__________" (replace '_' by ' '). (it may not be the problem, but i can't test it) -- rien