[Info-vax] escape sequences, cursor positioning

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Wed Jan 14 06:51:20 EST 2009


Neil Rieck wrote:

> Maybe this is something I haven't seen before but, shouldn't the "7"
> be an "8" as in:
> $ esc[0,8]=27
> I thought "8" meant byte but maybe its just my ignorance showing
> though.

The first value is the starting bit-position and
the second is number of bits set. So [0,7] = 27
sets the first 7 bits (prob OK for those countries
using only 7-bit ASCII) leaving the 8'th bit "0".
OK for "esc" and other 7-bit characters, but not
for charachters higher up in the ASCII table.

In the case above even "$ esc[0,5]=27" will
actualy work since the value 27 (decimal) will
only change the lower 5 bits. Not recomended, since
you it will be unpredictible if the symbol "esc"
happens to have some other value before, the bits
6, 7 and 8 are unchanged by the operation...

Jan-Erik.



More information about the Info-vax mailing list