Home › Forums › kdb+ › abs() vs abs[] for fby “while” all() vs all[] › Reply To: abs() vs abs[] for fby “while” all() vs all[]
-
<div>See these sections of docs on:</div>
Order of evaluation also matters: Left-of-Right Evaluation
abs(price)=({abs max x};price)
Will run in order:
- ({abs max x};price)
- (price)=({abs max x};price)
- abs(price)=({abs max x};price)
whereas:
abs[price]=({abs max x};price)
Will run in order:
- ({abs max x};price)
- abs[price]
- abs[price]=({abs max x};price)
This tries to pass 2 arguments to all which only takes one argument so you get a rank error
https://code.kx.com/q/ref/all-any/#all
all[col=a;col2=b]