13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FilesOnce you have created a program or a collection of data that you'll need to accessagain, the next logical step is to save it. In saving your data, you are creating a filethat can be used for input or output. There are three file types you can create:sequential, random access, and binary. We'll discuss each of these types here, butfirst let's look at how to name files and/or directories (which contain several files orsubdirectories).As a citizen of an MS-DOS world, the files you create and access using <strong>Turbo</strong><strong>Basic</strong> must conform to DOS naming conventions. File names consist of two parts,separated by a period:filename. extwhere filename can be from one to eight characters, and ext is an optional typeextension of up to three characters. If a file name is longer than eight characters,<strong>Turbo</strong> <strong>Basic</strong> automatically truncates the name and adds a period at its end. Forexample, if you enterTESTINGOATAit becomesTESTINGO.If a string has a period that separates the file name and its extension but the filename is over eight characters long, <strong>Turbo</strong> <strong>Basic</strong> truncates the name to eight charactersand then appends the extension, like so:VERYLONGFILENAME.TBSbecomesVERYLONG.TBSIf you use an extension with more than three characters, the extra characters aretruncated; for example:TESTING. DATAbecomesTESTING.OATFile names and extensions can contain the following characters:A-Z 0-9 ( ) { } @ # $ % - & ! - _ ' / -96 <strong>Turbo</strong> <strong>Basic</strong> Owner's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!