Check a known reference value: 5! = 120.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_005(id, nfail) use forcolormap_utils, only: factorial integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "factorial: 5! = 120" logical :: ok ok = (factorial(5) == 120) call report_test(name, ok, id, nfail) end subroutine test_005