'Returns the opening statements of the fortran routine.'

def _get_routine_opening(self, routine):

    code_list = []
    if (len(routine.results) > 1):
        raise CodeGenError('Fortran    only    supports    a    single    or    no    return    value.')
    elif (len(routine.results) == 1):
        result = routine.results[0]
        code_list.append(result.get_datatype('fortran'))
        code_list.append('function')
    else:
        code_list.append('subroutine')
    args = ',    '.join((('%s' % self._get_symbol(arg.name)) for arg in routine.arguments))
    call_sig = '{0}({1})\n'.format(routine.name, args)
    call_sig = ('    &\n'.join(textwrap.wrap(call_sig, width=60, break_long_words=False)) + '\n')
    code_list.append(call_sig)
    code_list = ['    '.join(code_list)]
    code_list.append('implicit    none\n')
    return code_list
