Arbortext Command Language > Functions by Alphabetical Listing > file_close
  
file_close
file_close ([win[, flags]])
This function closes (destroys) the window specified by the win parameter. If win is not specified, it closes the current window. Executing this function is similar to choosing the File > Close menu option.
The flags parameter is a bitmask specifying special file closing settings and is constructed by ORing the flags from the following list:
0x0001 — Set this flag to suppress all prompts to save the document open in the window.
0x0002 — Set this flag to close the very last Arbortext Editor window. By default, closing the very last window causes it to remain open but display an empty text document. Note that even when the very last Arbortext Editor window is closed, the Arbortext Editor process remains running. Be careful when using this flag.
0x0004 — Set this flag to not offer the option to Cancel during any prompts to save a document.
If the document in the specified win (or current window) appears in both an Edit view and a Document Map view, both view “windows” will be closed. If there are other window frames open for the current session, the window frame is destroyed as well.
The first view “window” in a window frame cannot be destroyed. If the current session has only one window frame, 0x0002 was not specified, and the function closes the document in the first view “window” in the window frame, a blank ASCII document is placed in the first view window.
This function does not affect the windows in any other window frames that contain the same document appearing in the window specified by win.