Flush - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


FileTools

  

Flush

  

flush output for a buffered file

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Flush(file, file2, ...)

Parameters

file1, file2, ...

-

one or more names or file descriptors of open files to be flushed

Description

• 

The Flush(file1, file2, ...) command ensures that output, which has been written to the specified files that are assumed to have been opened either implicitly, by Text[Open] or by Binary[Open], is written to disk.

• 

The Flush function does not return anything.

• 

When a file is closed, it is automatically flushed.

Examples

FileToolsTextOpentestfile:

FileToolsTextWriteStringtestfile,This is a test\n

15

(1)

ifkerneloptsplatform=windowsthenssystemtype testfileelsessystemcat testfileendif

0,

(2)

FileToolsFlushtestfile

ifkerneloptsplatform=windowsthenssystemtype testfileelsessystemcat testfileendif

0,This is a test

(3)

FileToolsTextClosetestfile

See Also

file_types

FileTools

FileTools[Binary][Close]

FileTools[Binary][Open]

FileTools[Text][Close]

FileTools[Text][Open]

FileTools[Text][WriteString]

IO_errors