[procedure] open-output-file filename

R5RS: Takes a string naming an output file to be created and returns an output port capable of writing characters to a new file by that name. If the file cannot be opened, an error is signalled. If a file with the given name already exists, the effect is unspecified.

See also open-input-file, call-with-output-file, with-output-to-file

Bigloo, STk: extends this to take a piped command as filename.

[procedure] open-output-file filename [if-exists]

ChezScheme extends R5RS to take the optional flag if-exists, which may be one of the symbol error, replace, truncate or append.

[procedure] open-output-file filename [mode]

Chicken: takes an optional argument which can be #:text, #:binary or #:append.

[procedure] open-output-file filename [flags perms]

Scsh: flags and perms are integer that are composed by or-ing bit flags.

[procedure] open-output-file filename [options ...]

Gauche extends R5RS to take various keyword arguments to customize behavior of open-output-file.

 numero rio