% returns the index of an input field
%
% n = getFieldIn(opt, name, inName)
% name - optic name or serial number
% inName - input name
% n - field index
%
% Example:
% n = getFieldIn(opt, 'PR', 'fr');

function n = getFieldIn(opt, name, inName)

  sn = getSerialNum(opt, name);					% optic number
  np = getPortNum(opt, inName, opt.optic(sn).inNames);		% port number
  n = opt.optic(sn).in(np);					% link number
