D
Daniel Pfeiffer
I recently stumbled over a design bug, and there doesn't even seem to be a
clear warning about it in the docs: columns (e.g. in strings), like all
indices, count from 0, but file lines count from 1. That leads to absurd
equivalences like
5..7 and print while <>;
does the same as
print +(<>)[4..6];
Worse, if you do
0..9 and print while <>;
that will not emulate head, instead the flip-flop will never become true.
I guess it's too late to make line numbers behave, but there should be a big
warning in the docs!
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer
clear warning about it in the docs: columns (e.g. in strings), like all
indices, count from 0, but file lines count from 1. That leads to absurd
equivalences like
5..7 and print while <>;
does the same as
print +(<>)[4..6];
Worse, if you do
0..9 and print while <>;
that will not emulate head, instead the flip-flop will never become true.
I guess it's too late to make line numbers behave, but there should be a big
warning in the docs!
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer