Home › Forums › KX Academy › message after print to stderror not shown › Reply To: message after print to stderror not shown
-
If statements in q do not return data.
“The result of if is always the generic null.”
q)result:if[1b;1]
q)result
q).Q.s1 result //The generic null is returned
"::"
//You can include the date in the printed output:
q){if[x>1;-2"Warn ",string[x]," above threshold 1 ",string .z.D]} 2
Warn 2 above threshold 1 2024.04.22
code.kx.com
if control word | Reference | kdb+ and q documentation - Kdb+ and q documentation
if is a q control construct for conditional evaluation of one or more expressions.