Example
With System, Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS;
Use Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS;
procedure PREAMBLE is
package SYSBYTE_IO is new INTEGER_IO(System.Byte);
package SYSWORD_IO is new INTEGER_IO(System.Word);
use SYSBYTE_IO, SYSWORD_IO;
preamble_string : String(1..300) := (others => Ascii.NUL);
preamble_length : System.Word;
status
: System.Word;
begin
clrscr;
Put_Line("im_get_preamble example:");
New_line;
im_get_preamble(preamble_string, preamble_length, status);
Put("Preamble: ");
for i in Integer range 1..300 loop
exit when preamble_string(i) = Ascii.NUL;
Put(preamble_string(i));
end loop;
New_line;
Put("Length
: ");
Put(preamble_length);
New_line;
Put("Status
: ");
Print_status_code(status);
New_line;
end PREAMBLE;
3
im_get_preamble
3-39