with text_IO; procedure SMILEY is -- improvised at the keyboard and needs checking -- variables EYES: constant STRING(1..2):=":;"; MOUTH:constant STRING(1..3):=")|("; NOSE: constant STRING(1..1):="-"; FACE:STRING(1..3):=EYES(1) & NOSE(1) & MOUTH(1); task ONE;-- Wink the Eye task TWO; -- smile, neutral, frown,... -- The two tasks do not interfer because -- task ONE will only change FACE(1) and task TWO only changes FACE(3). task body ONE is begin loop--for ever FACE(1):=EYES(1); delay 4.0; FACE(1):=EYES(2); delay 4.0; end loop; end ONE; task body TWO is begin loop--for ever for M in 1..3 loop FACE(3):=MOUTH(M); delay 6.0; end loop; end loop; end TWO; begin -- Smiley output routine. delay 1.0; loop TEXT_IO.PUT_LINE(FACE); delay 2.0; -- I'd prefer to overwrite the previous smiley -- but this is a system dependent feature end loop; end SMILEY;