To: J3 J3/18-226 From: Malcolm Cohen Subject: Another mistake in an example Date: 2018-June-13 1. Introduction The "invoke" procedure in the callback example refers to "list%first%data" but there is no "list" in sight. This is clearly a relic of a much earlier draft where the invocations were being done directly off the list, and therefore "list%first" should have been "callback". 2. Edit to N2146 Page 583, C.10.3 Abstract interfaces and procedure pointer components, In the definition of type "callback_list", change "CLASS(callback_record),POINTER :: first => NULL()" to "TYPE(callback_record),POINTER :: first => NULL()" {The procedures expect a TYPE pointer not a CLASS pointer.} In the definition of type "callback_record", change "CLASS(callback_record),POINTER :: next" to "TYPE(callback_record),POINTER :: next" {Same reason.} In subroutine "register_callback", change "TYPE(callback_record),POINTER :: new,last" to "TYPE(callback_record),POINTER :: new" {Because "last" is not used.} In subroutine "invoke", change "IF (ASSOCIATED(callback%data) THEN" to "IF (ASSOCIATED(callback%data)) THEN" {Missing right parenthesis.} and in the next line, change "CALL callback%proc(list%first%data)" to "CALL callback%proc(callback%data)" {Wrong variable.} ===END===