assert Interface

interface


Calls

interface~~assert~~CallsGraph interface~assert assert proc~assert assert interface~assert->proc~assert interface~assert_always assert_always proc~assert->interface~assert_always proc~assert_always assert_always interface~assert_always->proc~assert_always

Called by

interface~~assert~~CalledByGraph interface~assert assert proc~as_character as_character proc~as_character->interface~assert interface~as_character as_character interface~as_character->proc~as_character

public pure module module subroutine assert(assertion, description, diagnostic_data)

Arguments

TypeIntentOptionalAttributesName
logical, intent(in) :: assertion

Most assertions will be expressions such as i>0

character(len=*), intent(in) :: description

A brief statement of what is being asserted such as "i>0" or "positive i"

class(*), intent(in), optional :: diagnostic_data

Data to include in an error ouptput: may be of an intrinsic type or a type that extends characterizable_t

Description

If assertion is .false. and enforcement is enabled (e.g. via -DASSERTIONS=1), then error-terminate with a character stop code that contains diagnostic_data if present