[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.out_channel


An pseudo-abstraction over binary and textual output channels. OCaml-compatible channels conflate binary and text IO, and for this reasons their use from F# is somewhat deprecated The direct use of System.IO StreamWriter, TextWriter and BinaryWriter objects is preferred, e.g. see System.IO.File.CreateText). Well-written OCaml code that simply opens either a channel in text or binary mode and then does text or binary I/O using the OCaml functions will work, though care must be taken with regard to end-of-line characters (see output_char below). This library pretends that an out_channel is just a System.IO.TextWriter. Channels created using open_out_bin maintain a private System.IO.BinaryWriter, which will be used whenever do I/O using this channel. Note: an abbreviation for TextWriter

Full Type Signature

[<OCamlCompatibilityAttribute
  ("Consider using one of the types 'System.IO.TextWriter', 'System.IO.StreamWriter' or 'System.IO.BinaryWriter' instead")>]
type out_channel = TextWriter

See Also

Microsoft.FSharp.Compatibility.OCaml.Pervasives


Documentation for assembly FSharp.Compatibility, version 1.9.4.19, generated using F# version 1.9.4.19