Re: I don't quite understand this exercise...
- From: "Patrick M." <noone@xxxxxxxxxxx>
- Date: Mon, 26 Sep 2005 15:48:26 -0400
Gordon Burditt wrote:
Ok, thanks, and everyone else. So what you're saying is, they want me to ask the user/get and set a variable, say n, and replace all tabs with n spaces, and they don't want me to calculate the number of spaces a tab takes up on the system?
How can you possibly calculate the number of spaces a tab takes up on the system? (Isn't this a little like calculating the color of the nail polish on THE thumb of THE human?) It could be that there are many different terminals and printers, all with different tab stop settings, and in any case, there's no portable way to read the location of the cursor after sending a tab.
There are some conventions where a file is labelled with the number of spaces a tab should take up while editing it with vi, but that's hardly universal (and using it tends to be a security hole). I've seen only a very few files actually using such labelling. Some files have comments like "view me with 4 space tabs". It is often the case that even the files in the same directory are not consistent among themselves.
Gordon L. Burditt
Yes, you do have a point there... :D But there could possibly be a way, I just wasn't sure if that's what they wanted me to do; you never know. Thanks for clearing it up for me.
-- Patrick M. /* EOF */ .
- References:
- I don't quite understand this exercise...
- From: Patrick M.
- Re: I don't quite understand this exercise...
- From: Thad Smith
- Re: I don't quite understand this exercise...
- From: Patrick M.
- Re: I don't quite understand this exercise...
- From: Gordon Burditt
- I don't quite understand this exercise...
- Prev by Date: Re: I don't quite understand this exercise...
- Next by Date: Re: visibility of variable
- Previous by thread: Re: I don't quite understand this exercise...
- Next by thread: Re: I don't quite understand this exercise...
- Index(es):
Relevant Pages
|