-- function F return String is
-- Pref : String renames Task_Name;
- -- T1 : String := Index1'Image (Val1);
+ -- T1 : constant String := Index1'Image (Val1);
-- ...
- -- Tn : String := Indexn'Image (Valn);
- -- Len : Integer := Pref'Length + T1'Length + ... + Tn'Length + n + 1;
+ -- Tn : constant String := Indexn'Image (Valn);
+ -- Len : constant Integer :=
+ -- Pref'Length + T1'Length + ... + Tn'Length + n + 1;
-- -- Len includes commas and the end parentheses
+ --
-- Res : String (1 .. Len);
-- Pos : Integer := Pref'Length;
--
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Pref,
- Object_Definition => New_Occurrence_Of (Standard_String, Loc),
- Expression =>
+ Constant_Present => True,
+ Object_Definition => New_Occurrence_Of (Standard_String, Loc),
+ Expression =>
Make_String_Literal (Loc,
Strval => String_From_Name_Buffer)));
Make_Object_Declaration (Loc,
Defining_Identifier => T,
Object_Definition => New_Occurrence_Of (Standard_String, Loc),
+ Constant_Present => True,
Expression =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Image,
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Len,
+ Constant_Present => True,
Object_Definition => New_Occurrence_Of (Standard_Integer, Loc),
Expression => Sum));
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Pref,
- Object_Definition => New_Occurrence_Of (Standard_String, Loc),
+ Constant_Present => True,
+ Object_Definition => New_Occurrence_Of (Standard_String, Loc),
Expression =>
Make_String_Literal (Loc,
Strval => String_From_Name_Buffer)));