And if one do:

   procedure example is
      type C_String_Type is array (1..10) of Character;
      a : C_String_type;
   begin
      a := ('1','2','3','4','5','6','7','8','9','A','B','C','D');
   end example;

then when compiling:

   % gnatmake example.adb 
   gnatgcc -c example.adb
   example.adb:5:09: string literal too long for type "c_string_type"
   defined at line 2
   example.adb:5:09: static expression raises "constraint_error"
   gnatmake: "example.adb" compilation error

Preben
-- 
«Don't use C;  In my opinion,  C is a library programming language
 not an app programming language.»  - Owen Taylor (GTK+ developer)

Use Ada 95, a free language. More info at http://www.adapower.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to