All pastes #495336 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-18 18:18 UTC
rendered paste body
--excerpt from parse_opts.ads
package parse_opts is
[...]
  type hook_t is access procedure (Param: string_list.clist := null);

  -- Has to go here
  procedure put_help (Param: parse_opts.string_list.clist := null) is
  begin
    put_line (parse_opts.command_name);
    -- do stuff
  end put_help;
  
[...]
  procedure add_arg (short: character; long: string; param_count: natural := 0; hook: hook_t := null);
[...]
---------- test.adb
with parse_opts;
procedure test is
  use ada.text_io, ada.integer_text_io;
  
begin
  parse_opts.add_arg ('h', "help", 0, put_help'access);
  parse_opts.process; -- irrelevant for the error
end test;