This post was a reminder to me that you should read things even if you think you know a lot about the topic. I did know most of this stuff, but the useful ch unit was new to me.
Hahaha, same here! I only came across it a couple of days ago. Then I thought I better write it down so I can burn it into my head and actually use it.
So, 'ch' is something like the "amount" of text, horizontally, for a line or paragraph. If you use many W's or M's then way fewer characters will fit in 50ch than when you use i's or j's ... which makes the "amount of text to process" in a line 'constant' for the user (for lack of a better description).
At least for variable width fonts (for fixed width fonts an i and a W have the same width).
At least for variable width fonts (for fixed width fonts an i and a W have the same width).
Oh, this is a very good point. I didn't think of this - so using ch with monospaced typefaces would result in (probably) same amount of characters on every (full) line.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This post was a reminder to me that you should read things even if you think you know a lot about the topic. I did know most of this stuff, but the useful
ch
unit was new to me.Hahaha, same here! I only came across it a couple of days ago. Then I thought I better write it down so I can burn it into my head and actually use it.
Totally new to me, ch, never heard of it ...
So, 'ch' is something like the "amount" of text, horizontally, for a line or paragraph. If you use many W's or M's then way fewer characters will fit in 50ch than when you use i's or j's ... which makes the "amount of text to process" in a line 'constant' for the user (for lack of a better description).
At least for variable width fonts (for fixed width fonts an i and a W have the same width).
Oh, this is a very good point. I didn't think of this - so using
ch
with monospaced typefaces would result in (probably) same amount of characters on every (full) line.