Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64) | :: | A(3) | ||||
real(kind=r64) | :: | B(3) | ||||
real(kind=r64) | :: | C(3) |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE CrossProduct(A, B, C)
! Cross product between vectors A and B
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: A(3),B(3),C(3) ! Vector components: C = A X B
! FLOW:
C(1) = A(2) * B(3) - A(3) * B(2)
C(2) = A(3) * B(1) - A(1) * B(3)
C(3) = A(1) * B(2) - A(2) * B(1)
RETURN
END SUBROUTINE CrossProduct