print "Give me an integer number : ¥n"
getstdin P0
readline S1,P0
Its execution gives :
10
Give me an integer number :
How is it possible to flush stdout before reading the number.
It means the equivalent of the $| in Perl.
______________________________________________________________________
\|||/
(o o)
+--ooO-( )-Ooo------------------------------------------+
| Christian Aperghis-Tramoni |
| |
| Case Postale 901 Tel : (33) 04 91 82 92 49 |
| 163 Avenue de Luminy SFR : (33) 06 18 93 10 70 |
| 13288 Marseille Cedex 09 Fax : (33) 04 91 82 92 75 |
| France Mel : ch...@dil.univ-mrs.fr |
/) ch...@aperghis.net (\
/ ) WEB : http://www.dil.univ-mrs.fr/~chris ( \
( (+-------------------------------------------------------+) )
((\ \) / ) / ) (/ //)
(\\\ \_/ / \ \_/ ///)
\ / \ /
___\___/__________________________________________________\___/________
print join('',map({$i=1-$i;$a=$i?10*$_."\b\b":pack"c",$a+$_+0x16}split
(//,"5110789279758710838810587992861093898779948387799310")),"...\n");
_______________________________________________________________________
You can switch off buffering on stdout by doing:
getstdout P1
pioctl I0, P1, 3, 0
To switch back to line buffering, do:
getstdout P1
pioctl I0, P1, 3, 1
--
Marty
No, it doesn't quite. As in C++'s iostreams, streams ought to have the
ability to be "tied". That is, a call on one automatically flushes the
other. stdout should be tied to stdin this way.
Luke