Name=Save:: Difference between revisions
Jump to navigation
Jump to search
(Created page with "The name=SAVE: parameter allows the user to save files to any location by opening a separate window. The following program provides an example: 00010 OPEN #1: "name=SAVE:.,re...") |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The name=SAVE: parameter allows the user to save files to any location by opening a separate | The name=SAVE: parameter allows the user to save files to any location by opening a separate Save Window and prompting them to find a file location and name. The following program provides an example: | ||
00010 OPEN #1: "name=SAVE:.,recl=1,new",EXTERNAL,OUTPUT IOERR PROBLEM | 00010 OPEN #1: "name=SAVE:.,recl=1,new",EXTERNAL,OUTPUT IOERR PROBLEM | ||
00020 PRINT FILE$(1);" ";LREC(1) | 00020 PRINT FILE$(1);" ";LREC(1) | ||
Line 13: | Line 13: | ||
To determine the name of the file selected: | To determine the name of the file selected: | ||
*Use [[FILE$]](file-number) when the open is successful. | *Use [[FILE$]](file-number) when the open is successful. | ||
*Use [[FILE$]] when the file fails to open. FILE$ gives the name of the last file to have an error including files that are open. ( | *Use [[FILE$]] when the file fails to open. FILE$ gives the name of the last file to have an error including files that are open. (Unfortunately, in this case, it returns "SAVE:.") | ||
==More Examples== | |||
open #188: "Name=SAVE:D:\Desktop\*.zip,RecL=1,replace",external,output | |||
open #188:'Name=SAVE:@:D:\Desktop\*.*,RecL=1,New',external,output | |||
See also: [[Name=Open:]] | |||
<noinclude> | |||
[[Category:All Parameters]] | |||
</noinclude> |
Latest revision as of 22:18, 25 November 2019
The name=SAVE: parameter allows the user to save files to any location by opening a separate Save Window and prompting them to find a file location and name. The following program provides an example:
00010 OPEN #1: "name=SAVE:.,recl=1,new",EXTERNAL,OUTPUT IOERR PROBLEM 00020 PRINT FILE$(1);" ";LREC(1) 00030 CLOSE #1: 00040 STOP 00100 PROBLEM: ! There was a problem opening the file. 00110 IF ERR=4150 THEN !: PRINT "Could not create file:";FILE$(1) !: STOP ! FILE$(1) is blank! 00120 PRINT "Err:";ERR;" Line:";LINE !: STOP
To determine the name of the file selected:
- Use FILE$(file-number) when the open is successful.
- Use FILE$ when the file fails to open. FILE$ gives the name of the last file to have an error including files that are open. (Unfortunately, in this case, it returns "SAVE:.")
More Examples
open #188: "Name=SAVE:D:\Desktop\*.zip,RecL=1,replace",external,output open #188:'Name=SAVE:@:D:\Desktop\*.*,RecL=1,New',external,output
See also: Name=Open: