This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tcl 8.4.1 unexpected initial 0a character in stdin on cygwin/Win98


The described problem is on a Cygwin version of TCL,
running on Win98.
Doesn't appear on Cygwin/NT4 or W2000, nor on
win version of TCL on Win98.

Run this test.tcl:
------------------
puts "Do you want to continue? (Y/N)"
gets stdin rep
if {[string compare [string toupper "$rep"] "Y"]!=0} {
	puts "No"
} else {
	puts "Yes"
}
exit
------------------
It says:
$ /usr/bin/tclsh84 /cygdrive/c/temp/test.tcl
Do you want to continue? (Y/N)

No
$
without waiting for any keyboard entry !

As a checker, run this test2.tcl:
------------------
set rep [read stdin 1]
binary scan $rep H* str
puts "rep=$str"
------------------
It says:
$ /usr/bin/tclsh84 /cygdrive/c/temp/test2.tcl

rep=0a
$

Where does this 0a come from?
Is it a remainder of a CR LF sequence somewhere?



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]