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,2426bcd39a8436a3 X-Google-Attributes: gid103376,public From: Anonymous Subject: none Date: 1998/08/06 Message-ID: <199808061416.QAA22263@replay.com>#1/1 X-Deja-AN: 378520140 References: <6qc03b$3k6$1@nnrp1.dejanews.com> Organization: mail2news@nym.alias.net Mail-To-News-Contact: postmaster@nym.alias.net Comments: This message did not originate from the Sender address above. It was remailed automatically by anonymizing remailer software. Please report problems or inappropriate use to the remailer administrator at . Newsgroups: comp.lang.ada Date: 1998-08-06T00:00:00+00:00 List-Id: On Thu, 06 Aug 1998 10:21:32 GMT, jtapasai@my-dejanews.com wrote: > I am learning ADA with GNAT 3.10 under Linux. > I use the Linux console graphics done by Jerry Van Dijk. Thanks ! > Good job ! > In this package there is a procedure as follows: > > gl_write(x,y:interfaces.c.int;c_string:interfaces.c.strings.char_ptr); > where c_string is > > c_string:=interfaces.c.strings.new_string("hello world !"); > > this procedure displays in screen at x,y position the string hello world > I must display in screen ( in graphics mode ) not a string, but a variable > wich has integer type. > How can it be solved ? > Thanks in advance. > ... C_String := Interfaces.C.Strings.New_String (Your_Integer_Type'Image (Variable_Of_Your_Integer_Type) ); 'Image returns a String of minimal length for the value in base 10. The first character of the String is a space for a non-negative value and '-' for a negative value. So -1 => "-1" -10 => "-10" 0 => " 0" 10 => " 10" 100 => " 100" If you need a fixed width or another base, look at Ada.Text_Io.Integer_Io.Put with an out parameter of type String. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "Hello! Smelly English K...niggets." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/