To: J3 10-221 From: Bill Long Subject: Interop TR: Error checks backwards in Annex examples. Date: 2010 October 07 Reference: 10-165r2.pdf Discussion: In the examples in the Annex, the current code provides a check for incorrect values, but the code computes a check for all correct, and if that is the case, returns an error. This is backwards. The 'true' state for the check should be if ANY of the conditions fails. {These issues were originally reported by Tobias Burnus via email.} Edits to 10-165r2: [17:46-47] Change: "if (a_desc->type == CFI_type_int && b_desc->type == CFI_type_int && c_desc->type == CFI_type_int) {" to: "if (a_desc->type != CFI_type_int || b_desc->type != CFI_type_int || c_desc->type != CFI_type_int) {" [18:3] Change: "if (a_desc->rank == 2 && b_desc->rank == 2 && c_desc->rank == 2)" to: "if (a_desc->rank != 2 || b_desc->rank != 2 || c_desc->rank != 2)" [18:11-12] Change: "if (ni == b_desc->dim[0].extent && ni == c_desc->dim[0].extent)" and "if (nj == b_desc->dim[1].extent && nj == c_desc->dim[1].extent)" to: "if (ni != b_desc->dim[0].extent || ni != c_desc->dim[0].extent)" and "if (nj != b_desc->dim[1].extent || nj != c_desc->dim[1].extent)"