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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c58a5b8372dc24a0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 17 Apr 2010 14:06:40 +0100 From: Georg Bauhaus Reply-To: rm.tsoh-bauhaus@maps.futureapps.de User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100329) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: confusion with string initialization References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4bc9c075$0$6764$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 17 Apr 2010 16:06:45 CEST NNTP-Posting-Host: 7ee304d3.newsspool3.arcor-online.net X-Trace: DXC=T]6R:cI5TcO2:OR3:3gaE@McF=Q^Z^V3H4Fo<]lROoRA8kFejVH\bS`=;2[?aKBDZ[Ib0\YaE X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:10040 Date: 2010-04-17T16:06:45+02:00 List-Id: brett wrote: > I'm trying to learn Ada 2005 with GNAT ( Linux) and are having problems with string initialization using the > > bs := 20 * " "; > > construct, which always gives an error > > "universal integer expected" It looks like this might actually be related to something other than your source fragment? with Ada.Strings.Fixed; use Ada.Strings.Fixed; procedure News32 is bs : String(1 .. 20); begin bs := 20 * " "; bs(20) := bs(1); end News32; $ gnatmake -gnatwa -gnatv -gnato news32.adb gcc-4.3 -c -gnatwa -gnatv -gnato news32.adb GNAT 4.3.2 Copyright 1992-2007, Free Software Foundation, Inc. Compiling: news32.adb (source file time stamp: 2010-04-17 13:02:39) 8 lines: No errors gnatbind -x news32.ali gnatlink news32.ali $