Drkcore

05 09 2009 OCaml Tweet

OCamlのファイルアクセス

openfileとかopen_outとかopen_out_genとか色々あるので混乱する。

let file = Sys.argv.(1) in 
let f = try open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_text] 0o600 file
with Sys_error msg -> failwith ("Couldn't write to " ^ msg) in 
output_string f "OCaml\n";close_out f;;

どう書く?org:ACLの制御

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021