| VarSaveAs | Function (ROM Call 0x28D)

dialogs.h

HSym VarSaveAs (const ESQ *FileTypes, const char *TitleSym, ...);

Displays the standard "Save Copy As" dialog.

VarSaveAs implements the standard "Save Copy As" dialog. The user may select a type as well as the folder to save the symbol in, and finally has to enter the symbol name.
FileTypes is a pointer to a zero-terminated array of types that are supported (see VarOpen for more info). TitleSym is a string that will be placed in the title of the dialog box (the title will have the form "SAVE COPY OF TitleSym AS"). Alternatively, TitleSym may be NULL if no such title is wanted.
VarSaveAs returns the HSym descriptor of the newly created symbol, or H_NULL if the user pressed 'ESC' or in case of an error. This function is essentially the same as VarNew, only the different dialog type is used.
This function may cause heap compression.

Uses: DialogAdd, DialogDo, DialogNew, HeapFree, ER_catch, ER_success, ERD_dialog, TokenizeSymName, top_estack, memset, PopupAddText, PopupNew, PopupText, VarCreateFolderPopup, strcat, strlen, XR_stringPtr, DataTypeNames, FirstNonblank, VarOptList, VarSaveTitle, FindSymInFolder, StrToTokN, SymSysVar, VarStore
Used by: GT_SaveAs

See also: VarNew, VarOpen