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.

Device I/O<strong>Turbo</strong> <strong>Basic</strong> supports so-called device files; that is, it supports hardware devicessuch as the keyboard, screen, and printer as though they were sequential files.Each supported device has a reserved file name that ends in a colon:NameFunctionKYBD: The keyboard can be opened for input. Reading from device fileKYBD: is like using INKEY$.SCRN: The screen can be opened for output. Writing to the SCRN: device fileis like PRINTing.LPTl-3: Line printers 1 to 3.COMl-2: Communcations ports 1 and 2.For example:OPEN "SCRN:" FOR OUTPUT AS #1has the same effect asPRINT "Hello"andPRINT #1, "Hello"OPEN "KYBD:" FOR INPUT AS #1 INPUT 11, as, b$is the same asINPUT as, b$<strong>Turbo</strong> <strong>Basic</strong>: The Language 109

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

Saved successfully!

Ooh no, something went wrong!