Guest User

Untitled

a guest
May 10th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.56 KB | None | 0 0
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. procedure Main is
  3.    
  4.    i:integer:=4;
  5.    
  6.    task T1 is
  7.       entry Cita;
  8.    end T1;
  9.    
  10.    task T2;
  11.    
  12.    task body T1 is
  13.    begin
  14.       Put_Line("Soy la tarea T1");
  15.       select
  16.       when i<5 =>
  17.       accept Cita  do
  18.          Put_Line("Cita Aceptada");
  19.       end Cita;
  20.       end select;
  21.       Put_Line("Fin T1");
  22.    end T1;
  23.    
  24.    task body T2 is
  25.    begin
  26.       Put_Line("Soy la Tarea T2");
  27.       T1.Cita;
  28.       Put_Line("Fin T2");
  29.    end T2;
  30.    
  31.  
  32. begin
  33.    --  Insert code here.
  34.    null;
  35. end Main;
Add Comment
Please, Sign In to add comment