loki.types.procedure_type
Representation of a procedure type for function or subroutine type definitions.
Classes
|
Representation of a function or subroutine type definition. |
- class ProcedureType(name=None, is_function=None, is_generic=False, is_intrinsic=False, procedure=None, return_type=None)
Bases:
DataTypeRepresentation of a function or subroutine type definition.
This serves also as the cross-link between the use of a procedure (e.g. in a
CallStatement) to theSubroutineobject that is the target of a call.- Parameters:
name (str, optional) – The name of the function or subroutine. Can be skipped if
procedureis provided.is_function (bool, optional) – Indicate that this is a function
is_generic (bool, optional) – Indicate that this is a generic function
is_intrinsic (bool, optional) – Indicate that this is an intrinsic function
procedure (
SubroutineorStatementFunction, optional) – The procedure this type represents
- property name
The name of the procedure
This looks up the name in the linked
procedureif available, otherwise returns the name stored during instanation of theProcedureTypeobject.
- property procedure
The
Subroutineobject of the procedureIf not provided during instantiation or if the underlying
weakrefis dead, this returnsBasicType.DEFERRED.
- property is_function
Return True if the procedure is a function, otherwise False
- property is_elemental
Return
Trueif the procedure has theelementalprefix, otherwiseFalse
- property return_type
The return type of the function (or None)