From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 14 Oct 92 12:14:32 GMT 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? Message-ID: <1992Oct14.121432.10919@aplcen.apl.jhu.edu> List-Id: 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