pragma Extensions_Allowed (On);
--  APL text (T32b): `÷` is APL's division, a float (AP9), and `⌊ a ÷ b`, `⌈ a ÷ b` of
--  integers are integer floor and ceiling division, proved
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   subtype Small is Integer range -100 .. 100;
   subtype Nonzero is Integer range 1 .. 10;
   subtype Unit is Long_Float range -1.0 .. 1.0;
   type Vector is array (Positive range <>) of Integer;
   type Reals is array (Positive range <>) of Long_Float;
   type Smalls is array (Positive range <>) of Small;
   type Divisors is array (Positive range <>) of Nonzero;
   type Units is array (Positive range <>) of Unit;
   X : constant Smalls := (7, -7, 6, -1);
   D : constant Divisors := (2, 2, 3, 4);
   U : constant Units := (0.5, -0.25, 1.0, 0.75);
   procedure Show (V : Vector) is
   begin
      for E of V loop
         Put (Integer'Image (E));
      end loop;
      New_Line;
   end Show;
   procedure Show (V : Reals) is
   begin
      for E of V loop
         Put (Long_Float'Image (E));
      end loop;
      New_Line;
   end Show;
   Halves : constant Reals := APL ("X ÷ D");
   Floors : constant Vector := APL ("⌊ X ÷ D");
   Ceilings : constant Vector := APL ("⌈ X ÷ D");
   Scaled : constant Reals := APL ("U ÷ 2");
   Inverse : constant Reals := APL ("÷ D");
begin
   Show (Halves);
   Show (Floors);
   Show (Ceilings);
   Show (Scaled);
   Show (Inverse);
end Main;
