daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with Ada.Text_IO;
  2.  
  3. procedure Main is
  4.    type StringFunctor is access procedure(C: Character);
  5.    procedure StringForeach (S: in String; F: in StringFunctor) is
  6.    begin
  7.       for i in S'Range loop
  8.          F(S(i));
  9.       end loop;
  10.    end StringForeach;
  11.  
  12.    S: String := "Hello, world!";
  13. begin
  14.    StringForeach(S, Ada.Text_IO.Put'Access);
  15. end Main;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top