From: jacob.m.h.smith@googlemail.com
Subject: GNAT: Weird Style Warnings
Date: Sun, 26 Oct 2008 05:17:43 -0700 (PDT)
Date: 2008-10-26T05:17:43-07:00 [thread overview]
Message-ID: <6078a089-927b-4756-81a8-7c344df1ee16@u65g2000hsc.googlegroups.com> (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
next reply other threads:[~2008-10-26 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-26 12:17 jacob.m.h.smith [this message]
2008-10-26 15:22 ` GNAT: Weird Style Warnings 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox