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,adf94948991d0e26 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Types Converting Date: 1996/04/27 Message-ID: #1/1 X-Deja-AN: 151744159 references: <4os0iCAqCegxEwYz@dhaheri.demon.co.uk> <4ltn0h$c37@rigel.rz.uni-ulm.de> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-04-27T00:00:00+00:00 List-Id: In article <4ltn0h$c37@rigel.rz.uni-ulm.de>, Joerg Rodemann wrote: > Message : String; It's illegal to declare a variable of type String, unless you either initialize it, or give bounds. E.g. "Message: String := ...;" or "Message: String(1..50);". > Message := "The Total is " & i'Image & " out of 100"; Image is an attribute of types, not variables. E.g. "Integer'Image(I)". What you want is something like: Message: constant String := "The total is" & Integer'Image(I) & " out of 100"; Note that the 'Image attribute evilly adds an extra space (if I is positive), so I didn't put a space after "is". In my own code, I write an Image function, which avoids the annoying extra space, and has lots of options like allowing hexadecimal, and putting in underscores every 3 characters, etc. All with defaults, of course, so "Image(I)" does something reasonable. - Bob