{$APPTYPE CONSOLE}
{$modeswitch nestedprocvars}
uses SysUtils;

type
    users_t = (tarasB, superhackkiller1997, other_shit);
    say_ptr_t = procedure(str: PChar) is nested;
const
    users: array[users_t] of PChar = ('tarasB', 'superhackkiller1997', 'other_shit');

function bind(usr: users_t): say_ptr_t;
  var
    local_usr: users_t;
  procedure say(str: PChar);
    begin
      Writeln(ErrOutput, Format('%s: %s', [users[local_usr], str]))
    end;
begin
  local_usr := usr;
  bind := @say
end;

begin
  bind(tarasB)('shit');
  bind(superhackkiller1997)('i''m god');
  bind(other_shit)('ko-ko-ko')
end.