From 6e1eeeebfb453fa7c871869c19375ce60fbd7413 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 27 Jul 2019 16:01:55 -0700 Subject: 5485 - promote SubX to top-level --- html/real-files.mu.html | 78 ------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 html/real-files.mu.html (limited to 'html/real-files.mu.html') diff --git a/html/real-files.mu.html b/html/real-files.mu.html deleted file mode 100644 index fab7777b..00000000 --- a/html/real-files.mu.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -Mu - real-files.mu - - - - - - - - - - -https://github.com/akkartik/mu/blob/master/real-files.mu -
- 1 # example program: read a character from one file and write it to another
- 2 # BEWARE: this will modify your file system
- 3 # before running it, put a character into /tmp/mu-x
- 4 # after running it, check /tmp/mu-y
- 5 
- 6 def main [
- 7   local-scope
- 8   f:num/file <- $open-file-for-reading [/tmp/mu-x]
- 9   $print [file to read from: ], f, 10/newline
-10   c:char, eof?:bool <- $read-from-file f
-11   $print [copying ], c, 10/newline
-12   f <- $close-file f
-13   $print [file after closing: ], f, 10/newline
-14   f <- $open-file-for-writing [/tmp/mu-y]
-15   $print [file to write to: ], f, 10/newline
-16   $write-to-file f, c
-17   f <- $close-file f
-18 ]
-
- - - -- cgit 1.4.1-2-gfad0