Richard Holland
Richard Holland

Reputation: 2683

Having trouble with K&R Exercise 5-11's requirements

The exercise:

Modify the programs entab and detab (written as exercises in Chapter 1) to accept a list of tab stops as arguments. Use the default tab settings if there are no arguments.

I'm not sure what a list of tab stops would be?

My guess: ./entab -t 5,5,8,5

first tab stop is 5 spaces, second is 5, third is 8, forth is 5?

Upvotes: 3

Views: 526

Answers (1)

When I did that exercise, I used "column" numbers.

./entab -t 4,8,12,32,66

That mimics the behavior of tab stops on a typewriter, a primitive machine which was much more popular when I did that exercise (and when K&R wrote the book) than it is today.

I miss typewriters.

Upvotes: 2

Related Questions