def METHOD_NAME(card: BDFCard, ifield: int, fieldname: str) -> int:
    """see ``integer``"""
    svalue = card.field(ifield)
    if isinstance(svalue, float_types):
        warnings.warn('%s = %r (field #%s) on card must be an integer (not a double).\n'
                      'card=%s' % (fieldname, svalue, ifield, card))
        return int(svalue)
    try:
        return int(svalue)
    except ValueError:
        # int('s')
        # int('5.0')
        if '.' in svalue:
            try:
                return _force_integer(svalue)
            except ValueError:
                pass
        dtype = _get_dtype(svalue)
        raise SyntaxError('%s = %r (field #%s) on card must be an integer (not %s).\n'
                          'card=%s' % (fieldname, svalue, ifield, dtype, card))
    except TypeError:
        dtype = _get_dtype(svalue)
        raise SyntaxError('%s = %r (field #%s) on card must be an integer (not %s).\n'
                          'card=%s' % (fieldname, svalue, ifield, dtype, card))