Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Text_IO;
- procedure Main is
- type StringFunctor is access procedure(C: Character);
- procedure StringForeach (S: in String; F: in StringFunctor) is
- begin
- for i in S'Range loop
- F(S(i));
- end loop;
- end StringForeach;
- S: String := "Hello, world!";
- begin
- StringForeach(S, Ada.Text_IO.Put'Access);
- end Main;
Add Comment
Please, Sign In to add comment