comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: How do i print stuff?
Date: Sat, 28 Oct 2017 21:52:13 +0300
Date: 2017-10-28T21:52:13+03:00	[thread overview]
Message-ID: <f5k1uuF3cgpU1@mid.individual.net> (raw)
In-Reply-To: <f5k0n1F33baU1@mid.individual.net>

On 17-10-28 21:30 , Niklas Holsti wrote:
> On 17-10-28 21:07 , tclwarrior@gmail.com wrote:
    ...
>> But could not find a way to Print c (a boolean)
>
> so you can do
>
>    Ada.Text_IO.Put_Line (Boolean'Image (c));
>
> and get TRUE or FALSE printed.

Oh yes, in compilers that implement the most recent language standard, 
you can also use 'Image directly on the variable, as in

    Ada.Text_IO.Put_Line (c'Image);

If you are using the GNAT compiler, and the above does not compile, you 
can use instead the older GNAT-specific form:

    Ada.Text_IO.Put_Line (c'Img);

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


      reply	other threads:[~2017-10-28 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 18:07 How do i print stuff? tclwarrior
2017-10-28 18:30 ` Niklas Holsti
2017-10-28 18:52   ` Niklas Holsti [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox