comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Indentation
Date: Fri, 8 Aug 2014 09:32:56 -0700 (PDT)
Date: 2014-08-08T09:32:56-07:00	[thread overview]
Message-ID: <0c2b1cf8-125b-44d6-9f46-2dc1c546e5c6@googlegroups.com> (raw)
In-Reply-To: <ls2su9$kh7$1@speranza.aioe.org>

On Friday, August 8, 2014 9:12:55 AM UTC-7, Victor Porton wrote:
> What should be the indentation in the following Ada code fragment 
> 
> (especially its last line)?
> 
> 
> 
> type T is 
> record
> X: Integer;
> end record
> with Convention => C;

An RM example in B.3.3 looks like:

type T (Flag : Boolean := False) is
    record
        case Flag is
            when False =>
                F1 : Float := 0.0;
            when True =>
                F2 : Integer := 0;
        end case;
    end record
    with Unchecked_Union;

That's as good an answer as you're going to get.  Other people may have other preferences, but you really can't make an objective case for one or another style as long as it's reasonable.

                              -- Adam


  reply	other threads:[~2014-08-08 16:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 16:12 Indentation Victor Porton
2014-08-08 16:32 ` Adam Beneschan [this message]
2014-08-08 17:16   ` Indentation Jeffrey Carter
2014-08-08 17:45     ` Indentation Peter Chapin
2014-08-08 17:50       ` Indentation Peter Chapin
2014-08-08 22:51     ` Indentation Randy Brukardt
2014-08-08 16:38 ` Indentation Pascal Obry
replies disabled

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