function [tnext,evt_nbr] = query_evt()
%
%  This routine queries the next event in the event calendar
%  without removing it
%    tnext is the next event time
%    evt_nbr is the next event number
%
%  We start by checking whether the event calendar is empty
%  If so, we return -1 in both arguments
%
global evt_cal
if prod(size(evt_cal)) == 0,
  tnext = -1;
  evt_nbr = -1;
  return
end
%
%  The event calendar wasn't empty, hence we can query the first event 
%  in the event calendar)
%
[n,m] = size(evt_cal);
tnext = evt_cal(1,1);
evt_nbr = evt_cal(1,2);
%
return