Hi,

    I am trying  to read charaters  from stdin. the only way I have
found is

puts "type your name"
puts -nonewline ">  "
set name [read stdin]

the problem is to stop reading character when enter is pressed. I have
found another  way to end the line read but it is not very funny: type
space, CTRL-z, enter, CTRL-z enter. Afterwards, command [read stdio]
returns. if I want to get the correct name typed, I am forced to use:

set name [llindex $lineRead 0]

in order to remove the CTRL-z from string.

is anyone have an easier way to read a simple line from stdin finished
by enter?

PS: I am using NT/jdk1.2/jacl1.1.1

philoux - france


----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
A list archive is at: http://www.findmail.com/listsaver/tcldallas/

Reply via email to