comp.lang.ada
 help / color / mirror / Atom feed
* GNAT: Weird Style Warnings
@ 2008-10-26 12:17 jacob.m.h.smith
  2008-10-26 15:22 ` anon
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: jacob.m.h.smith @ 2008-10-26 12:17 UTC (permalink / raw)


Hello.

I am pretty new to Ada and I have a problem I'm not able to solve.
I compile my files with the following GNAT style switch: -
gnaty2acefhiklmM78nprt
When compiling this one adb file I always get the following message:
s-expuns.ads:42:04: (style) bad indentation
s-expuns.ads:44:04: (style) bad indentation
I have no idea why. This file "s-expuns.ads" is not one of mine, it
must be part of
some library. Does anyone know the meaning of this?

Here's the program text (It's no important project, I was just
experimenting):

-----------------------------------------------------------------------------
with Ada.Integer_Text_IO, Interfaces;
use  Ada.Integer_Text_IO, Interfaces;

procedure Bit_Extraction is

  subtype Byte is Unsigned_8;

  function Get_Bits (The_Byte, Mask : Byte) return Byte is
    Position : Natural := 0;
  begin
    while ((2**Position and Mask) = 0) loop
      Position := Position + 1;
    end loop;
    return Shift_Right ((The_Byte and Mask), Position);
  end Get_Bits;

  Test_Byte, Test_Result : Byte;

begin

  --  Test_Byte: 247 => 11110111
  Test_Byte := 247;

  --  Test_Result: 7 => 111
  Test_Result := Get_Bits (Test_Byte, 224);

  Put (Integer (Test_Result), 0);

end Bit_Extraction;
-----------------------------------------------------------------------------

Greetings,
Jacob M. H. Smith



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-06 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-26 12:17 GNAT: Weird Style Warnings jacob.m.h.smith
2008-10-26 15:22 ` anon
2008-10-26 18:11 ` Georg Bauhaus
2008-10-26 20:41 ` Jeffrey R. Carter
2008-11-01 21:07 ` sjw
2008-11-05 19:09 ` jacob.m.h.smith
2008-11-05 20:40   ` John B. Matthews
2008-11-06 20:30     ` jacob.m.h.smith

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