diff --git a/spec_7.rst b/spec_7.rst index 0d73c10..67ae31b 100644 --- a/spec_7.rst +++ b/spec_7.rst @@ -86,6 +86,24 @@ to one parameter per line, at the same indent level. Example: FLUX_NODEID_ANY, FLUX_RPC_RESPONSE); +10. Long test expressions connected by "AND" or "OR" operators SHOULD +be broken to one test expression per line at the same indent level. +Example: + + .. code-block:: c + + if (out->type == MY_EXPECTED_TYPE + && (out->bytes > MIN_BYTES + && out->bytes <= MAX_BYTES)) { + ... + } + + .. code-block:: c + + if (flux_event_subscribe (h, "event.foo") < 0 + || flux_event_subscribe (h, "event.bar") < 0) { + ... + } Variable Names ==============