
louise
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#1199 · main · 10 min 33 s
1Étoiles
0Forks
0Issues
| 1 | // A program without a .stdin file reads empty input (ADR 0086): every |
| 2 | // read finds the end at once. |
| 3 | |
| 4 | import std/io |
| 5 | |
| 6 | pub fn main :: -> () / <io> |
| 7 | { |
| 8 | match io.read_line () |
| 9 | { Ok(None) -> io.println "line: end", _ -> io.println "line: more?" } |
| 10 | match io.read_bytes 16 |
| 11 | { Ok(None) -> io.println "bytes: end", _ -> io.println "bytes: more?" } |
| 12 | match io.read_line () |
| 13 | { Ok(None) -> io.println "still the end", _ -> io.println "more?" } |
| 14 | } |
| 15 | //> line: end |
| 16 | //> bytes: end |
| 17 | //> still the end |