Special character constants

Martin Weitzel martin at mwtech.UUCP
Wed Jan 23 00:59:48 AEST 1991


In article <1991Jan16.174248.2689 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) writes:
[...]
>Bear in mind that the definition of what an output device *does* with a
>tab is very device-dependent.  Just having tabs "available" is not enough;
>you need to know exactly how they are processed.  Short of using a library
>like termcap or curses, if you want precise output appearance without any
>prior knowledge of hardware or software, you're going to have to use
>spaces regardless.

Hey, wait a moment here. If we drive this to the extreme, can we really
depend on spaces to produce certain visible space on some output device?
Or is it just so that the *probability* of space-characters producing
some space on output devices is higher than for tab-characters? Well, I
know this is nit-picking, but consider the case of

	a) some printer or terminal emulator (sort of `xterm') running
	   with a proportional spaced font (with properly set up tabs
	   tab-characters are somewhat more likely to produce halfway
	   "nice" alignment in this situation).

	b) a `dumb' terminal without `line-wrap' on printable characters
	   but with line-wrap on tabs and the cursor beeing allready in
	   the last column.

What is the *least* the programmer can depend on? Can he or she depend on
certain results of `printf("hello, world\n");' IMHO it's completly outside
the scope of the standard what visible rendering would result from this (if
we assume the output is directed to some device capable of producing visible
renderings).
-- 
Martin Weitzel, email: martin at mwtech.UUCP, voice: 49-(0)6151-6 56 83



More information about the Comp.lang.c mailing list