Так:
with Ada.Text_IO;
use Ada.Text_IO;
procedure sample is
type myrecord is
record
Field1 : String(1..10);
Field2 : Integer;
end record;
thisrecord : myrecord;
begin
thisrecord.Field1:="Apologies ";
thisrecord.Field2:=23;
Put(thisrecord.Field1);
Put(Integer'Image(thisrecord.Field2));
end sample;
>gnatmake sample.adb
>Apologies 23
А так:
with Ada.Text_IO;
use Ada.Text_IO;
procedure sample is
type myrecord is
record
Field1 : String(1..10);
Field2 : Integer;
end record;
thisrecord : myrecord;
SField2 : String := Integer'Image(thisrecord.Field2);
begin
thisrecord.Field1:="Apologies ";
thisrecord.Field2:=23;
Put(thisrecord.Field1);
Put(SField2);
end sample;
>Apologies 134514620