Input loop: Difference between revisions

no edit summary
No edit summary
Line 435:
f := FileStream open: 'afile.txt' mode: FileStream read.
[ f atEnd ] whileFalse: [ (f nextLine) displayNl ] .</lang>
 
=={{header|Tcl}}==
<lang php>set fh [open $filename]
while {[gets $fh line] != -1} {
# process $line
}
close $fh</lang>
 
 
=={{header|UnixPipes}}==
Line 443 ⟶ 451:
read by words
yes 'A B C D ' | while read -d\ a ; do echo -$a- ; done
 
 
=={{header|Visual Basic .NET}}==
Anonymous user