This shows you the differences between two versions of the page.
accessing_20files_20with_20no_20extension [2018/03/31 13:19] 127.0.0.1 external edit |
accessing_20files_20with_20no_20extension [2018/04/17 14:57] (current) tbest3112 Added syntax highlighting |
||
---|---|---|---|
Line 2: | Line 2: | ||
//by Jon Ripley, May 2006//\\ \\ When using **OPENIN**, **OPENUP** and **OPENOUT** to create or access files that do not have a file extension the default action of BBC BASIC is to append a //.bbc// file extension. To create or access files with no file extension you must add a full stop to the file name.\\ \\ To **OPENIN**, **OPENUP** or **OPENOUT** a file called **MyFile** use:\\ | //by Jon Ripley, May 2006//\\ \\ When using **OPENIN**, **OPENUP** and **OPENOUT** to create or access files that do not have a file extension the default action of BBC BASIC is to append a //.bbc// file extension. To create or access files with no file extension you must add a full stop to the file name.\\ \\ To **OPENIN**, **OPENUP** or **OPENOUT** a file called **MyFile** use:\\ | ||
+ | <code bb4w> | ||
hfile% = OPENIN "MyFile." | hfile% = OPENIN "MyFile." | ||
hfile% = OPENOUT "MyFile." | hfile% = OPENOUT "MyFile." | ||
hfile% = OPENUP "MyFile." | hfile% = OPENUP "MyFile." | ||
+ | </code> | ||
The same applies when accessing files with no extension using a //**star**// command or **OSCLI**:\\ \\ | The same applies when accessing files with no extension using a //**star**// command or **OSCLI**:\\ \\ | ||
+ | <code bb4w> | ||
*DISPLAY MyFile. | *DISPLAY MyFile. | ||
*COPY MyOldFile. MyNewFile. | *COPY MyOldFile. MyNewFile. | ||
+ | </code> | ||
The default file extensions appended by the //**star**// commands or **OSCLI** when none is supplied are as follows:\\ \\ | The default file extensions appended by the //**star**// commands or **OSCLI** when none is supplied are as follows:\\ \\ | ||