3 ms·
Similarly, I try to bake the documentation directly into the code. Eg (from a shell): OPTION(*line=='[',"[EXPR]","the result of evaluating EXPR as a math exp
by a1369209993 7y ago
Similarly, I try to bake the documentation directly into the code. Eg (from a shell):
OPTION(*line=='[',"[EXPR]","the result of evaluating EXPR as a math expression (see -?m)")
{ ... }
qsh -?s | grep -F '$['
'$[EXPR]': the result of evaluating EXPR as a math expression (see -?m)
So OPTION does triple duty as 'comments', documentation, and the actual test for what kind of substitution is being parsed. This tends to be at the mercy of code structure though.
- xchaotic 7y agoWithout context, I have no idea what are you trying to imply or document with OPTION? I can more or less figure out what the code does, but not why it does it. Here you should document why are you grepping for something