comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!aplcen.apl.j hu.edu!ddsdx2.jhuapl.edu!dlc@ucbvax.Berkeley.EDU  (Dave Collard x7468)
Subject: Re: Assy/Ada SLOC ratio;What's an Ada SLOC?
Date: 14 Oct 92 12:14:32 GMT	[thread overview]
Message-ID: <1992Oct14.121432.10919@aplcen.apl.jhu.edu> (raw)

In <9210092044.AA05113@ajpo.sei.cmu.edu> byrley@NTSC-RD.NAVY.MIL ("Paul Byrley"
) writes:

>Two questions:
>First, what do you experts count for Ada SLOC?  I thought total
>semicolons but now am hearing "semicolons EXCEPT for ...".  I
>would appreciate opinions from lots of people who have Ada
>experience.  I will send summary out to net when results are in.

Using semicolonss, 

  A := (Flags => (1 => True,
                  2 => False,
                  3 => True,
                  4 => False),
        Coord => (X => Sqrt(F(N)),
                  Y => Cos(Whatever),
                  Z => Compute_Z),
        Left  => Compute_Left_Expression,
        Right => Compute_Right_Expression,
        Name  => Build_Name,
        Etc   => Continue_Aggregate_Assignment);

is ONLY ONE LINE OF CODE!!!???!!!

while
  A.Flags(1) := True;
  A.Flags(2) := False;
  A.Flags(3) := True;
  A.Flags(4) := False;
  A.Coord.X := Sqrt(F(N));
  A.Coord.Y := Cos(Whatever);
  A.Coord.Z := Compute_Z;
  A.Left := Compute_Left_Expression;
  A.Right := Compute_Right_Expression;
  A.Name := Build_Name;
  A.Etc := Continue_Aggregate_Assignment;

is many lines of code!
yet, the first is quite a bit better, requires at least
as much work, and is what experienced Ada developers do.
You cannot forget some of the record this way.

IMHO, any method that depends on semicolons for counting
lines of code is pretty useless.

--Thor
collard@capsrv.jhuapl.edu
dlc@ddsdx2.jhuapl.edu

             reply	other threads:[~1992-10-14 12:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-10-14 12:14 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!aplcen.apl.j [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-10-17 13:41 Assy/Ada SLOC ratio;What's an Ada SLOC? Xmiester
1992-10-16 13:17 Dennis Doubleday
1992-10-15 21:33 Bob Kitzberger
1992-10-15 13:15 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!mlb.semi.har
1992-10-15 12:21 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!mlb.semi.har
1992-10-14 16:55 Mark A Biggar
1992-10-09 21:30 Paul Byrley
replies disabled

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