This comment is reply for 563 PoohKid: たこのお題の趣旨は「ファイルハンドルの扱...(条件を満たす行を取り除く). Go to thread root.
iwk #587(2007/07/11 16:01 GMT) [ OCaml ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
open System;; open System.Text;; open System.IO;; open Array;; let fileIO (ifname:string) (ofname:string) = let streamW = new StreamWriter( ofname, false, Encoding.Default ) in let streamR = new StreamReader( ifname, Encoding.Default ) in let rmCommentLn (wstream:StreamWriter) = let rec readf (rstream:StreamReader) = let line = rstream.ReadLine() in if line = null then () else begin if not (line.StartsWith "#") then wstream.WriteLine line else (); readf rstream end in using streamR readf in using streamW rmCommentLn;; if (length Sys.argv) = 3 then fileIO Sys.argv.(1) Sys.argv.(2) else ();;
Rating0/0=0.00-0+
[ reply ]
iwk
#587()
[
OCaml
]
Rating0/0=0.00
Rating0/0=0.00-0+